forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7ff9d9742 | ||
|
|
c9627305c2 | ||
|
|
69adb4a599 | ||
|
|
7076f76481 | ||
|
|
bc23a14b1a | ||
|
|
5b78c48d8e | ||
|
|
36ceb91590 | ||
|
|
f24ea2d4bf | ||
|
|
b4aa642b52 | ||
|
|
9eb4453f3a | ||
|
|
132c47e419 | ||
|
|
596b055467 | ||
|
|
4b842d43be | ||
|
|
7f1ee4b598 | ||
|
|
15eb054209 | ||
|
|
16a1087785 |
+16
-1
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from lib.common import treedir
|
from lib.common import treedir
|
||||||
@@ -32,11 +33,25 @@ def make(rem: list[str] = []):
|
|||||||
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
subprocess.run(["make", f"-j{os.cpu_count()}"] + rem, check=True)
|
||||||
|
|
||||||
|
|
||||||
def make_install(rem: list[str] | None = None, chdir: bool = True):
|
def make_install(rem: list[str] | None = None, chdir: bool = True, move: bool = True):
|
||||||
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
|
default_rem = ["DESTDIR=" + os.getcwd() + "/../cpp_install"]
|
||||||
|
if rem is None:
|
||||||
|
try:
|
||||||
|
shutil.rmtree("../cpp_install")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
subprocess.run(["make", "install"] + (rem or default_rem), check=True)
|
subprocess.run(["make", "install"] + (rem or default_rem), check=True)
|
||||||
if rem is None and chdir:
|
if rem is None and chdir:
|
||||||
os.chdir("../cpp_install")
|
os.chdir("../cpp_install")
|
||||||
|
if chdir and move:
|
||||||
|
subprocess.run(
|
||||||
|
["sh", "-c", "cp -r ./pkg/*@*/* . 2>/dev/null || true"], check=False
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
["sh", "-c", "cp -r ./usr/local/* . 2>/dev/null || true"], check=False
|
||||||
|
)
|
||||||
|
subprocess.run(["sh", "-c", "cp -r ./usr/* . 2>/dev/null || true"], check=False)
|
||||||
|
subprocess.run(["rm", "-rf", "./pkg", "./usr"], check=False)
|
||||||
|
|
||||||
|
|
||||||
def ninja(rem: list[str] = []):
|
def ninja(rem: list[str] = []):
|
||||||
|
|||||||
@@ -72,6 +72,15 @@ def link(src: str, dst: str, default: bool = True):
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_prefix(pkgname: str) -> str:
|
||||||
|
pkginfo = _pkginfo[pkgname]
|
||||||
|
if pkginfo.get(_key_arch_any):
|
||||||
|
pkgarch = "any"
|
||||||
|
else:
|
||||||
|
pkgarch = arch.get_target()
|
||||||
|
return f"/pkg/{pkgname}={pkginfo[_key_version]}@{pkgarch}"
|
||||||
|
|
||||||
|
|
||||||
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):
|
||||||
|
|||||||
+7
-1
@@ -23,7 +23,13 @@ class PkgComposer:
|
|||||||
|
|
||||||
def write_manifest(self, manifest: dict):
|
def write_manifest(self, manifest: dict):
|
||||||
with open(self.workdir + "/PkgManifest.json", "w") as f:
|
with open(self.workdir + "/PkgManifest.json", "w") as f:
|
||||||
json.dump(manifest, f, indent=4)
|
json.dump(manifest, f)
|
||||||
|
|
||||||
|
def write_links(self, links: list[dict]):
|
||||||
|
with open(self.workdir + "/_links", "w") as f:
|
||||||
|
for link in links:
|
||||||
|
json.dump(link, f)
|
||||||
|
f.write("\n")
|
||||||
|
|
||||||
def compose(self):
|
def compose(self):
|
||||||
shutil.make_archive(self.pkgfile, _archive_format, self.workdir)
|
shutil.make_archive(self.pkgfile, _archive_format, self.workdir)
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2026.4.26")
|
||||||
|
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.make()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.addfile("a.out", "bin/awk")
|
||||||
|
|
||||||
|
|
||||||
|
package("awk")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/crypto/x509/x509_def.c
|
||||||
|
+++ b/crypto/x509/x509_def.c
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
// TODO(fork): cleanup
|
||||||
|
|
||||||
|
-#define OPENSSLDIR "/etc/ssl"
|
||||||
|
+#define OPENSSLDIR "/var/config/ssl"
|
||||||
|
|
||||||
|
#define X509_CERT_AREA OPENSSLDIR
|
||||||
|
#define X509_CERT_DIR OPENSSLDIR "/certs"
|
||||||
@@ -3,8 +3,8 @@ import os
|
|||||||
import lib.cpp as cpp
|
import lib.cpp as cpp
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
version("5.0.0")
|
version("5.1.0")
|
||||||
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.0.0.tar.gz")
|
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.1.0.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
VERSION = "5.48"
|
||||||
|
|
||||||
|
version(VERSION)
|
||||||
|
source_git("https://github.com/file/file.git", "FILE5_48")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
subprocess.run(["autoreconf", "-fiv"], check=True)
|
||||||
|
cpp.configure(["--prefix=/", f"--datadir=/share/file"])
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_magic_db(composer):
|
||||||
|
composer.add_dir(f"share/file", "share")
|
||||||
|
|
||||||
|
|
||||||
|
package("file-magic-db")
|
||||||
|
arch_any()
|
||||||
|
link("share/misc/magic.mgc", "/share/file/misc/magic.mgc")
|
||||||
|
on_pack(pack_magic_db)
|
||||||
|
|
||||||
|
|
||||||
|
package("libmagic")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("file-magic-db (same-version) @any")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libmagic-dev")
|
||||||
|
dep("libmagic (same)")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|
||||||
|
package("file")
|
||||||
|
dep("libmagic (same)")
|
||||||
|
cpp.use_auto_pack(["bin"])
|
||||||
@@ -6,7 +6,7 @@ source_url("https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz")
|
|||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
cpp.configure(["--prefix=/"])
|
cpp.configure([f"--prefix={get_prefix('gnu-make')}"])
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
|
|||||||
def build():
|
def build():
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.chdir("usr")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
@@ -11,7 +11,16 @@ source_url(
|
|||||||
|
|
||||||
def build():
|
def build():
|
||||||
os.chdir("source")
|
os.chdir("source")
|
||||||
cpp.configure(["--enable-plugins", "--prefix=/"])
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--enable-plugins",
|
||||||
|
"--prefix=/",
|
||||||
|
f"--bindir={get_prefix('icu4c')}/bin",
|
||||||
|
f"--sbindir={get_prefix('icu4c')}/sbin",
|
||||||
|
f"--libdir={get_prefix('libicu4c')}/lib",
|
||||||
|
f"--includedir={get_prefix('libicu4c-dev')}/include",
|
||||||
|
]
|
||||||
|
)
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,14 @@ source_url(
|
|||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
cpp.configure(["--prefix=/"])
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=/",
|
||||||
|
f"--bindir={get_prefix('libarchive-tools')}/bin",
|
||||||
|
f"--libdir={get_prefix('libarchive')}/lib",
|
||||||
|
f"--includedir={get_prefix('libarchive-dev')}/include",
|
||||||
|
]
|
||||||
|
)
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("3.6.0")
|
||||||
|
source_url(
|
||||||
|
"https://github.com/libffi/libffi/releases/download/v3.6.0/libffi-3.6.0.tar.gz"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('libffi')}/lib",
|
||||||
|
f"--includedir={get_prefix('libffi-dev')}/include",
|
||||||
|
"--enable-portable-binary",
|
||||||
|
"--disable-multi-os-directory",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
cpp.make()
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
package("libffi")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
cpp.use_auto_pack(["lib"])
|
||||||
|
|
||||||
|
package("libffi-dev")
|
||||||
|
dep("libffi (same)")
|
||||||
|
cpp.use_auto_pack(["dev"])
|
||||||
@@ -12,7 +12,6 @@ def build():
|
|||||||
cpp.configure()
|
cpp.configure()
|
||||||
cpp.make([f"CC={os.environ['CC']}"])
|
cpp.make([f"CC={os.environ['CC']}"])
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.chdir("usr/local")
|
|
||||||
subprocess.run(["sh", "-c", "chmod +w bin/* sbin/*"], check=True)
|
subprocess.run(["sh", "-c", "chmod +w bin/* sbin/*"], check=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ def build():
|
|||||||
cpp.configure(
|
cpp.configure(
|
||||||
[
|
[
|
||||||
"--prefix=/",
|
"--prefix=/",
|
||||||
|
f"--bindir={get_prefix('ncurses-tools')}/bin",
|
||||||
|
f"--sbindir={get_prefix('ncurses-tools')}/sbin",
|
||||||
|
f"--libdir={get_prefix('libncurses')}/lib",
|
||||||
|
f"--includedir={get_prefix('libncurses')}/include",
|
||||||
"--enable-pc-files",
|
"--enable-pc-files",
|
||||||
"--with-shared",
|
"--with-shared",
|
||||||
"--with-terminfo-dirs=/share/terminfo",
|
"--with-terminfo-dirs=/share/terminfo",
|
||||||
@@ -33,7 +37,6 @@ def build():
|
|||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.unlink("lib/terminfo")
|
os.unlink("lib/terminfo")
|
||||||
os.rename("usr/lib/pkgconfig", "lib/pkgconfig")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("19")
|
||||||
|
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.make([f"CC={os.environ['CC']}"])
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack(composer):
|
||||||
|
composer.makedir("bin")
|
||||||
|
composer.addfile("vi", "bin/vi")
|
||||||
|
|
||||||
|
|
||||||
|
package("neatvi")
|
||||||
|
provide("vi")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
on_pack(pack)
|
||||||
@@ -10,6 +10,9 @@ def build():
|
|||||||
cpp.configure(
|
cpp.configure(
|
||||||
[
|
[
|
||||||
"--prefix=/",
|
"--prefix=/",
|
||||||
|
f"--bindir={get_prefix('pkgconf')}/bin",
|
||||||
|
f"--libdir={get_prefix('libpkgconf')}/lib",
|
||||||
|
f"--includedir={get_prefix('libpkgconf-dev')}/include",
|
||||||
f"--with-system-libdir=/lib:/lib/{arch.get_target()}",
|
f"--with-system-libdir=/lib:/lib/{arch.get_target()}",
|
||||||
f"--with-system-includedir=/lib/{arch.get_target()}/include",
|
f"--with-system-includedir=/lib/{arch.get_target()}/include",
|
||||||
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
|
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ def build():
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
cpp.make()
|
cpp.make()
|
||||||
try:
|
|
||||||
shutil.rmtree("../cpp_install")
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.rename(
|
os.rename(
|
||||||
f"lib/{arch.get_target()}/python{VERSION_BASE}", f"lib/python{VERSION_BASE}"
|
f"lib/{arch.get_target()}/python{VERSION_BASE}", f"lib/python{VERSION_BASE}"
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ def build():
|
|||||||
cpp.configure(
|
cpp.configure(
|
||||||
[
|
[
|
||||||
"--prefix=/",
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('libsqlite')}/lib",
|
||||||
|
f"--bindir={get_prefix('sqlite')}/bin",
|
||||||
|
f"--includedir={get_prefix('libsqlite-dev')}/include",
|
||||||
"--all",
|
"--all",
|
||||||
"--with-linenoise=/pkg/linenoise-dev=2.0@any",
|
"--with-linenoise=/pkg/linenoise-dev=2.0@any",
|
||||||
"--icu-collations",
|
"--icu-collations",
|
||||||
|
|||||||
@@ -8,7 +8,14 @@ source_url(
|
|||||||
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
cpp.configure(["--prefix=/"])
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=/",
|
||||||
|
f"--libdir={get_prefix('liblzma')}/lib",
|
||||||
|
f"--bindir={get_prefix('xz')}/bin",
|
||||||
|
f"--includedir={get_prefix('liblzma-dev')}/include",
|
||||||
|
]
|
||||||
|
)
|
||||||
cpp.make()
|
cpp.make()
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ def build():
|
|||||||
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
|
cpp.cmake(["-DZLIB_COMPAT=ON", "-DINSTALL_UTILS=ON"])
|
||||||
cpp.ninja()
|
cpp.ninja()
|
||||||
cpp.ninja_install()
|
cpp.ninja_install()
|
||||||
os.chdir("usr")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ source_url(
|
|||||||
def build():
|
def build():
|
||||||
cpp.make(["HAVE_ZLIB=0", "HAVE_LZMA=0", "HAVE_LZ4=0"])
|
cpp.make(["HAVE_ZLIB=0", "HAVE_LZMA=0", "HAVE_LZ4=0"])
|
||||||
cpp.make_install()
|
cpp.make_install()
|
||||||
os.chdir("usr/local")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
|
|||||||
@@ -107,11 +107,11 @@ def run_build_package(package: str):
|
|||||||
"name": pkgname,
|
"name": pkgname,
|
||||||
"version": pkgver,
|
"version": pkgver,
|
||||||
"arch": pkgarch,
|
"arch": pkgarch,
|
||||||
"links": pkginfo[lib.make._key_links],
|
|
||||||
"dependencies": pkginfo[lib.make._key_dependencies],
|
"dependencies": pkginfo[lib.make._key_dependencies],
|
||||||
"provides": pkginfo[lib.make._key_provides],
|
"provides": pkginfo[lib.make._key_provides],
|
||||||
}
|
}
|
||||||
composer.write_manifest(manifest)
|
composer.write_manifest(manifest)
|
||||||
|
composer.write_links(pkginfo[lib.make._key_links])
|
||||||
composer.compose()
|
composer.compose()
|
||||||
|
|
||||||
# Build success
|
# Build success
|
||||||
|
|||||||
Reference in New Issue
Block a user