Skip to content

Commit

Permalink
repo: add package, add android package
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Oct 12, 2024
1 parent 697e3b8 commit 34d43f8
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
22 changes: 22 additions & 0 deletions packages/a/android/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package("android")
set_homepage("https://android.googlesource.com/platform/frameworks/base")
set_description("")

add_urls("https://android.googlesource.com/platform/manifest.git")

add_versions("2024.10.01", "7f9b5893c3d20455fd57b7b56527cd9a63311cab")

add_deps("repo")

-- Generate config based on xml projects in manifest
on_load(function (package)

end)

on_install(function (package)
os.vrun("repo init --partial-clone -b main -u https://android.googlesource.com/platform/manifest")
os.vrun("repo sync -j8")
end)

on_test(function (package)
end)
7 changes: 4 additions & 3 deletions packages/l/libhybris/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ package("libhybris")
add_urls("https://github.com/libhybris/libhybris.git")
add_versions("2024.09.01", "936279916605003fba95a0f3629a6bc5e6caa343")

add_deps("autoconf", "automake", "libtool", "pkgconf", "ndk")
add_deps("autoconf", "automake", "libtool", "pkg-config")
add_deps("android")

on_install("linux", function (package)
local configs = {}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
if package:is_debug() then
table.insert(configs, "--enable-debug")
end
local ndk_version = package:dep("ndk"):version()
local ndk_version = package:dep("android"):version()
local ndk_version_major = ndk_version:major() or 0
local ndk_version_minor = ndk_version:minor() or 0
local ndk_version_patch = ndk_version:patch() or 0
os.run(
"sh utils/extract-headers.sh --version %s %s %s",
ndk_version_major .. '.' .. ndk_version_minor .. '.' .. ndk_version_patch,
package:dep("ndk"):installdir(),
package:dep("android"):installdir(),
package:installdir("include")
)
os.cd("hybris")
Expand Down
24 changes: 24 additions & 0 deletions packages/r/repo/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package("repo")
set_kind("binary")
set_description("Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow.")
set_homepage("https://gerrit.googlesource.com/git-repo")
set_license("Apache-2.0")

add_urls("https://gerrit.googlesource.com/git-repo.git")

add_versions("v2.48", "69467be0cfc80734b821c54ada263c8f1439f964314063f76b7cf256c3dc7ee8")

if is_host("linux") then
add_extsources("apt::repo")
end

on_install("linux", function(package)
os.rm(".git")
os.cp("*", package:installdir("bin"))
package:addenv("PATH", package:installdir("bin"))
end)

on_test(function(package)
os.vrun("repo --version")
end)

0 comments on commit 34d43f8

Please sign in to comment.