feat: add managed sources

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
sisungo committed 2026-10-08 14:45:25 +00:00
1 parent f9d11cb263
commit 86503b46ec
95 files changed
+548 -363

No files matched your search

+1
View File
@@ -0,0 +1 @@
from . import arch, atombuild, make, packie, pkgcomposer, sources, managed_source
+1 -3
View File
@@ -9,7 +9,6 @@ all: dict[str, dict[str, str]] = {
"CFLAGS": "-O3 -flto=thin",
"CXXFLAGS": "-O3 -flto=thin",
"LDFLAGS": "-flto=thin",
"RUSTFLAGS": "-Clto=thin -Ccodegen-units=1",
},
"x86_64-semios-linux": {
"CC": "clang -target x86_64-unknown-linux-musl",
@@ -17,7 +16,7 @@ all: dict[str, dict[str, str]] = {
"CFLAGS": "-O3 -march=x86-64-v3 -flto=thin",
"CXXFLAGS": "-O3 -march=x86-64-v3 -flto=thin",
"LDFLAGS": "-flto=thin",
"RUSTFLAGS": "-Ctarget-cpu=x86_64-v3 -Clto=thin -Ccodegen-units=1",
"RUSTFLAGS": "-Ctarget-cpu=x86_64-v3",
},
"riscv64-semios-linux": {
"CC": "clang -target riscv64-unknown-linux-musl",
@@ -25,7 +24,6 @@ all: dict[str, dict[str, str]] = {
"CFLAGS": "-O3 -flto=thin",
"CXXFLAGS": "-O3 -flto=thin",
"LDFLAGS": "-flto=thin",
"RUSTFLAGS": "-Clto=thin -Ccodegen-units=1",
},
}
_target: str = packie.host_arch()
+1 -1
View File
@@ -92,7 +92,7 @@ def prepare_build_env(root: str, extreq: list[str] = []):
def enter_build_env(root: str, cmd: list[str], chdir: str = "/"):
reserve_env = ["https_proxy", "http_proxy", "all_proxy"]
reserve_env = ["https_proxy", "http_proxy", "all_proxy", "SEMIOS_SOURCE_REPO"]
reserve_env_args = []
for i in reserve_env:
if os.environ.get(i):
+15 -4
View File
@@ -4,7 +4,7 @@ import os
from lib import arch
from . import pkgcomposer, sources
from . import pkgcomposer, sources, managed_source
_key_global = "@global"
_key_version = "version"
@@ -18,6 +18,9 @@ _key_recommendations = "recommendations"
_key_provides = "provides"
_key_configure = "configure"
_managed_source_url = None
_managed_source_postprocess = ""
_current_pkgname: str = _key_global
_pkginfo: dict[str, dict[str, typing.Any]] = {
_key_global: {
@@ -32,7 +35,7 @@ _pkginfo: dict[str, dict[str, typing.Any]] = {
_supported_arch: typing.Callable[[str], bool] = lambda x: True
_on_build: typing.Callable[[], None] | None = None
_in_atombuild = False
_dry_run = False
_builddep: list[str] = []
_blocked_hooks: list[str] = []
@@ -155,14 +158,22 @@ def block_hook(hook: str):
def source_url(url: str):
if not _in_atombuild:
if not _dry_run:
sources.source_url(url)
def source_git(url: str, branch: str | None = None):
if not _in_atombuild:
if not _dry_run:
sources.source_git(url, branch)
def source_managed(s: str, postprocess: str = ""):
global _managed_source_url, _managed_source_postprocess
_managed_source_url = s
_managed_source_postprocess = postprocess
if not _dry_run:
sources.source_url(managed_source.get_repo_url(s))
def in_atomic():
return os.environ.get("SEMIOS_PKGBUILD_IN_ATOMIC", "0") == "1"
+165
View File
@@ -0,0 +1,165 @@
import os
import subprocess
import glob
import urllib.request
import json
from urllib.parse import urlparse
from . import sources
DEFAULT_REPO="https://mirror1.semilabs.org/semios/sources"
def postprocess_rust():
subprocess.run(["cargo", "vendor"], check=True)
os.makedirs(".cargo", exist_ok=True)
with open(".cargo/config.toml", "a+") as fd:
fd.write(
"[source.crates-io]\nreplace-with = 'vendored-sources'\n[source.vendored-sources]\ndirectory = 'vendor'\n",
)
def postprocess_autotools():
if os.path.exists("autogen.sh"):
subprocess.run(["sh", "autogen.sh"], check=True)
else:
subprocess.run(["autoreconf", "-fiv"], check=True)
subprocess.run(["./configure"], check=False)
subprocess.run(["make", "dist"], check=True)
tarballs = glob.glob("*.tar.*z")
if len(tarballs) == 0:
raise RuntimeError("No dist tarballs found.")
subprocess.run(["tar", "xf", tarballs[0]], check=True)
os.chdir(tarballs[0].replace(".tar.gz", "").replace(".tar.xz", ""))
def get_origin_url(s):
url = urlparse(s)
if url.scheme == "github":
return f"https://github.com/{url.hostname}{url.path}/archive/refs/tags/{url.fragment}.tar.gz"
elif url.scheme == "gitea":
return f"https://{url.hostname}{url.path}/archive/{url.fragment}.tar.gz"
elif url.scheme == "gitlab":
return f"https://{url.hostname}/{url.path}/-/archive/{url.fragment}/{url.path.split('/')[1]}-{url.fragment}.tar.gz"
elif url.scheme == "pypi":
pkgname = url.hostname
return f"https://files.pythonhosted.org/packages/source/{pkgname[0]}/{pkgname}/{pkgname}-{url.fragment}.tar.gz"
else:
raise RuntimeError(f"Unsupported scheme \"{url.scheme}\"")
def get_updates(s):
user_agent = "SemiOS Ports Update Checker"
url = urlparse(s)
if url.scheme == "github":
current_version = url.fragment
api_url = f"https://api.github.com/repos/{url.hostname}{url.path}/releases/latest"
api_req = urllib.request.Request(api_url, headers = {
"Accept": "application/vnd.github+json",
"User-Agent": user_agent,
})
try:
with urllib.request.urlopen(api_req) as resp:
release = json.load(resp)
except Exception as err:
return "[INVALID] Failed to fetch releases: " + str(err)
latest = release["tag_name"]
if latest == current_version:
return "[OK] Already the latest."
return "[OLD] Version is old, latest is " + latest
elif url.scheme == "gitea":
current_version = url.fragment
api_url = f"https://{url.hostname}/api/v1/repos{url.path}/releases/latest"
api_req = urllib.request.Request(api_url, headers = {
"Accept": "application/json",
"User-Agent": user_agent,
})
try:
with urllib.request.urlopen(api_req) as resp:
release = json.load(resp)
except Exception as err:
return "[INVALID] Failed to fetch releases: " + str(err)
latest = release["tag_name"]
if latest == current_version:
return "[OK] Already the latest."
return "[OLD] Version is old, latest is " + latest
elif url.scheme == "gitlab":
current_version = url.fragment
project_path = url.path.strip("/")
encoded_path = urllib.parse.quote(project_path, safe='')
api_url = f"https://{url.hostname}/api/v4/projects/{encoded_path}/repository/tags?per_page=1"
api_req = urllib.request.Request(api_url, headers={
"Accept": "application/json",
"User-Agent": user_agent,
})
try:
with urllib.request.urlopen(api_req) as resp:
tags = json.load(resp)
except Exception as err:
return "[INVALID] Failed to fetch tags: " + str(err)
if not tags:
return "[INVALID] No tags found."
latest = tags[0]["name"]
if latest == current_version:
return "[OK] Already the latest."
return "[OLD] Version is old, latest is " + latest
elif url.scheme == "pypi":
current_version = url.fragment
package_name = url.hostname
api_url = f"https://pypi.org/pypi/{package_name}/json"
api_req = urllib.request.Request(api_url, headers={
"Accept": "application/json",
"User-Agent": user_agent,
})
try:
with urllib.request.urlopen(api_req) as resp:
data = json.load(resp)
except Exception as err:
return "[INVALID] Failed to fetch releases: " + str(err)
latest = data["info"]["version"]
if latest == current_version:
return "[OK] Already the latest."
return "[OLD] Version is old, latest is " + latest
else:
return "[INVALID] Not supported to get updates for this package."
def get_repo_filename(s):
url = urlparse(s)
if url.scheme == "github":
ghname = f"{url.hostname}-{url.path.replace('/', '')}"
return f"github-{ghname}-{url.fragment}.tar.zst"
elif url.scheme == "gitea":
gitea_name = url.path.replace('/', '-')
gitea_host = url.hostname.split('.')[-2]
return f"{gitea_host}{gitea_name}-{url.fragment}.tar.zst"
elif url.scheme == "gitlab":
gitlab_name = url.path.replace('/', '-')
gitlab_host = url.hostname.split('.')[-2]
return f"{gitlab_host}{gitlab_name}-{url.fragment}.tar.zst"
elif url.scheme == "pypi":
return f"pypi-{url.hostname}-{url.fragment}.tar.zst"
else:
raise RuntimeError(f"Unsupported scheme \"{url.scheme}\"")
def get_repo_url(s):
repo_url = os.environ.get("SEMIOS_SOURCE_REPO", DEFAULT_REPO)
return f"{repo_url}/{get_repo_filename(s)}"
def create_srcpkg(s, postprocess="") -> str:
origin_url = get_origin_url(s)
origin_dir = sources.download_decompress(origin_url)
os.chdir(origin_dir)
for program in postprocess.split(','):
program = program.strip()
if program == "":
continue
elif program == "rust":
postprocess_rust()
elif program == "autotools":
postprocess_autotools()
else:
raise RuntimeError(f"Unknown postprocessor \"{program}\"")
subprocess.run(["tar", "cpf", "../srcpkg.tar", "--numeric-owner", "."], check=True)
os.chdir("../")
subprocess.run(["zstd", "-q", "-f", "-o", get_repo_filename(s), "srcpkg.tar"], check=True)
return os.getcwd() + "/" + get_repo_filename(s)
+13 -8
View File
@@ -52,14 +52,7 @@ def zip_common_root(zip_file: zipfile.ZipFile) -> str | None:
return root
def sources_dir_name() -> str:
with open("./target/sources.tag") as file:
return file.read()
def source_url(url: str):
if os.path.exists("./target/sources.tag"):
return
def download_decompress(url: str) -> str:
download_path = f"./target/{filename(url)}"
download(url, download_path)
@@ -83,6 +76,18 @@ def source_url(url: str):
with tarfile.open(download_path, "r") as tar:
tar.extractall(extract_dir)
return sources_dir
def sources_dir_name() -> str:
with open("./target/sources.tag") as file:
return file.read()
def source_url(url: str):
if os.path.exists("./target/sources.tag"):
return
sources_dir = download_decompress(url)
with open("./target/sources.tag", "wt+") as file:
file.write(sources_dir)
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import python
python.version("1.4.1")
description("A super-fast templating language that borrows the best ideas from the existing templating languages.")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/2a/12/b5fa2353e2754cd67fb9f83793fa48ff42c213a5da7e719869d2301f6ab8/mako-1.4.1.tar.gz")
source_managed("pypi://mako#1.4.1")
python.builddep("$shortcut")
python.builddep("MarkupSafe.py")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("3.0.3")
description("Safely add untrusted strings to HTML/XML markup.")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz")
source_managed("pypi://markupsafe#3.0.3")
python.builddep("$shortcut")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("6.0.3")
description("YAML parser and emitter for Python")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz")
source_managed("pypi://pyyaml#6.0.3")
python.builddep("$shortcut")
+7 -7
View File
@@ -1,27 +1,27 @@
from lib.make import *
from lib import cpp
version("1.4.357.0")
description("SPIR-V headers")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz")
source_managed("github://KhronosGroup/SPIRV-Headers#vulkan-sdk-1.4.357.0")
builddep("shortcut/cmake")
builddep("shortcut/c")
def build():
cpp.cmake([f"-DCMAKE_INSTALL_PREFIX={get_prefix('spirv-headers')}"])
cpp.ninja()
cpp.ninja_install()
on_build(build)
def pack(composer):
composer.add_dir("include", "include")
composer.add_dir("share", "lib")
package("spirv-headers")
on_pack(pack)
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, packie
version("22.1.5")
description("A tool and a library for bi-directional translation between SPIR-V and LLVM IR")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v22.1.5.tar.gz")
source_managed("github://KhronosGroup/SPIRV-LLVM-Translator#v22.1.5")
builddep("shortcut/cmake")
builddep("shortcut/c++")
+1 -1
View File
@@ -10,7 +10,7 @@ sdk_version = "1.4.357.0"
version(sdk_version)
description("an API and commands for processing SPIR-V modules")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.357.0.tar.gz")
source_managed("github://KhronosGroup/SPIRV-Tools#vulkan-sdk-1.4.357.0")
builddep("shortcut/cmake")
builddep("shortcut/c++")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.1.0-alpha.1")
description("SemiOS system account service & utilities")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/account/archive/0.1.0-alpha.1.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/account#0.1.0-alpha.1", "rust")
builddep("shortcut/rust")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.1.0-alpha.3")
description("AirBoot Linux initramfs generator.")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/airboot-linux-stage2/archive/0.1.0-alpha.3.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/airboot-linux-stage2#0.1.0-alpha.3")
def build():
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.10.9")
description("Modern, portable and fast implementation of service supervisor and the init daemon.")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/sisungo/airup/archive/refs/tags/v0.10.9.tar.gz")
source_managed("github://sisungo/airup#v0.10.9", "rust")
builddep("shortcut/rust")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("2026.4.26")
description("The One True Awk programming language")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz")
source_managed("github://onetrueawk/awk#20260426")
builddep("shortcut/c")
builddep("shortcut/autotools")
+19 -13
View File
@@ -1,12 +1,14 @@
import os
import shutil
import lib.cpp as cpp
from lib.make import *
version("5.5.0")
description("a general-purpose cryptographic library maintained by the AWS Cryptography team")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/aws/aws-lc/archive/refs/tags/v5.5.0.tar.gz")
source_managed("github://aws/aws-lc#v5.5.0")
builddep("shortcut/c++")
builddep("shortcut/cmake")
@@ -16,24 +18,28 @@ def _fix_pc(name, prefix):
filepath = f"lib/pkgconfig/{name}.pc"
with open(filepath, "r") as f:
content = f.read()
new_content = content.replace("prefix=/", f"prefix={prefix}").replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
content = content.replace("prefix=/", f"prefix={prefix}")
content = content.replace("libdir=${prefix}/usr/lib64", "libdir=${prefix}/lib")
content = content.replace("libdir=${prefix}/usr/lib", "libdir=${prefix}/lib")
with open(filepath, "w") as f:
f.write(new_content)
f.write(content)
def build():
cpp.cmake(
[
"-DBUILD_SHARED_LIBS=1",
"-DBUILD_TESTING=OFF",
"-DDISABLE_GO=ON",
"-DDISABLE_PERL=ON",
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
]
)
cpp.cmake([
"-DBUILD_SHARED_LIBS=1",
"-DBUILD_TESTING=OFF",
"-DDISABLE_GO=ON",
"-DDISABLE_PERL=ON",
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('aws-lc-dev')}/include",
])
cpp.ninja()
cpp.ninja_install()
if os.path.exists("lib64"):
if os.path.exists("lib"):
shutil.rmtree("lib")
os.rename("lib64", "lib")
_fix_pc("libssl", get_prefix("aws-lc-libssl"))
_fix_pc("libcrypto", get_prefix("aws-lc-libcrypto"))
+7 -9
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("7.0.3")
description("An implementation of the POSIX bc calculator with GNU extensions and dc")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/gavinhoward/bc/releases/download/7.0.3/bc-7.0.3.tar.gz")
source_managed("github://gavinhoward/bc#7.0.3")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -14,14 +14,12 @@ def build():
predefined_build_type = "GDH"
if "-linux" in arch.get_target():
predefined_build_type = "GNU"
cpp.configure(
[
"--disable-nls",
"--opt=3",
f"--predefined-build-type={predefined_build_type}",
f"--prefix={get_prefix('bc')}",
]
)
cpp.configure([
"--disable-nls",
"--opt=3",
f"--predefined-build-type={predefined_build_type}",
f"--prefix={get_prefix('bc')}",
])
cpp.make()
cpp.make_install()
+5 -9
View File
@@ -3,9 +3,8 @@ import os
from lib import cpp
from lib.make import *
VERSION = "2026.6.19"
version(VERSION)
version("2026.6.19")
description("The BSD make utility ported to non-BSD systems")
maintainer("sisungo <[email protected]>")
source_url("https://www.crufty.net/ftp/pub/sjg/bmake-20260619.tar.gz")
@@ -16,16 +15,13 @@ builddep("bc")
def build():
cpp.configure(
[
"--prefix=/",
f"--with-default-sys-path=/pkg/bmake={VERSION}@{arch.get_target()}/share/mk",
]
)
cpp.configure([
"--prefix=/",
f"--with-default-sys-path={get_prefix('bmake')}/share/mk",
])
cpp.make()
cpp.make_install()
on_build(build)
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("1.2.0")
description("Brotli compression format")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz")
source_managed("github://google/brotli#v1.2.0")
builddep("shortcut/c")
builddep("shortcut/cmake")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("1.5.0")
description("A simple, correct Python build frontend")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/78/e0/df5e171f685f82f37b12e1f208064e24244911079d7b767447d1af7e0d70/build-1.5.0.tar.gz")
source_managed("pypi://build#1.5.0")
python.builddep("$shortcut")
python.builddep("packaging.py (>=25.0)")
+10 -14
View File
@@ -4,28 +4,24 @@ from lib.make import *
version("1.34.8")
description("A C library for asynchronous DNS requests")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/c-ares/c-ares/releases/download/v1.34.8/c-ares-1.34.8.tar.gz"
)
source_managed("github://c-ares/c-ares#v1.34.8")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("shortcut/cmake")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libcares')}/lib",
f"--includedir={get_prefix('libcares-dev')}/include",
]
)
cpp.make()
cpp.make_install()
cpp.cmake([
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libcares')}/lib",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libcares-dev')}/include",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libcares")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import rust
version("0.98.0")
description("The Rust package manager")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/rust-lang/cargo/archive/refs/tags/0.98.0.tar.gz")
source_managed("github://rust-lang/cargo#0.98.0", "rust")
builddep("shortcut/c")
builddep("cargo")
+3 -2
View File
@@ -1,10 +1,11 @@
from lib import rust
from lib.make import *
version("0.1.0")
description("SemiOS certification utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/certutil/archive/v0.1.0.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/certutil#v0.1.0", "rust")
builddep("shortcut/rust")
@@ -12,9 +13,9 @@ builddep("shortcut/rust")
def build():
rust.build()
on_build(build)
package("certutil")
dep("semi-libc @same-arch")
rust.use_auto_pack(["bin"])
+4 -2
View File
@@ -1,10 +1,12 @@
import lib.rust as rust
from lib.make import *
version("0.10.0")
description("system core utilities")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/coreutils/archive/refs/tags/0.10.0.tar.gz")
source_managed("github://uutils/coreutils#0.10.0", "rust")
block_hook("autolink")
builddep("shortcut/rust")
@@ -13,9 +15,9 @@ builddep("shortcut/rust")
def build():
rust.build(["--features", "unix"])
on_build(build)
functions = [
"[",
"arch",
+2
View File
@@ -1,6 +1,7 @@
from lib.make import *
from lib import cpp
version("1.37")
description("Linux D-Bus Message Broker")
maintainer("sisungo <[email protected]>")
@@ -20,6 +21,7 @@ def build():
on_build(build)
package("dbus-broker")
dep("semi-libc @same-arch")
provide("dbus-daemon")
+2 -1
View File
@@ -3,10 +3,11 @@ import os
from lib.make import *
from lib import cpp
version("1.16.2")
description("a message bus system, a simple way for applications to talk to one another")
maintainer("sisungo <[email protected]>")
source_url("https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz")
source_managed("gitlab://gitlab.freedesktop.org/dbus/dbus#dbus-1.16.2")
builddep("shortcut/c")
builddep("shortcut/meson")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("0.5.0")
description("utility to compute difference between text files")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/diffutils/archive/refs/tags/v0.5.0.tar.gz")
source_managed("github://uutils/diffutils#v0.5.0", "rust")
builddep("shortcut/rust")
+2 -3
View File
@@ -7,15 +7,14 @@ from lib.make import *
version("2.8.3")
description("Fast streaming XML parser written in C99")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libexpat/libexpat/releases/download/R_2_8_3/expat-2.8.3.tar.gz"
)
source_managed("github://libexpat/libexpat#R_2_8_3")
builddep("shortcut/c")
builddep("shortcut/cmake")
def build():
os.chdir("expat")
cpp.cmake([
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libexpat')}/lib",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libexpat-dev')}/include",
+1 -2
View File
@@ -8,7 +8,7 @@ VERSION = "5.48"
version(VERSION)
description("utility to infer file type and information")
maintainer("sisungo <[email protected]>")
source_git("https://github.com/file/file.git", "FILE5_48")
source_managed("github://file/file#FILE5_48", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -19,7 +19,6 @@ builddep(f"libbzip2-dev @{arch.get_target()}")
def build():
subprocess.run(["autoreconf", "-fiv"], check=True)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libmagic')}/lib",
+1 -2
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("0.10.0")
description("implementation of the UNIX findutils")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/uutils/findutils/archive/refs/tags/0.10.0.tar.gz")
source_managed("github://uutils/findutils#0.10.0", "rust")
builddep("shortcut/rust")
@@ -12,7 +12,6 @@ builddep("shortcut/rust")
def build():
rust.build()
on_build(build)
+7 -8
View File
@@ -1,10 +1,11 @@
from lib import cpp
from lib.make import *
version("2.6.4")
description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz")
source_managed("github://westes/flex#v2.6.4", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -12,18 +13,16 @@ builddep("m4")
def build():
cpp.configure(
[
f"--prefix={get_prefix('flex')}",
"--disable-nls",
]
)
cpp.configure([
f"--prefix={get_prefix('flex')}",
"--disable-nls",
])
cpp.make()
cpp.make_install()
on_build(build)
package("flex")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin", "lib", "dev"])
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("2.18.3")
description("a library for configuring and customizing font access")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.18.3/fontconfig-2.18.3.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/fontconfig/fontconfig#2.18.3")
builddep("shortcut/c")
builddep("shortcut/meson")
+4 -4
View File
@@ -10,10 +10,10 @@ source_url("https://download.savannah.gnu.org/releases/freetype/freetype-2.14.3.
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("pkgconf")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"libpng-dev @{arch.get_target()}")
builddep(f"libbrotli-dev @{arch.get_target()}")
builddep("libz-ng-dev @target")
builddep("libbzip2-dev @target")
builddep("libpng-dev @target")
builddep("libbrotli-dev @target")
def build():
+1 -3
View File
@@ -6,9 +6,7 @@ from lib.make import *
version("0.3.3")
description("small implementation of gettext and libintl")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
)
source_managed("github://sabotage-linux/gettext-tiny#v0.3.3")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -1
View File
@@ -8,7 +8,7 @@ from lib import cpp, arch
version("16.5.0")
description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/KhronosGroup/glslang/archive/refs/tags/16.5.0.tar.gz")
source_managed("github://KhronosGroup/glslang#16.5.0")
builddep("shortcut/cmake")
builddep("shortcut/c++")
+1 -2
View File
@@ -7,7 +7,7 @@ from lib import cpp, arch
version("1.86.0")
description("to describe the APIs and collect them in a uniform, machine readable format")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.gnome.org/GNOME/gobject-introspection/-/archive/1.86.0/gobject-introspection-1.86.0.tar.gz")
source_managed("gitlab://gitlab.gnome.org/GNOME/gobject-introspection#1.86.0")
builddep("shortcut/meson")
builddep("shortcut/c")
@@ -46,4 +46,3 @@ dep("python @same-arch")
dep("setuptools.py @same-arch")
dep("glib-dev @same-arch")
on_pack(pack)
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("1.3.15")
description("Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/silnrsi/graphite/releases/download/1.3.15/graphite2-1.3.15.tgz")
source_managed("github://silnrsi/graphite#1.3.15")
builddep("shortcut/c++")
builddep("shortcut/cmake")
+4 -4
View File
@@ -5,13 +5,13 @@ from lib.make import *
version("15.1.3")
description("SemiOS file pattern searcher")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/grep/archive/v15.1.3.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/grep#v15.1.3")
builddep("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}")
builddep("libpcre2-dev @target")
builddep("pcre2-tools")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep("libbzip2-dev @target")
builddep("libz-ng-dev @target")
def build():
+3 -3
View File
@@ -5,12 +5,12 @@ from lib import cpp
version("3.5.2")
description("an interactive process viewer")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/htop-dev/htop/releases/download/3.5.2/htop-3.5.2.tar.xz")
source_managed("github://htop-dev/htop#3.5.2", "autotools")
builddep("shortcut/autotools")
builddep("shortcut/c")
builddep(f"libncurses-dev @{arch.get_target()}")
builddep(f"linux-dev @{arch.get_target()}")
builddep("libncurses-dev @target")
builddep("linux-dev @target")
def build():
+4 -1
View File
@@ -4,10 +4,13 @@ import lib
from lib.make import *
version("0.1.0-alpha.1")
description("SemiOS init scripts")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/init-scripts/archive/0.1.0-alpha.1.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/init-scripts#0.1.0-alpha.1")
builddep("gnu-sed")
def build():
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("1.0.1")
description("A library for installing Python wheels.")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/06/fe/b9f481cf0cc867958a21338baa900357b7b7d86cac9b025948049d77923c/installer-1.0.1.tar.gz")
source_managed("pypi://installer#1.0.1")
python.builddep("$shortcut")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("1.34")
description("a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz")
source_managed("github://kmod-project/kmod#v34")
builddep("shortcut/c")
builddep("shortcut/meson")
+7 -6
View File
@@ -1,14 +1,15 @@
from lib import arch, cpp
from lib.make import *
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libncurses-dev @{arch.get_target()}")
version("704")
version("710")
description("a free, open-source file pager")
maintainer("sisungo <[email protected]>")
source_url("https://www.greenwoodsoftware.com/less/less-704.tar.gz")
source_url("https://www.greenwoodsoftware.com/less/less-710.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("libncurses-dev @target")
def build():
@@ -16,9 +17,9 @@ def build():
cpp.make()
cpp.make_install()
on_build(build)
package("less")
dep("semi-libc @same-arch")
dep("libncurses @same-arch")
+17 -20
View File
@@ -1,37 +1,34 @@
import lib.cpp as cpp
from lib.make import *
version("3.8.9")
description("Multi-format archive and compression library")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libarchive/libarchive/releases/download/v3.8.9/libarchive-3.8.9.tar.gz"
)
source_managed("github://libarchive/libarchive#v3.8.9")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"aws-lc-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libzstd-dev @{arch.get_target()}")
builddep(f"libbzip2-dev @{arch.get_target()}")
builddep(f"liblzma-dev @{arch.get_target()}")
builddep("shortcut/cmake")
builddep("aws-lc-dev @target")
builddep("libz-ng-dev @target")
builddep("libzstd-dev @target")
builddep("libbzip2-dev @target")
builddep("liblzma-dev @target")
def build():
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_install()
cpp.cmake([
"-DCMAKE_INSTALL_PREFIX=/",
f"-DCMAKE_INSTALL_BINDIR={get_prefix('libarchive-tools')}/bin",
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libarchive')}/lib",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libarchive-dev')}/include",
])
cpp.ninja()
cpp.ninja_install()
on_build(build)
package("libarchive")
cpp.use_auto_pack(["lib"])
dep("libcrypto@same-arch")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import cpp, arch
version("2.4.134")
description("libdrm Direct Rendering Manager library and headers")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/mesa/libdrm/-/archive/libdrm-2.4.134/libdrm-libdrm-2.4.134.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/mesa/libdrm#libdrm-2.4.134")
builddep("shortcut/meson")
builddep("shortcut/c")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("1.13.7")
description("Wrapper library for evdev devices")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/libevdev/libevdev/-/archive/libevdev-1.13.7/libevdev-libevdev-1.13.7.tar.gz?ref_type=tags")
source_managed("gitlab://gitlab.freedesktop.org/libevdev/libevdev#libevdev-1.13.7")
builddep("shortcut/c")
builddep("shortcut/meson")
+9 -13
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("3.7.1")
description("A portable foreign-function interface library")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/libffi/libffi/releases/download/v3.7.1/libffi-3.7.1.tar.gz"
)
source_managed("github://libffi/libffi#v3.7.1", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -14,21 +12,19 @@ builddep(f"linux-dev @{arch.get_target()}")
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.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"])
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.2.0")
description("provides compatibility objects to gcc runtime libraries")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/libgcc-compat/archive/v0.2.0.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/libgcc-compat#v0.2.0")
builddep("shortcut/c")
builddep(f"libunwind-dev @{arch.get_target()}")
+1 -2
View File
@@ -7,7 +7,7 @@ from lib import cpp
version("1.7.0")
description("The GL Vendor-Neutral Dispatch library")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v1.7.0/libglvnd-v1.7.0.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/glvnd/libglvnd#v1.7.0")
builddep("shortcut/meson")
builddep("shortcut/c")
@@ -99,4 +99,3 @@ on_pack(lambda composer: pack_librun(composer, "libOpenGL"))
package("libopengl-dev")
dep("libopengl (same)")
on_pack(lambda composer: pack_libdev(composer, "libopengl", "opengl.pc", ["GL"]))
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("238")
description("Input device management and event handling library")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.gnome.org/GNOME/libgudev/-/archive/238/libgudev-238.tar.gz")
source_managed("gitlab://gitlab.gnome.org/GNOME/libgudev#238")
builddep("shortcut/c")
builddep("shortcut/meson")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("1.30.4")
description("Input device management and event handling library")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.30.4/libinput-1.30.4.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/libinput/libinput#1.30.4")
builddep("shortcut/c")
builddep("shortcut/meson")
+2
View File
@@ -6,6 +6,8 @@ from lib.make import *
upstream_version = "3.2.25"
version(upstream_version)
description("Netlink protocol library suite")
maintainer("sisungo <[email protected]>")
source_url("https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz")
builddep("shortcut/c")
+7 -8
View File
@@ -5,25 +5,24 @@ version("1.3.6")
description("Ogg container format libraries")
maintainer("sisungo <[email protected]>")
source_url("https://downloads.xiph.org/releases/ogg/libogg-1.3.6.tar.xz")
source_managed("gitlab://gitlab.xiph.org/xiph/ogg#v1.3.6", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libogg')}/lib",
f"--includedir={get_prefix('libogg-dev')}/include",
]
)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libogg')}/lib",
f"--includedir={get_prefix('libogg-dev')}/include",
])
cpp.make()
cpp.make_install()
on_build(build)
package("libogg")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
+6 -8
View File
@@ -11,19 +11,17 @@ builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libopus')}/lib",
f"--includedir={get_prefix('libopus-dev')}/include",
]
)
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"])
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("1.6.58")
description("the official PNG reference library")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.58.tar.gz")
source_managed("github://pnggroup/libpng#v1.6.58")
builddep("shortcut/c")
builddep("shortcut/autotools")
+12 -14
View File
@@ -1,34 +1,32 @@
from lib import cpp, arch
from lib.make import *
version("0.23.1")
description("C library for the Public Suffix List")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
)
source_url("https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep(f"libicu4c-dev @{arch.get_target()}")
builddep("libicu4c-dev @target")
builddep("pkgconf")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libpsl')}/lib",
f"--includedir={get_prefix('libpsl-dev')}/include",
"--disable-nls",
"--enable-runtime=libicu",
]
)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libpsl')}/lib",
f"--includedir={get_prefix('libpsl-dev')}/include",
"--disable-nls",
"--enable-runtime=libicu",
])
cpp.make()
cpp.make_install()
on_build(build)
package("libpsl")
dep("semi-libc @same-arch")
dep("libicu4c @same-arch")
+6 -9
View File
@@ -12,18 +12,15 @@ builddep("libogg-dev @target")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libvorbis')}/lib",
f"--includedir={get_prefix('libvorbis-dev')}/include",
"--disable-oggtest",
]
)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libvorbis')}/lib",
f"--includedir={get_prefix('libvorbis-dev')}/include",
"--disable-oggtest",
])
cpp.make()
cpp.make_install()
on_build(build)
package("libvorbis")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("2.19.1")
description("libwacom is a tablet description library")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/linuxwacom/libwacom/releases/download/libwacom-2.19.1/libwacom-2.19.1.tar.xz")
source_managed("github://linuxwacom/libwacom#libwacom-2.19.1")
builddep("shortcut/c")
builddep("shortcut/meson")
+1 -1
View File
@@ -8,7 +8,7 @@ from lib import cpp
version("1.6.0")
description("a library to encode and decode images in WebP format")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/webmproject/libwebp/archive/refs/tags/v1.6.0.tar.gz")
source_managed("github://webmproject/libwebp#v1.6.0")
builddep("shortcut/c")
builddep("shortcut/cmake")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import cpp, arch
version("1.14.0-beta.1")
description("keymap handling library for toolkits and window systems")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.14.0-beta1.tar.gz")
source_managed("github://xkbcommon/libxkbcommon#xkbcommon-1.14.0-beta2")
builddep("shortcut/c")
builddep("shortcut/meson")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("2.15.3")
description("an XML toolkit implemented in C, originally developed for the GNOME Project")
maintainer("sisungo <[email protected]>")
source_url("https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz")
source_managed("gitlab://gitlab.gnome.org/GNOME/libxml2#v2.15.4", "autotools")
builddep("shortcut/autotools")
builddep("shortcut/c")
+1 -1
View File
@@ -3,7 +3,7 @@ from lib.make import *
version("2.0")
description("A small self-contained alternative to readline and libedit")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/antirez/linenoise/archive/refs/tags/2.0.tar.gz")
source_managed("github://antirez/linenoise#2.0")
on_build(lambda: None)
+1 -3
View File
@@ -11,9 +11,7 @@ upstream_version = "7.2.3"
version(f"{upstream_version}")
description("the Linux operating system kernel")
maintainer("sisungo <[email protected]>")
source_url(
f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{upstream_version}.tar.xz"
)
source_url(f"https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-{upstream_version}.tar.xz")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.1.0-alpha.5")
description("Linux device userspace daemon.")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/lxdeviced/archive/0.1.0-alpha.5.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/lxdeviced#0.1.0-alpha.5", "rust")
builddep("shortcut/rust")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("1.12.0")
description("The Meson Build System")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/mesonbuild/meson/releases/download/1.12.0/meson-1.12.0.tar.gz")
source_managed("github://mesonbuild/meson#1.12.0")
builddep("python")
+1 -3
View File
@@ -5,9 +5,7 @@ from lib.make import *
version("1.59.2")
description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/mirabilos/mksh-cvs2git/archive/refs/tags/mksh-R59c.tar.gz"
)
source_managed("github://mirabilos/mksh-cvs2git#mksh-R59c")
builddep("shortcut/c")
builddep("gnu-sed")
+27 -26
View File
@@ -1,4 +1,5 @@
import os
import glob
from lib import cpp
from lib.make import *
@@ -13,34 +14,34 @@ builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--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",
"--with-shared",
f"--with-terminfo-dirs={get_prefix('ncurses-terminfo')}/share/terminfo:/share/terminfo",
"--enable-symlinks",
"--enable-sp-funcs",
"--enable-ext-colors",
"--enable-rgb-color",
"--enable-ext-mouse",
"--enable-ext-putwin",
"--enable-no-padding",
"--enable-sigwinch",
"--enable-tcap-names",
"--with-pthread",
"--enable-pthreads-eintr",
"--enable-weak-symbols",
"--enable-reentrant",
"--without-develop",
]
)
cpp.configure([
"--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",
"--with-shared",
f"--with-terminfo-dirs={get_prefix('ncurses-terminfo')}/share/terminfo:/share/terminfo",
"--enable-symlinks",
"--enable-sp-funcs",
"--enable-ext-colors",
"--enable-rgb-color",
"--enable-ext-mouse",
"--enable-ext-putwin",
"--enable-no-padding",
"--enable-sigwinch",
"--enable-tcap-names",
"--with-pthread",
"--enable-pthreads-eintr",
"--enable-weak-symbols",
"--enable-reentrant",
"--without-develop",
])
cpp.make()
cpp.make_install()
for i in glob.glob("lib/*w.so*"):
os.symlink(i.replace("lib/", ""), i.replace("w.", "."))
os.unlink("lib/terminfo")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("19")
description("A vi/ex editor for editing UTF-8 text")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/aligrudi/neatvi/archive/refs/tags/19.tar.gz")
source_managed("github://aligrudi/neatvi#19")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("5.3")
description("A small vi/ex terminal text editor (neatvi rewrite)")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/kyx0r/nextvi/archive/refs/tags/5.3.tar.gz")
source_managed("github://kyx0r/nextvi#5.3")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -3
View File
@@ -5,9 +5,7 @@ from lib.make import *
version("1.70.0")
description("nghttp2 - HTTP/2 C Library and tools")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
)
source_managed("github://nghttp2/nghttp2#v1.70.0")
builddep("shortcut/c++")
builddep("shortcut/cmake")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("1.13.2")
description("a small build system with a focus on speed")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/ninja-build/ninja/archive/refs/tags/v1.13.2.tar.gz")
source_managed("github://ninja-build/ninja#v1.13.2")
builddep("shortcut/c++")
builddep("sed")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("26.3")
description("Core utilities for Python packages")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz")
source_managed("pypi://packaging#26.3")
python.builddep("$shortcut")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("0.1.0-alpha.1")
description("SemiOS package manager")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/packie/archive/0.1.0-alpha.1.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/packie#0.1.0-alpha.1", "rust")
builddep("shortcut/rust")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("15.1.1")
description("the SemiOS fork of the UNIX patch utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/patch/archive/v15.1.1.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/patch#v15.1.1")
builddep("shortcut/c")
+10 -13
View File
@@ -1,33 +1,30 @@
from lib import cpp
from lib.make import *
version("10.47")
description("a set of C functions that implement regular expression pattern matching")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"
)
source_url("https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libpcre2')}/lib",
f"--bindir={get_prefix('pcre2-tools')}/bin",
f"--includedir={get_prefix('libpcre2-dev')}/include",
"--enable-jit",
]
)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libpcre2')}/lib",
f"--bindir={get_prefix('pcre2-tools')}/bin",
f"--includedir={get_prefix('libpcre2-dev')}/include",
"--enable-jit",
])
cpp.make()
cpp.make_install()
on_build(build)
package("libpcre2")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("0.46.4")
description("a low-level software library for pixel manipulation")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/pixman/pixman/-/archive/pixman-0.46.4/pixman-pixman-0.46.4.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/pixman/pixman#pixman-0.46.4")
builddep("shortcut/c")
builddep("shortcut/meson")
+11 -12
View File
@@ -4,24 +4,23 @@ from lib.make import *
version("2.5.1")
description("package compiler and linker metadata toolkit")
source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz")
maintainer("sisungo <[email protected]>")
source_managed("github://pkgconf/pkgconf#pkgconf-3.0.7", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
def build():
cpp.configure(
[
"--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-includedir=/lib/{arch.get_target()}/include",
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
]
)
cpp.configure([
"--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-includedir=/lib/{arch.get_target()}/include",
f"--with-pkg-config-dir=/lib/{arch.get_target()}/pkgconfig",
])
cpp.make()
cpp.make_install()
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("4.0.7")
description("Command line and full screen utilities for browsing procfs")
maintainer("sisungo <[email protected]>")
source_url("https://sourceforge.net/projects/procps-ng/files/Production/procps-ng-4.0.7.tar.xz/download")
source_managed("gitlab://gitlab.com/procps-ng/procps#v4.0.7", "autotools")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("3.0")
description("C parser in Python")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz")
source_managed("pypi://pycparser#3.0")
python.builddep("$shortcut")
+8 -10
View File
@@ -8,7 +8,7 @@ upstream_version = "1.4.6"
version(upstream_version)
description("Great utility for computing hash sums")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/rhash/RHash/archive/refs/tags/v1.4.6.tar.gz")
source_managed("github://rhash/RHash#v1.4.6")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -18,15 +18,13 @@ with open("files/librhash.pc") as f:
def build():
global librhash_pc
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('rhash-tools')}/bin",
f"--libdir={get_prefix('librhash')}/lib",
"--disable-gettext",
"--enable-lib-static",
]
)
cpp.configure([
"--prefix=/",
f"--bindir={get_prefix('rhash-tools')}/bin",
f"--libdir={get_prefix('librhash')}/lib",
"--disable-gettext",
"--enable-lib-static",
])
cpp.make()
cpp.make_install()
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("15.2.0")
description("ripgrep recursively searches directories for a regex pattern while respecting your gitignore")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/BurntSushi/ripgrep/archive/refs/tags/15.2.0.tar.gz")
source_managed("github://BurntSushi/ripgrep#15.2.0", "rust")
builddep("shortcut/rust")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("15.1.1")
description("SemiOS fork of the UNIX sed utility")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/sed/archive/v15.1.1.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/sed#v15.1.1")
builddep("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}")
+1 -2
View File
@@ -4,8 +4,7 @@ from lib.make import *
version("1.2.6.2")
description("the SemiOS fork of musl-libc, providing POSIX C standard library and system runtime")
maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6.2.tar.gz")
source_managed("gitea://gitea.semilabs.org/semios/semi-libc#v1.2.6.2")
builddep("shortcut/c")
builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("84.0.0")
description("Most extensible Python build backend with support for C/C++ extension modules")
maintainer("sisungo <[email protected]>")
source_url("https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz")
source_managed("pypi://setuptools#84.0.0")
python.builddep("$shortcut")
+9 -11
View File
@@ -14,17 +14,15 @@ builddep("linenoise-dev")
def build():
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('libsqlite')}/lib",
f"--bindir={get_prefix('sqlite')}/bin",
f"--includedir={get_prefix('libsqlite-dev')}/include",
"--all",
f"--with-linenoise={packie.prefix_of('linenoise-dev')}",
"--icu-collations",
]
)
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libsqlite')}/lib",
f"--bindir={get_prefix('sqlite')}/bin",
f"--includedir={get_prefix('libsqlite-dev')}/include",
"--all",
f"--with-linenoise={packie.prefix_of('linenoise-dev')}",
"--icu-collations",
])
cpp.make()
cpp.make_install()
+5 -5
View File
@@ -7,15 +7,15 @@ builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("gettext")
builddep("bash")
builddep(f"linux-dev @{arch.get_target()}")
builddep(f"libintl-dev @{arch.get_target()}")
builddep(f"libz-ng-dev @{arch.get_target()}")
builddep(f"libncurses-dev @{arch.get_target()}")
builddep("linux-dev @target")
builddep("libintl-dev @target")
builddep("libz-ng-dev @target")
builddep("libncurses-dev @target")
version("2.42.2")
description("a random collection of Linux utilities")
maintainer("sisungo <[email protected]>")
source_url("https://www.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.xz")
source_managed("github://util-linux/util-linux#v2.42.4", "autotools")
def build():
cpp.configure([
+11 -13
View File
@@ -1,6 +1,7 @@
from lib import cpp
from lib.make import *
upstream_version = "9.2.782"
version(upstream_version)
@@ -14,22 +15,19 @@ builddep(f"libncurses-dev @{arch.get_target()}")
def build():
cpp.configure(
[
"--prefix=/",
f"--bindir={get_prefix('vim')}/bin",
"--datarootdir=/share",
f"--datadir={get_prefix('vim-data')}/share",
"--enable-terminal",
"--enable-autoservername",
"--enable-multibyte",
"--disable-nls",
]
)
cpp.configure([
"--prefix=/",
f"--bindir={get_prefix('vim')}/bin",
"--datarootdir=/share",
f"--datadir={get_prefix('vim-data')}/share",
"--enable-terminal",
"--enable-autoservername",
"--enable-multibyte",
"--disable-nls",
])
cpp.make()
cpp.make_install()
on_build(build)
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, arch
version("1.49")
description("Additional standard Wayland protocols.")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/1.49/wayland-protocols-1.49.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/wayland/wayland-protocols#1.49")
builddep("shortcut/meson")
builddep("shortcut/c++")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, arch
version("1.26.0")
description("a replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/wayland/wayland/-/archive/1.26.0/wayland-1.26.0.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/wayland/wayland#1.26.0")
builddep("shortcut/meson")
builddep("shortcut/c++")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import cpp, arch
version("2.48")
description("a consistent, well-structured, frequently released, open source database of keyboard configuration data")
maintainer("sisungo <[email protected]>")
source_url("https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/archive/xkeyboard-config-2.48/xkeyboard-config-xkeyboard-config-2.48.tar.gz")
source_managed("gitlab://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config#xkeyboard-config-2.48")
builddep("shortcut/c")
builddep("shortcut/meson")
+9 -12
View File
@@ -3,12 +3,11 @@ import os
from lib import cpp
from lib.make import *
version("5.8.3")
description("a general-purpose LZMA data-compression library plus command-line tools")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz"
)
source_url("https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
@@ -16,20 +15,18 @@ builddep("shortcut/autotools")
def build():
os.environ["FGREP"] = "grep -F"
cpp.configure(
[
"--prefix=/",
f"--libdir={get_prefix('liblzma')}/lib",
f"--bindir={get_prefix('xz')}/bin",
f"--includedir={get_prefix('liblzma-dev')}/include",
]
)
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_install()
on_build(build)
package("liblzma")
cpp.use_auto_pack(["lib"])
dep("semi-libc @same-arch")
+2 -1
View File
@@ -6,9 +6,10 @@ from lib.make import *
version("2.3.3")
description("zlib replacement with optimizations for next generation systems")
maintainer("sisungo <[email protected]>")
source_url("https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.3.3.tar.gz")
source_managed("github://zlib-ng/zlib-ng#2.3.3")
builddep("shortcut/c++")
builddep("shortcut/cmake")
def build():
+1 -3
View File
@@ -7,9 +7,7 @@ from lib.make import *
version("1.5.7")
description("Zstandard - Fast real-time compression algorithm")
maintainer("sisungo <[email protected]>")
source_url(
"https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
)
source_managed("github://facebook/zstd#v1.5.7")
builddep("shortcut/c")
builddep("shortcut/autotools")
+55 -15
View File
@@ -6,12 +6,7 @@ import sys
import typing
import hooks
import lib.arch
import lib.atombuild
import lib.make
import lib.packie
import lib.pkgcomposer
import lib.sources
import lib
os.chdir(os.path.dirname(__file__))
sys.path.append(os.path.abspath("lib"))
@@ -35,6 +30,10 @@ parser_list.add_argument("ITEM", choices=("all", "built", "new"))
parser_repo_push = subparsers.add_parser("repo-push")
parser_repo_push.add_argument("REPO_DIR")
parser_repo_push.add_argument("REPO_PUSH_PKGNAME", nargs="*")
parser_vendor_src = subparsers.add_parser("source")
parser_vendor_src.add_argument("--vendor", action="store")
parser_vendor_src.add_argument("--check-updates", action="store_true")
parser_vendor_src.add_argument("PKGNAME")
args = argparser.parse_args()
if args.target:
@@ -43,6 +42,22 @@ else:
lib.arch.set_target(lib.arch.get_target())
def load_pkgbuild(pkgname):
# Declare necessary paths
repo_root = os.getcwd()
package_dir = f"{repo_root}/packages/{pkgname}"
target_dir = f"{package_dir}/target"
try:
os.chdir(package_dir)
os.makedirs(target_dir, exist_ok=True)
except Exception:
print(f"No such package {pkgname}")
exit(1)
importlib.import_module(f"packages.{pkgname}.pkgbuild")
os.chdir(repo_root)
def run_hooks(map, arg: typing.Any = None):
current_dir = os.getcwd()
for n in map.keys():
@@ -190,15 +205,8 @@ def cmd_build_atom(pkgname: str):
build_env_root = f"{target_dir}/atombuild_root"
# Read `pkgbuild.py` of that package
lib.make._in_atombuild = True
try:
os.chdir(package_dir)
os.makedirs(target_dir, exist_ok=True)
except Exception:
print(f"No such package {pkgname}")
exit(1)
importlib.import_module(f"packages.{pkgname}.pkgbuild")
os.chdir(repo_root)
lib.make._dry_run = True
load_pkgbuild(pkgname)
# Initialize build environment
lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep)
@@ -238,6 +246,33 @@ def cmd_repo_push(repo_dir: str, pkgname: list[str]):
print(f"error: failed to add '{pkg}': see the output above")
def cmd_vendor_src(repo_dir, pkgname):
package_dir = f"{os.getcwd()}/packages/{pkgname}"
target_dir = f"{package_dir}/target"
lib.make._dry_run = True
load_pkgbuild(pkgname)
if lib.make._managed_source_url is None:
print(f"error: '{pkgname}' declared not managed sources")
exit(1)
os.chdir(package_dir)
from_path = lib.managed_source.create_srcpkg(
lib.make._managed_source_url,
lib.make._managed_source_postprocess,
)
filename = lib.managed_source.get_repo_filename(lib.make._managed_source_url)
to_path = f"{repo_dir}/{filename}"
shutil.copy2(from_path, to_path)
def cmd_check_updates(pkgname):
lib.make._dry_run = True
load_pkgbuild(pkgname)
if lib.make._managed_source_url is None:
print(f"error: '{pkgname}' declared not managed sources")
exit(1)
print(lib.managed_source.get_updates(lib.make._managed_source_url))
if args.subcommand == "build":
if args.atombuild:
cmd_build_atom(args.BUILD_PKGNAME)
@@ -253,6 +288,11 @@ elif args.subcommand == "list":
cmd_list(args.ITEM)
elif args.subcommand == "repo-push":
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
elif args.subcommand == "source":
if args.vendor:
cmd_vendor_src(args.vendor, args.PKGNAME)
if args.check_updates:
cmd_check_updates(args.PKGNAME)
else:
print("error: no action specified", file=sys.stderr)
exit(1)