forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0b40ef774 |
@@ -30,45 +30,6 @@ def download(url, output):
|
|||||||
last_percent = percent
|
last_percent = percent
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if url.startswith("file://"):
|
|
||||||
file_path = url[7:]
|
|
||||||
if not os.path.exists(file_path):
|
|
||||||
raise Exception("File not found: " + file_path)
|
|
||||||
|
|
||||||
total_size = os.path.getsize(file_path)
|
|
||||||
if total_size <= 0:
|
|
||||||
print("Copying...")
|
|
||||||
with open(file_path, "rb") as src, open(output, "wb") as dst:
|
|
||||||
while True:
|
|
||||||
chunk = src.read(8192)
|
|
||||||
if not chunk:
|
|
||||||
break
|
|
||||||
dst.write(chunk)
|
|
||||||
print("Download completed: " + output)
|
|
||||||
return output
|
|
||||||
|
|
||||||
sys.stdout.write("downloading... 0%")
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
with open(file_path, "rb") as src, open(output, "wb") as dst:
|
|
||||||
downloaded = 0
|
|
||||||
block_size = 8192
|
|
||||||
while True:
|
|
||||||
chunk = src.read(block_size)
|
|
||||||
if not chunk:
|
|
||||||
break
|
|
||||||
dst.write(chunk)
|
|
||||||
downloaded += len(chunk)
|
|
||||||
percent = int(downloaded * 100 / total_size)
|
|
||||||
report_progress(percent)
|
|
||||||
|
|
||||||
if last_percent != 100:
|
|
||||||
report_progress(100)
|
|
||||||
|
|
||||||
sys.stdout.write("\n")
|
|
||||||
print("Download completed: " + output)
|
|
||||||
return output
|
|
||||||
|
|
||||||
req = urllib.request.Request(url, method="GET")
|
req = urllib.request.Request(url, method="GET")
|
||||||
req.add_header(
|
req.add_header(
|
||||||
"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
|
"User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
from lib import arch, cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
upstream_version = "1.2.16.1"
|
|
||||||
|
|
||||||
version(upstream_version)
|
|
||||||
source_url("https://www.alsa-project.org/files/pub/lib/alsa-lib-1.2.16.1.tar.bz2")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.configure(
|
|
||||||
[
|
|
||||||
"--prefix=/",
|
|
||||||
f"--libdir={get_prefix('alsa-lib')}/lib",
|
|
||||||
f"--includedir={get_prefix('alsa-lib-dev')}/include",
|
|
||||||
"--enable-symbolic-functions",
|
|
||||||
f"--with-configdir={get_prefix('alsa-lib')}/share/alsa",
|
|
||||||
f"--with-plugindir=/lib/{arch.get_target()}/alsa/plugins",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
cpp.make()
|
|
||||||
cpp.make_install()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_alsa_lib(composer):
|
|
||||||
composer.makedir("lib")
|
|
||||||
for i in [
|
|
||||||
"libasound.so",
|
|
||||||
"libasound.so.2",
|
|
||||||
"libasound.so.2.0.0",
|
|
||||||
"libatopology.so",
|
|
||||||
"libatopology.so.2",
|
|
||||||
"libatopology.so.2.0.0",
|
|
||||||
]:
|
|
||||||
composer.addfile(f"lib/{i}", f"lib/{i}")
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add_dir("share/alsa", "share/alsa")
|
|
||||||
|
|
||||||
|
|
||||||
package("alsa-lib")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
on_pack(pack_alsa_lib)
|
|
||||||
|
|
||||||
package("alsa-lib-dev")
|
|
||||||
dep("alsa-lib (same)")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib import cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("1.2.0")
|
|
||||||
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.cmake()
|
|
||||||
cpp.ninja()
|
|
||||||
cpp.ninja_install()
|
|
||||||
os.chdir("usr")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
package("libbrotli")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
package("brotli")
|
|
||||||
dep("libbrotli (same)")
|
|
||||||
cpp.use_auto_pack(["bin"])
|
|
||||||
|
|
||||||
package("libbrotli-dev")
|
|
||||||
dep("libbrotli (same)")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("2026.7.4")
|
|
||||||
source_url(
|
|
||||||
"https://gitea.semilabs.org/semios/ca-certificates/releases/download/v2026.07.04/ca-certificates-2026.07.04.tar"
|
|
||||||
)
|
|
||||||
|
|
||||||
block_hook("autolink")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
for i in os.listdir("."):
|
|
||||||
link(f"share/ca-certificates/{i}", f"/share/ca-certificates/{i}")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack(composer):
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add_dir(".", "share/ca-certificates")
|
|
||||||
|
|
||||||
|
|
||||||
package("ca-certificates")
|
|
||||||
arch_any()
|
|
||||||
on_pack(pack)
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
from lib import rust
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("0.1.0")
|
|
||||||
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
rust.build()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
package("certutil")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
rust.use_auto_pack(["bin"])
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib import cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("0.3.3")
|
|
||||||
source_url(
|
|
||||||
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.make(["LIBINTL=musl"])
|
|
||||||
cpp.make_install(
|
|
||||||
["LIBINTL=musl", "DESTDIR=../cpp_install", "prefix=/"], chdir=False, move=False
|
|
||||||
)
|
|
||||||
os.chdir("../cpp_install")
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
package("libintl-dev")
|
|
||||||
dep("semi-libc-dev @same-arch")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
|
|
||||||
package("gettext")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["bin"])
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
from lib import cpp
|
||||||
|
from lib.make import *
|
||||||
|
|
||||||
|
version("2.55.0")
|
||||||
|
source_url("https://www.kernel.org/pub/software/scm/git/git-2.55.0.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
def build():
|
||||||
|
cpp.configure(
|
||||||
|
[
|
||||||
|
"--prefix=",
|
||||||
|
"--with-gitconfig=/var/config/git/config.ini",
|
||||||
|
"--with-gitattributes=/var/config/git/attributes.txt",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
cpp.make(["RUNTIME_PREFIX=YesPlease"])
|
||||||
|
cpp.make_install()
|
||||||
|
|
||||||
|
|
||||||
|
on_build(build)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_git(composer):
|
||||||
|
composer.add_dir("bin", "bin")
|
||||||
|
composer.add_dir("libexec", "libexec")
|
||||||
|
composer.makedir("share")
|
||||||
|
composer.add_dir("share/git-core", "share/git-core")
|
||||||
|
composer.add_dir("share/gitweb", "share/gitweb")
|
||||||
|
composer.add_dir("share/perl5", "share/perl5")
|
||||||
|
|
||||||
|
|
||||||
|
package("git")
|
||||||
|
dep("semi-libc @same-arch")
|
||||||
|
dep("libz @same-arch")
|
||||||
|
on_pack(pack_git)
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
from lib import cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("7.1.0")
|
|
||||||
source_git("https://git.kernel.org/pub/scm/network/iproute2/iproute2.git", "v7.1.0")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.configure()
|
|
||||||
cpp.make()
|
|
||||||
cpp.make_install()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_iproute2(composer):
|
|
||||||
composer.makedirs("lib/iproute2")
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add_dir("sbin", "bin")
|
|
||||||
composer.add_dir("share/iproute2", "share/iproute2")
|
|
||||||
composer.add_dir("lib/tc", "lib/iproute2/tc")
|
|
||||||
|
|
||||||
|
|
||||||
package("iproute2")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
on_pack(pack_iproute2)
|
|
||||||
|
|
||||||
package("iproute2-dev")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
Binary file not shown.
@@ -1,37 +0,0 @@
|
|||||||
import os
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("0.1.0")
|
|
||||||
source_url(f"file://{os.getcwd()}/empty.tar")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
subprocess.run(
|
|
||||||
os.environ.get("CC", "cc").split(" ")
|
|
||||||
+ [
|
|
||||||
"-shared",
|
|
||||||
"-o",
|
|
||||||
"libgcc_s.so.1",
|
|
||||||
"-Wl,--no-as-needed",
|
|
||||||
"-lunwind",
|
|
||||||
"-Wl,--no-undefined",
|
|
||||||
"-Wl,-soname,libgcc_s.so.1",
|
|
||||||
],
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack(composer):
|
|
||||||
composer.makedir("lib")
|
|
||||||
composer.addfile("libgcc_s.so.1", "lib/libgcc_s.so.1")
|
|
||||||
|
|
||||||
|
|
||||||
package("libgcc-compat")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
dep("libunwind @same-arch")
|
|
||||||
on_pack(pack)
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
from lib import cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("1.6.1")
|
|
||||||
source_url("https://downloads.xiph.org/releases/opus/opus-1.6.1.tar.gz")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.configure(
|
|
||||||
[
|
|
||||||
"--prefix=/",
|
|
||||||
f"--libdir={get_prefix('libopus')}/lib",
|
|
||||||
f"--includedir={get_prefix('libopus-dev')}/include",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
cpp.make()
|
|
||||||
cpp.make_install()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
package("libopus")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
package("libopus-dev")
|
|
||||||
dep("libopus (same)")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
import os
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
from lib import arch, cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
upstream_version = "5.42.2"
|
|
||||||
|
|
||||||
version(upstream_version)
|
|
||||||
source_url("https://www.cpan.org/src/5.0/perl-5.42.2.tar.gz")
|
|
||||||
|
|
||||||
block_hook("autolink")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
subprocess.run(
|
|
||||||
[
|
|
||||||
"./Configure",
|
|
||||||
"-de",
|
|
||||||
f"-Dcc={os.environ.get('CC', 'cc')}",
|
|
||||||
f"-Doptimize={os.environ.get('CFLAGS', '')}",
|
|
||||||
"-Dusethreads",
|
|
||||||
"-Duseshrplib",
|
|
||||||
"-Dprefix=/",
|
|
||||||
"-Dvendorprefix=/",
|
|
||||||
f"-Dprivlib={get_prefix('libperl')}/share/core_perl",
|
|
||||||
f"-Darchlib={get_prefix('libperl')}/lib/core_perl",
|
|
||||||
f"-Dsitelib=/lib/{arch.get_target()}/perl5/site_perl",
|
|
||||||
f"-Dsitearch=/lib/{arch.get_target()}/perl5/site_arch",
|
|
||||||
f"-Dvendorlib=/lib/{arch.get_target()}/perl5/vendor_perl",
|
|
||||||
f"-Dvendorarch=/lib/{arch.get_target()}/perl5/vendor_arch",
|
|
||||||
f"-Dscriptdir={get_prefix('perl')}/bin/core_perl",
|
|
||||||
"-Dsitescript=/bin/site_perl",
|
|
||||||
"-Dvendorscript=/bin/vendor_perl",
|
|
||||||
"-Dinc_version_list=none",
|
|
||||||
"-Dman1dir=/share/man/man1",
|
|
||||||
"-Dman3dir=/share/man/man3",
|
|
||||||
"-Dman1ext=1perl",
|
|
||||||
"-Dman3ext=3perl",
|
|
||||||
f"-Dlddlflags=-shared {os.environ.get('LDFLAGS', '')}",
|
|
||||||
f"-Dldflags={os.environ.get('LDFLAGS', '')}",
|
|
||||||
],
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
cpp.make()
|
|
||||||
cpp.make_install()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_libperl(composer):
|
|
||||||
composer.makedir("lib")
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add_dir("lib/core_perl", "lib/core_perl")
|
|
||||||
composer.add_dir("share/core_perl", "share/core_perl")
|
|
||||||
|
|
||||||
|
|
||||||
package("libperl")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
on_pack(pack_libperl)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_perl(composer):
|
|
||||||
composer.add_dir("bin", "bin")
|
|
||||||
|
|
||||||
|
|
||||||
package("perl")
|
|
||||||
dep("libperl (same)")
|
|
||||||
cpp.use_auto_pack(["bin"])
|
|
||||||
link("bin/perl", "/bin/perl")
|
|
||||||
link(f"bin/perl{upstream_version}", f"/bin/perl{upstream_version}")
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
from lib import cpp
|
|
||||||
from lib.make import *
|
|
||||||
|
|
||||||
version("1.4.6")
|
|
||||||
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.configure(
|
|
||||||
[
|
|
||||||
"--prefix=/",
|
|
||||||
f"--bindir={get_prefix('rhash-tools')}/bin",
|
|
||||||
f"--libdir={get_prefix('librhash')}/lib",
|
|
||||||
"--disable-gettext",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
cpp.make()
|
|
||||||
cpp.make_install()
|
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
package("librhash")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
package("rhash-tools")
|
|
||||||
dep("librhash (same)")
|
|
||||||
cpp.use_auto_pack(["bin"])
|
|
||||||
|
|
||||||
package("librhash-dev")
|
|
||||||
dep("librhash (same)")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
from lib import arch, cpp
|
import lib.arch as arch
|
||||||
|
from lib.cpp import *
|
||||||
from lib.make import *
|
from lib.make import *
|
||||||
|
|
||||||
version("1.2.6+1")
|
|
||||||
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6-1.tar.gz")
|
|
||||||
|
|
||||||
|
version("1.2.6")
|
||||||
|
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6.tar.gz")
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
cpp.configure(["--prefix=/"])
|
configure(["--prefix=/"])
|
||||||
cpp.make()
|
make()
|
||||||
cpp.make_install()
|
make_install()
|
||||||
|
|
||||||
|
|
||||||
on_build(build)
|
on_build(build)
|
||||||
@@ -19,10 +20,9 @@ def musl_target():
|
|||||||
|
|
||||||
|
|
||||||
package("semi-libc")
|
package("semi-libc")
|
||||||
cpp.use_auto_pack(["lib"])
|
use_auto_pack(["lib"])
|
||||||
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
|
link("lib/libc.so", f"/lib/ld-musl-{musl_target()}.so.1")
|
||||||
link("lib/libc.so", "/bin/ldd")
|
|
||||||
|
|
||||||
package("semi-libc-dev")
|
package("semi-libc-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
use_auto_pack(["dev"])
|
||||||
dep("semi-libc (same)")
|
dep("semi-libc (same)")
|
||||||
|
|||||||
Reference in New Issue
Block a user