forked from semios/semios-packages
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18f624e3c9 | ||
|
|
0cc9a5c843 | ||
|
|
187e56dfef | ||
|
|
a24cf0b528 | ||
|
|
878a501804 |
+6
-3
@@ -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]):
|
||||
|
||||
@@ -4,6 +4,8 @@ from lib.make import *
|
||||
version("0.5.0")
|
||||
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
|
||||
|
||||
block_hook("autolink")
|
||||
|
||||
|
||||
def build():
|
||||
rust.build()
|
||||
@@ -13,3 +15,5 @@ on_build(build)
|
||||
|
||||
package("diffutils")
|
||||
rust.use_auto_pack(["bin"])
|
||||
link("bin/diffutils", "/bin/cmp")
|
||||
link("bin/diffutils", "/bin/diff")
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
|
||||
from lib import cpp
|
||||
from lib.make import *
|
||||
|
||||
version("1.69.0")
|
||||
source_url(
|
||||
"https://github.com/nghttp2/nghttp2/releases/download/v1.69.0/nghttp2-1.69.0.tar.gz"
|
||||
)
|
||||
|
||||
|
||||
def build():
|
||||
cpp.cmake()
|
||||
cpp.ninja()
|
||||
cpp.ninja_install()
|
||||
os.chdir("usr")
|
||||
|
||||
|
||||
on_build(build)
|
||||
|
||||
package("libnghttp2")
|
||||
cpp.use_auto_pack(["lib"])
|
||||
|
||||
package("libnghttp2-dev")
|
||||
cpp.use_auto_pack(["dev"])
|
||||
@@ -1,3 +1,4 @@
|
||||
import lib.arch as arch
|
||||
from lib.cpp import *
|
||||
from lib.make import *
|
||||
|
||||
@@ -14,8 +15,13 @@ def build():
|
||||
on_build(build)
|
||||
|
||||
|
||||
def musl_target():
|
||||
return arch.get_target().split("-")[0]
|
||||
|
||||
|
||||
package("semi-libc")
|
||||
use_auto_pack(["lib"])
|
||||
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
|
||||
|
||||
package("semi-libc-dev")
|
||||
use_auto_pack(["dev"])
|
||||
|
||||
Reference in New Issue
Block a user