Compare commits

..
1 Commits
Author SHA1 Message Date
sisungo 18f624e3c9 feat (lib): add artifacts_dir to rust
Signed-off-by: sisungo <[email protected]>
2026-06-17 20:27:37 +08:00
2 changed files with 6 additions and 31 deletions
+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]):
-28
View File
@@ -1,28 +0,0 @@
import os
from lib import cpp
from lib.make import *
version("78.3")
source_url(
"https://github.com/unicode-org/icu/releases/download/release-78.3/icu4c-78.3-sources.tgz"
)
def build():
os.chdir("source")
cpp.configure(["--enable-plugins", "--prefix=/"])
cpp.make()
cpp.make_install()
on_build(build)
package("libicu4c")
cpp.use_auto_pack(["lib"])
package("icu4c")
cpp.use_auto_pack(["bin"])
package("libicu4c-dev")
cpp.use_auto_pack(["dev"])