forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fe867991c | ||
|
|
0cc9a5c843 | ||
|
|
187e56dfef | ||
|
|
a24cf0b528 | ||
|
|
73b1fcd745 | ||
|
|
878a501804 | ||
|
|
eee111823d | ||
|
|
2dfaea6426 | ||
|
|
d61c4ab118 | ||
|
|
a3690e710c | ||
|
|
a1f00f3b4f | ||
|
|
d4a8040a9c | ||
|
|
ddd14ddfda | ||
|
|
e8234fc32a | ||
|
|
1c1b8c0a5f | ||
|
|
35d6dda90a | ||
|
|
3b4bd8274b | ||
|
|
52237e92c3 | ||
|
|
1a88d3cc3f | ||
|
|
cdfa61524c | ||
|
|
5c7754c852 | ||
|
|
d415dd8ea5 | ||
|
|
44ac99e6b9 | ||
|
|
6fba906736 | ||
|
|
1092471a91 | ||
|
|
64e961c02b | ||
|
|
675af1b352 | ||
|
|
41edafea75 | ||
|
|
909f4b009b | ||
|
|
164d9f9006 | ||
|
|
2f204dc5ff | ||
|
|
b084ee0c6b |
+8
-2
@@ -1,14 +1,20 @@
|
|||||||
from typing import Callable, TypeAlias
|
from typing import Callable, TypeAlias
|
||||||
|
|
||||||
from . import autopatch, autostrip
|
from lib import pkgcomposer
|
||||||
|
|
||||||
|
from . import autolink, autopatch, autostrip
|
||||||
|
|
||||||
PreBuild: TypeAlias = Callable[[], None]
|
PreBuild: TypeAlias = Callable[[], None]
|
||||||
PostBuild: TypeAlias = Callable[[], None]
|
PostBuild: TypeAlias = Callable[[], None]
|
||||||
|
PostPack: TypeAlias = Callable[[pkgcomposer.PkgComposer], None]
|
||||||
|
|
||||||
pre_build: dict[str, PreBuild] = {
|
pre_build: dict[str, PreBuild] = {
|
||||||
"autopatch": autopatch.autopatch,
|
"autopatch": autopatch.autopatch,
|
||||||
}
|
}
|
||||||
|
|
||||||
post_build: dict[str, PostBuild] = {
|
post_build: dict[str, PostBuild] = {}
|
||||||
|
|
||||||
|
post_pack: dict[str, PostPack] = {
|
||||||
|
"autolink": autolink.autolink,
|
||||||
"autostrip": autostrip.autostrip,
|
"autostrip": autostrip.autostrip,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib import arch, common, make, pkgcomposer
|
||||||
|
|
||||||
|
|
||||||
|
def autolink(composer: pkgcomposer.PkgComposer):
|
||||||
|
os.chdir(composer.workdir + "/bundle/")
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in common.treedir("bin"):
|
||||||
|
if i.is_file():
|
||||||
|
make.link(f"bin/{i.name}", "/bin/" + i.name)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in common.treedir("lib"):
|
||||||
|
if i.is_file():
|
||||||
|
make.link(f"lib/{i.name}", "/lib/" + arch.get_target() + "/" + i.name)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in common.treedir("include"):
|
||||||
|
if i.is_file():
|
||||||
|
make.link(
|
||||||
|
f"include/{i.name}",
|
||||||
|
"/lib/" + arch.get_target() + "/include/" + i.name,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
+22
-2
@@ -1,2 +1,22 @@
|
|||||||
def autostrip():
|
import os
|
||||||
pass
|
import subprocess
|
||||||
|
|
||||||
|
from lib import common
|
||||||
|
|
||||||
|
strip = os.environ.get("STRIP", "strip")
|
||||||
|
|
||||||
|
|
||||||
|
def _is_elf(filepath):
|
||||||
|
with open(filepath, "rb") as f:
|
||||||
|
return f.read(4) == b"\x7fELF"
|
||||||
|
|
||||||
|
|
||||||
|
def autostrip(composer):
|
||||||
|
for ent in common.treedir(composer.workdir):
|
||||||
|
if not ent.is_file(follow_symlinks=False):
|
||||||
|
continue
|
||||||
|
if not (os.access(ent.path, os.X_OK) or ".so" in ent.name):
|
||||||
|
continue
|
||||||
|
if not _is_elf(ent.path):
|
||||||
|
continue
|
||||||
|
subprocess.run([strip, ent.path], check=True)
|
||||||
|
|||||||
+25
-1
@@ -51,6 +51,25 @@ def ninja_install(rem: list[str] = [], chdir: bool = True):
|
|||||||
os.chdir(os.environ["DESTDIR"])
|
os.chdir(os.environ["DESTDIR"])
|
||||||
|
|
||||||
|
|
||||||
|
def meson_setup(rem: list[str] = []):
|
||||||
|
subprocess.run(["meson", "setup", "_meson_build"] + rem, check=True)
|
||||||
|
|
||||||
|
|
||||||
|
def meson_compile(rem: list[str] = []):
|
||||||
|
subprocess.run(["meson", "compile", "-C", "_meson_build"] + rem, check=True)
|
||||||
|
|
||||||
|
|
||||||
|
def meson_install(rem: list[str] | None = None, chdir: bool = True):
|
||||||
|
default_rem = ["--destdir", f"{os.getcwd()}/../cpp_install"]
|
||||||
|
if not rem:
|
||||||
|
os.makedirs("../cpp_install", exist_ok=True)
|
||||||
|
subprocess.run(
|
||||||
|
["meson", "install", "-C", "_meson_build"] + (rem or default_rem), check=True
|
||||||
|
)
|
||||||
|
if chdir:
|
||||||
|
os.chdir("../cpp_install")
|
||||||
|
|
||||||
|
|
||||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||||
if not os.path.exists(srcdir):
|
if not os.path.exists(srcdir):
|
||||||
return
|
return
|
||||||
@@ -64,7 +83,10 @@ def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter)
|
|||||||
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
|
pc.makedirs(os.path.dirname(f"{dstdir}/{ent.name}"))
|
||||||
pc.addfile(ent.path, 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)):
|
elif ent.is_symlink() and not os.path.isabs(os.readlink(ent.path)):
|
||||||
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
try:
|
||||||
|
pc.addfile(ent.path, f"{dstdir}/{ent.name}")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _is_dev_file(ent) -> bool:
|
def _is_dev_file(ent) -> bool:
|
||||||
@@ -75,6 +97,8 @@ def _is_dev_file(ent) -> bool:
|
|||||||
or ent.name.endswith(".pc")
|
or ent.name.endswith(".pc")
|
||||||
or ent.name.endswith(".h")
|
or ent.name.endswith(".h")
|
||||||
or ent.name.endswith(".cmake")
|
or ent.name.endswith(".cmake")
|
||||||
|
or ent.name.endswith(".inc")
|
||||||
|
or ("Makefile" in ent.name)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-1
@@ -7,10 +7,13 @@ _key_version = "version"
|
|||||||
_key_description = "description"
|
_key_description = "description"
|
||||||
_key_on_pack = "on_pack"
|
_key_on_pack = "on_pack"
|
||||||
_key_arch_any = "arch_any"
|
_key_arch_any = "arch_any"
|
||||||
|
_key_links = "links"
|
||||||
|
|
||||||
_current_pkgname: str = _key_global
|
_current_pkgname: str = _key_global
|
||||||
_pkginfo: dict[str, dict[str, typing.Any]] = {
|
_pkginfo: dict[str, dict[str, typing.Any]] = {
|
||||||
_key_global: {},
|
_key_global: {
|
||||||
|
_key_links: [],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
_supported_arch: typing.Callable[[str], bool] = lambda x: True
|
_supported_arch: typing.Callable[[str], bool] = lambda x: True
|
||||||
_on_build: typing.Callable[[], None] | None = None
|
_on_build: typing.Callable[[], None] | None = None
|
||||||
@@ -36,6 +39,16 @@ def arch_any():
|
|||||||
_pkginfo[_current_pkgname][_key_arch_any] = True
|
_pkginfo[_current_pkgname][_key_arch_any] = True
|
||||||
|
|
||||||
|
|
||||||
|
def link(src: str, dst: str, default: bool = True):
|
||||||
|
_pkginfo[_current_pkgname][_key_links] += [
|
||||||
|
{
|
||||||
|
"from": src,
|
||||||
|
"to": dst,
|
||||||
|
"default": default,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
|
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
|
||||||
global _supported_arch
|
global _supported_arch
|
||||||
if isinstance(s, list):
|
if isinstance(s, list):
|
||||||
|
|||||||
@@ -16,10 +16,24 @@ def build():
|
|||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
package("aws-lc")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
package("aws-lc-bin")
|
def pack_libcrypto(composer):
|
||||||
|
composer.makedir("lib")
|
||||||
|
composer.addfile("lib/libcrypto.so", "lib/libcrypto.so")
|
||||||
|
|
||||||
|
|
||||||
|
def pack_libssl(composer):
|
||||||
|
composer.makedir("lib")
|
||||||
|
composer.addfile("lib/libssl.so", "lib/libssl.so")
|
||||||
|
|
||||||
|
|
||||||
|
package("aws-lc-libcrypto")
|
||||||
|
on_pack(pack_libcrypto)
|
||||||
|
|
||||||
|
package("aws-lc-libssl")
|
||||||
|
on_pack(pack_libssl)
|
||||||
|
|
||||||
|
package("aws-lc-tools")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("aws-lc-dev")
|
package("aws-lc-dev")
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
upstream_version = "1.0.8"
|
||||||
|
|
||||||
|
version(f"{upstream_version}")
|
||||||
|
source_url(f"https://sourceware.org/pub/bzip2/bzip2-{upstream_version}.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.make(["-f", "Makefile-libbz2_so"])
|
||||||
|
cpp.make_install(["PREFIX=../cpp_install"], chdir=False)
|
||||||
|
shutil.copy2(f"libbz2.so.{upstream_version}", "../cpp_install/lib/libbz2.so")
|
||||||
|
os.chdir("../cpp_install")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libbzip2")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("bzip2")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libbzip2-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -3,6 +3,7 @@ from lib.make import *
|
|||||||
|
|
||||||
version("0.9.0")
|
version("0.9.0")
|
||||||
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.9.0.tar.gz")
|
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.9.0.tar.gz")
|
||||||
|
block_hook("autolink")
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
@@ -11,6 +12,89 @@ def build():
|
|||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
functions = [
|
||||||
|
"[",
|
||||||
|
"b2sum",
|
||||||
|
"base32",
|
||||||
|
"base64",
|
||||||
|
"basename",
|
||||||
|
"basenc",
|
||||||
|
"cat",
|
||||||
|
"cksum",
|
||||||
|
"comm",
|
||||||
|
"cp",
|
||||||
|
"csplit",
|
||||||
|
"cut",
|
||||||
|
"date",
|
||||||
|
"dd",
|
||||||
|
"df",
|
||||||
|
"dir",
|
||||||
|
"dircolors",
|
||||||
|
"dirname",
|
||||||
|
"du",
|
||||||
|
"echo",
|
||||||
|
"env",
|
||||||
|
"expand",
|
||||||
|
"expr",
|
||||||
|
"factor",
|
||||||
|
"false",
|
||||||
|
"fmt",
|
||||||
|
"fold",
|
||||||
|
"head",
|
||||||
|
"join",
|
||||||
|
"link",
|
||||||
|
"ln",
|
||||||
|
"ls",
|
||||||
|
"md5sum",
|
||||||
|
"mkdir",
|
||||||
|
"mktemp",
|
||||||
|
"more",
|
||||||
|
"mv",
|
||||||
|
"nl",
|
||||||
|
"numfmt",
|
||||||
|
"od",
|
||||||
|
"paste",
|
||||||
|
"pathchk",
|
||||||
|
"pr",
|
||||||
|
"printenv",
|
||||||
|
"printf",
|
||||||
|
"ptx",
|
||||||
|
"pwd",
|
||||||
|
"readlink",
|
||||||
|
"realpath",
|
||||||
|
"rm",
|
||||||
|
"rmdir",
|
||||||
|
"seq",
|
||||||
|
"sha1sum",
|
||||||
|
"sha224sum",
|
||||||
|
"sha256sum",
|
||||||
|
"sha384sum",
|
||||||
|
"sha512sum",
|
||||||
|
"shred",
|
||||||
|
"shuf",
|
||||||
|
"sleep",
|
||||||
|
"sort",
|
||||||
|
"split",
|
||||||
|
"sum",
|
||||||
|
"tac",
|
||||||
|
"tail",
|
||||||
|
"tee",
|
||||||
|
"test",
|
||||||
|
"touch",
|
||||||
|
"tr",
|
||||||
|
"true",
|
||||||
|
"truncate",
|
||||||
|
"tsort",
|
||||||
|
"tty",
|
||||||
|
"unexpand",
|
||||||
|
"uniq",
|
||||||
|
"unlink",
|
||||||
|
"vdir",
|
||||||
|
"wc",
|
||||||
|
"yes",
|
||||||
|
]
|
||||||
|
|
||||||
package("coreutils")
|
package("coreutils")
|
||||||
|
for func in functions:
|
||||||
|
link(f"bin/coreutils", f"/bin/{func}")
|
||||||
rust.use_auto_pack(["bin"])
|
rust.use_auto_pack(["bin"])
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import lib.rust as rust
|
||||||
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("diffutils")
|
||||||
|
rust.use_auto_pack(["bin"])
|
||||||
|
link("bin/diffutils", "/bin/cmp")
|
||||||
|
link("bin/diffutils", "/bin/diff")
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.8.1")
|
||||||
|
source_url(
|
||||||
|
"https://github.com/libexpat/libexpat/releases/download/R_2_8_1/expat-2.8.1.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.cmake()
|
||||||
|
cpp.ninja()
|
||||||
|
cpp.ninja_install()
|
||||||
|
os.chdir("usr")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libexpat")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libexpat-tools")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libexpat-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import lib.rust as rust
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("0.9.0")
|
||||||
|
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.9.0.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
rust.build()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
package("findutils")
|
||||||
|
rust.use_auto_pack(["bin"])
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("1.34")
|
||||||
|
source_url("https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.meson_setup()
|
||||||
|
cpp.meson_compile()
|
||||||
|
cpp.meson_install()
|
||||||
|
os.chdir("usr")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libkmod")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("kmod")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libkmod-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -18,7 +18,7 @@ on_build(build)
|
|||||||
package("libarchive")
|
package("libarchive")
|
||||||
cpp.use_auto_pack(["lib"])
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
package("libarchive-bin")
|
package("libarchive-tools")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("libarchive-dev")
|
package("libarchive-dev")
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,76 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
import lib.arch as arch
|
||||||
|
import lib.cpp as cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
upstream_version = "6.18.35"
|
||||||
|
|
||||||
|
version(f"{upstream_version}")
|
||||||
|
source_url(
|
||||||
|
f"https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-{upstream_version}.tar.xz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def get_arch():
|
||||||
|
return arch.get_target().split("-")[0].replace("aarch64", "arm64")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
makeopts = [f"ARCH={get_arch()}", "LLVM=1"]
|
||||||
|
config_name = get_arch()
|
||||||
|
if os.environ.get("LINUX_VARIANT"):
|
||||||
|
config_name += "-" + os.environ["LINUX_VARIANT"]
|
||||||
|
config_file = "../../configs/config." + config_name
|
||||||
|
|
||||||
|
shutil.copy2(config_file, ".config")
|
||||||
|
|
||||||
|
cpp.make(makeopts + ["olddefconfig"])
|
||||||
|
cpp.make(makeopts)
|
||||||
|
cpp.make(["headers_install", "INSTALL_HDR_PATH=../kheaders_install"])
|
||||||
|
cpp.make(["install", "INSTALL_PATH=../kimage_install"])
|
||||||
|
cpp.make(
|
||||||
|
["modules_install", "INSTALL_MOD_STRIP=1", "INSTALL_MOD_PATH=../kmod_install"]
|
||||||
|
)
|
||||||
|
os.remove(f"../kmod_install/lib/modules/{upstream_version}/build")
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
base_name = "linux"
|
||||||
|
if os.environ.get("LINUX_VARIANT"):
|
||||||
|
base_name += "-" + os.environ["LINUX_VARIANT"]
|
||||||
|
|
||||||
|
|
||||||
|
def pack_linux_dev(composer):
|
||||||
|
composer.add_dir(
|
||||||
|
"../kheaders_install/include",
|
||||||
|
"include",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
package(f"{base_name}-dev")
|
||||||
|
on_pack(pack_linux_dev)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_linux(composer):
|
||||||
|
try:
|
||||||
|
composer.addfile(f"../kimage_install/vmlinux-{upstream_version}", "vmlinux")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
composer.addfile(f"../kimage_install/vmlinuz-{upstream_version}", "vmlinuz")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
composer.addfile(
|
||||||
|
f"../kimage_install/System.map-{upstream_version}", "System.map"
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
composer.add_dir(f"../kmod_install/lib/modules/{upstream_version}", "modules")
|
||||||
|
|
||||||
|
|
||||||
|
package(f"{base_name}")
|
||||||
|
on_pack(pack_linux)
|
||||||
@@ -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"])
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import lib.cpp as cpp
|
||||||
|
from lib import arch
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.5.1")
|
||||||
|
source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=/",
|
||||||
|
f"--with-system-libdir=/lib:/lib/{arch.get_target()}",
|
||||||
|
f"--with-system-includedir=/lib/{arch.get_target()}/include",
|
||||||
|
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libpkgconf")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("pkgconf")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("libpkgconf-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import lib.arch as arch
|
||||||
from lib.cpp import *
|
from lib.cpp import *
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
@@ -14,8 +15,13 @@ def build():
|
|||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def musl_target():
|
||||||
|
return arch.get_target().split("-")[0]
|
||||||
|
|
||||||
|
|
||||||
package("semi-libc")
|
package("semi-libc")
|
||||||
use_auto_pack(["lib"])
|
use_auto_pack(["lib"])
|
||||||
|
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
|
||||||
|
|
||||||
package("semi-libc-dev")
|
package("semi-libc-dev")
|
||||||
use_auto_pack(["dev"])
|
use_auto_pack(["dev"])
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ def build():
|
|||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
package("sqlite")
|
package("libsqlite")
|
||||||
cpp.use_auto_pack(["lib"])
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
package("sqlite-bin")
|
package("sqlite")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("sqlite-dev")
|
package("libsqlite-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("5.8.3")
|
||||||
|
source_url(
|
||||||
|
"https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(["--prefix=/"])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("liblzma")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("xz")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
|
package("liblzma-dev")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -16,11 +16,11 @@ def build():
|
|||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
package("zlib-ng")
|
package("libz-ng")
|
||||||
cpp.use_auto_pack(["lib"])
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
package("zlib-ng-bin")
|
package("zlib-ng-tools")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("zlib-ng-dev")
|
package("libz-ng-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ def build():
|
|||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|
||||||
package("zstd")
|
package("libzstd")
|
||||||
cpp.use_auto_pack(["lib"])
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
package("zstd-bin")
|
package("zstd")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
|
|
||||||
package("zstd-dev")
|
package("libzstd-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import importlib
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
import typing
|
||||||
|
|
||||||
import hooks
|
import hooks
|
||||||
import lib.arch
|
import lib.arch
|
||||||
@@ -29,6 +30,18 @@ else:
|
|||||||
lib.arch.set_target(lib.arch.get_target())
|
lib.arch.set_target(lib.arch.get_target())
|
||||||
|
|
||||||
|
|
||||||
|
def run_hooks(map, arg: typing.Any = None):
|
||||||
|
current_dir = os.getcwd()
|
||||||
|
for n in map.keys():
|
||||||
|
if n in lib.make._blocked_hooks:
|
||||||
|
continue
|
||||||
|
if arg:
|
||||||
|
map[n](arg)
|
||||||
|
else:
|
||||||
|
map[n]()
|
||||||
|
os.chdir(current_dir)
|
||||||
|
|
||||||
|
|
||||||
def run_build_package(package: str):
|
def run_build_package(package: str):
|
||||||
try:
|
try:
|
||||||
os.chdir(f"packages/{package}")
|
os.chdir(f"packages/{package}")
|
||||||
@@ -47,11 +60,7 @@ def run_build_package(package: str):
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Run `pre_build` hooks
|
# Run `pre_build` hooks
|
||||||
for n in hooks.pre_build.keys():
|
run_hooks(hooks.pre_build)
|
||||||
if n in lib.make._blocked_hooks:
|
|
||||||
continue
|
|
||||||
hooks.pre_build[n]()
|
|
||||||
os.chdir(package_dir)
|
|
||||||
|
|
||||||
# Build the package
|
# Build the package
|
||||||
if lib.make._on_build:
|
if lib.make._on_build:
|
||||||
@@ -61,12 +70,7 @@ def run_build_package(package: str):
|
|||||||
print("on_build(): Not defined")
|
print("on_build(): Not defined")
|
||||||
|
|
||||||
# Run `post_build` hooks
|
# Run `post_build` hooks
|
||||||
post_build_dir = os.getcwd()
|
run_hooks(hooks.post_build)
|
||||||
for n in hooks.post_build.keys():
|
|
||||||
if n in lib.make._blocked_hooks:
|
|
||||||
continue
|
|
||||||
hooks.post_build[n]()
|
|
||||||
os.chdir(post_build_dir)
|
|
||||||
|
|
||||||
# Pack packages
|
# Pack packages
|
||||||
for pkgname in lib.make._pkginfo.keys():
|
for pkgname in lib.make._pkginfo.keys():
|
||||||
@@ -89,10 +93,14 @@ def run_build_package(package: str):
|
|||||||
|
|
||||||
pkginfo[lib.make._key_on_pack](composer)
|
pkginfo[lib.make._key_on_pack](composer)
|
||||||
|
|
||||||
|
# Run post_pack hooks
|
||||||
|
run_hooks(hooks.post_pack, composer)
|
||||||
|
|
||||||
manifest = {
|
manifest = {
|
||||||
"name": pkgname,
|
"name": pkgname,
|
||||||
"version": pkgver,
|
"version": pkgver,
|
||||||
"arch": pkgarch,
|
"arch": pkgarch,
|
||||||
|
"links": pkginfo[lib.make._key_links],
|
||||||
}
|
}
|
||||||
composer.write_manifest(manifest)
|
composer.write_manifest(manifest)
|
||||||
composer.compose()
|
composer.compose()
|
||||||
|
|||||||
Reference in New Issue
Block a user