Compare commits

..
3 Commits
4 changed files with 45 additions and 9 deletions
+1 -6
View File
@@ -83,10 +83,7 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter)
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
try:
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
except Exception:
pass
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
def _is_dev_file(ent) -> bool:
@@ -97,8 +94,6 @@ def _is_dev_file(ent) -> bool:
or ent.name.endswith(".pc")
or ent.name.endswith(".h")
or ent.name.endswith(".cmake")
or ent.name.endswith(".inc")
or ("Makefile" in ent.name)
)
+6 -3
View File
@@ -22,6 +22,10 @@ def build(rem: list[str] = []):
subprocess.run(cmdline)
def artifacts_dir():
return f"target/{_rust_triple(arch.get_target())}/release"
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
pc.makedir(dstdir)
with os.scandir(srcdir) as entries:
@@ -49,11 +53,10 @@ def _autopack_filter_bin(ent) -> bool:
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
target_dir = f"target/{_rust_triple(arch.get_target())}/release"
if "lib" in profiles:
_do_auto_pack(pc, target_dir, "lib", _autopack_filter_lib)
_do_auto_pack(pc, artifacts_dir(), "lib", _autopack_filter_lib)
if "bin" in profiles:
_do_auto_pack(pc, target_dir, "bin", _autopack_filter_bin)
_do_auto_pack(pc, artifacts_dir(), "bin", _autopack_filter_bin)
def use_auto_pack(profiles: list[str]):
+9
View File
@@ -0,0 +1,9 @@
{
"os_name": "\u001b[36;4mSemiOS\u001b[0m",
"config_dir": "/var/config/airup",
"service_dir": "/share/airup/services",
"milestone_dir": "/share/airup/milestones",
"runtime_dir": "/run/airup",
"env_vars": {},
"early_cmds": []
}
+29
View File
@@ -0,0 +1,29 @@
import os
import shutil
from lib import rust
from lib.make import *
version("0.10.9")
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
def build():
shutil.copy2("../../build_manifest.json", "build_manifest.json")
rust.build()
on_build(build)
def pack_airup(composer):
os.chdir(rust.artifacts_dir())
composer.makedir("bin")
composer.makedir("libexec")
composer.addfile("airup", "bin/airup")
composer.addfile("airupd", "bin/airupd")
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
package("airup")
on_pack(pack_airup)