12 Commits
Author SHA256 Message Date
sisungo 6f6156889e feat: add managed sources
Signed-off-by: sisungo <[email protected]>
2026-10-02 12:26:55 +00:00
sisungo c62b2fc8f6 Merge pull request 'feat: add package gobject-introspection & libgudev' (#2) from sisungo/ports:gobject-introspection into main
Reviewed-on: semios/ports#2
2026-09-22 22:47:35 +08:00
sisungo e7eaa7273c Merge pull request 'feat: add libinput & libmtdev & libevdev & libwacom' (#5) from sisungo/ports:libinput into main
Reviewed-on: semios/ports#5
2026-09-22 12:53:50 +08:00
sisungo f7adbdebd8 Merge pull request 'feat: add few multimedia format libraries' (#8) from sisungo/ports:multimedia into main
Reviewed-on: semios/ports#8
2026-09-22 12:53:22 +08:00
sisungo 8c4b7a429c Merge pull request 'feat: add package init-scripts' (#14) from sisungo/ports:init-scripts into main
Reviewed-on: semios/ports#14
2026-09-22 12:52:02 +08:00
sisungo 367985bc61 Merge pull request 'feat: add support for configure scripts' (#7) from sisungo/ports:configure into main
Reviewed-on: semios/ports#7
2026-09-16 10:11:48 +08:00
sisungo 7e4e1ece86 feat: add package init-scripts
Signed-off-by: sisungo <[email protected]>
2026-09-14 07:57:44 +00:00
sisungo 8a82bcf29e feat: add few multimedia format libraries
Signed-off-by: sisungo <[email protected]>
2026-09-11 07:26:14 +00:00
sisungo f2c2fa93c9 feat: add support for configure scripts
Signed-off-by: sisungo <[email protected]>
2026-09-11 07:24:46 +00:00
sisungo e61e796eda feat: add package libgudev
Signed-off-by: sisungo <[email protected]>
2026-09-07 05:18:21 +00:00
sisungo 6645a7f537 feat: add libinput & libmtdev & libevdev & libwacom
Signed-off-by: sisungo <[email protected]>
2026-09-07 05:17:11 +00:00
sisungo 6837ddb31a feat: add package gobject-introspection
Signed-off-by: sisungo <[email protected]>
2026-09-07 03:19:34 +00:00
89 changed files with 765 additions and 140 deletions
+20
View File
@@ -41,6 +41,16 @@ def autolink_share_pkgconfig():
if i.is_file(): if i.is_file():
make.link(f"share/pkgconfig/{i.name}", "/share/pkgconfig/" + i.name) make.link(f"share/pkgconfig/{i.name}", "/share/pkgconfig/" + i.name)
def autolink_services():
for i in common.treedir("share/services"):
if i.is_file() and os.access(i.path, os.F_OK):
make.link(f"share/services/{i.name}", "/share/services/" + i.name)
def autolink_milestones():
for i in common.treedir("share/milestones"):
if i.is_file() and os.access(i.path, os.F_OK):
make.link(f"share/milestones/{i.name}", "/share/milestones/" + i.name)
def autolink(composer: pkgcomposer.PkgComposer): def autolink(composer: pkgcomposer.PkgComposer):
os.chdir(composer.workdir + "/bundle/") os.chdir(composer.workdir + "/bundle/")
@@ -64,3 +74,13 @@ def autolink(composer: pkgcomposer.PkgComposer):
autolink_share_pkgconfig() autolink_share_pkgconfig()
except: except:
pass pass
try:
autolink_services()
except:
pass
try:
autolink_milestones()
except:
pass
+1
View File
@@ -0,0 +1 @@
from . import arch, atombuild, make, packie, pkgcomposer, sources, managed_source
+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 = "/"): 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 = [] reserve_env_args = []
for i in reserve_env: for i in reserve_env:
if os.environ.get(i): if os.environ.get(i):
+23 -4
View File
@@ -4,7 +4,7 @@ import os
from lib import arch from lib import arch
from . import pkgcomposer, sources from . import pkgcomposer, sources, managed_source
_key_global = "@global" _key_global = "@global"
_key_version = "version" _key_version = "version"
@@ -16,6 +16,10 @@ _key_links = "links"
_key_dependencies = "dependencies" _key_dependencies = "dependencies"
_key_recommendations = "recommendations" _key_recommendations = "recommendations"
_key_provides = "provides" _key_provides = "provides"
_key_configure = "configure"
_managed_source_url = None
_managed_source_postprocess = ""
_current_pkgname: str = _key_global _current_pkgname: str = _key_global
_pkginfo: dict[str, dict[str, typing.Any]] = { _pkginfo: dict[str, dict[str, typing.Any]] = {
@@ -25,12 +29,13 @@ _pkginfo: dict[str, dict[str, typing.Any]] = {
_key_maintainers: [], _key_maintainers: [],
_key_provides: [], _key_provides: [],
_key_recommendations: [], _key_recommendations: [],
_key_configure: [],
}, },
} }
_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
_in_atombuild = False _dry_run = False
_builddep: list[str] = [] _builddep: list[str] = []
_blocked_hooks: list[str] = [] _blocked_hooks: list[str] = []
@@ -87,6 +92,12 @@ def provide(s: str):
] ]
def configure_script(s: str):
_pkginfo[_current_pkgname][_key_configure] += [
os.path.realpath(s)
]
def _translate_dep_spec(s: str) -> str: def _translate_dep_spec(s: str) -> str:
return ( return (
s.replace("(same)", "(same-version) @same-arch") s.replace("(same)", "(same-version) @same-arch")
@@ -147,14 +158,22 @@ def block_hook(hook: str):
def source_url(url: str): def source_url(url: str):
if not _in_atombuild: if not _dry_run:
sources.source_url(url) sources.source_url(url)
def source_git(url: str, branch: str | None = None): def source_git(url: str, branch: str | None = None):
if not _in_atombuild: if not _dry_run:
sources.source_git(url, branch) 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(): def in_atomic():
return os.environ.get("SEMIOS_PKGBUILD_IN_ATOMIC", "0") == "1" return os.environ.get("SEMIOS_PKGBUILD_IN_ATOMIC", "0") == "1"
+87
View File
@@ -0,0 +1,87 @@
from urllib.parse import urlparse
import os
import subprocess
from . import sources
import glob
DEFAULT_REPO="https://mirror2.semilabs.org/semios/srcpkgs"
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():
subprocess.run(["sh", "autogen.sh"], check=True)
subprocess.run(["./configure"], check=False)
subprocess.run(["make", "dist"], check=True)
tarballs = glob.glob("*.tar.gz")
if len(tarballs) != 1:
raise RuntimeError("No dist tarballs found.")
subprocess.run(["tar", "xf", tarballs[0]], check=True)
os.chdir(tarballs[0].replace(".tar.gz", ""))
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):
url = urlparse(s)
current_version = url.fragment
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)
+9
View File
@@ -25,6 +25,15 @@ class PkgComposer:
json.dump(link, f) json.dump(link, f)
f.write("\n") f.write("\n")
def add_configure(self, path: str, name: str = None):
if name is None:
name = os.path.basename(path)
configuredir = self.workdir + "/configure/"
dstpath = configuredir + name
os.makedirs(configuredir, exist_ok=True)
shutil.copy2(path, dstpath)
os.chmod(dstpath, 0o755)
def compose(self): def compose(self):
subprocess.run( subprocess.run(
[ [
+13 -8
View File
@@ -52,14 +52,7 @@ def zip_common_root(zip_file: zipfile.ZipFile) -> str | None:
return root return root
def sources_dir_name() -> str: def download_decompress(url: str) -> str:
with open("./target/sources.tag") as file:
return file.read()
def source_url(url: str):
if os.path.exists("./target/sources.tag"):
return
download_path = f"./target/{filename(url)}" download_path = f"./target/{filename(url)}"
download(url, download_path) download(url, download_path)
@@ -83,6 +76,18 @@ def source_url(url: str):
with tarfile.open(download_path, "r") as tar: with tarfile.open(download_path, "r") as tar:
tar.extractall(extract_dir) 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: with open("./target/sources.tag", "wt+") as file:
file.write(sources_dir) file.write(sources_dir)
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import python
python.version("1.4.1") python.version("1.4.1")
description("A super-fast templating language that borrows the best ideas from the existing templating languages.") description("A super-fast templating language that borrows the best ideas from the existing templating languages.")
maintainer("sisungo <[email protected]>") 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("$shortcut")
python.builddep("MarkupSafe.py") python.builddep("MarkupSafe.py")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("3.0.3") python.version("3.0.3")
description("Safely add untrusted strings to HTML/XML markup.") description("Safely add untrusted strings to HTML/XML markup.")
maintainer("sisungo <[email protected]>") 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") python.builddep("$shortcut")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("6.0.3") python.version("6.0.3")
description("YAML parser and emitter for Python") description("YAML parser and emitter for Python")
maintainer("sisungo <[email protected]>") 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") python.builddep("$shortcut")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp
version("1.4.357.0") version("1.4.357.0")
description("SPIR-V headers") description("SPIR-V headers")
maintainer("sisungo <[email protected]>") 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/cmake")
builddep("shortcut/c") builddep("shortcut/c")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, packie
version("22.1.5") version("22.1.5")
description("A tool and a library for bi-directional translation between SPIR-V and LLVM IR") description("A tool and a library for bi-directional translation between SPIR-V and LLVM IR")
maintainer("sisungo <[email protected]>") 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/cmake")
builddep("shortcut/c++") builddep("shortcut/c++")
+1 -1
View File
@@ -10,7 +10,7 @@ sdk_version = "1.4.357.0"
version(sdk_version) version(sdk_version)
description("an API and commands for processing SPIR-V modules") description("an API and commands for processing SPIR-V modules")
maintainer("sisungo <[email protected]>") 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/cmake")
builddep("shortcut/c++") builddep("shortcut/c++")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.1.0-alpha.1") version("0.1.0-alpha.1")
description("AirBoot Linux initramfs generator.") description("AirBoot Linux initramfs generator.")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/airboot-linux-stage2/archive/0.1.0-alpha.1.tar.gz") source_managed("gitea://gitea.semilabs.org/semios/airboot-linux-stage2#0.1.0-alpha.1")
def build(): def build():
+2 -2
View File
@@ -1,8 +1,8 @@
{ {
"os_name": "\u001b[36;4mSemiOS\u001b[0m", "os_name": "\u001b[36;4mSemiOS\u001b[0m",
"config_dir": "/var/config/airup", "config_dir": "/var/config/airup",
"service_dir": "/share/airup/services", "service_dir": "/share/services",
"milestone_dir": "/share/airup/milestones", "milestone_dir": "/share/milestones",
"runtime_dir": "/run/airup", "runtime_dir": "/run/airup",
"env_vars": {}, "env_vars": {},
"early_cmds": [] "early_cmds": []
+20 -3
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.10.9") version("0.10.9")
description("Modern, portable and fast implementation of service supervisor and the init daemon.") description("Modern, portable and fast implementation of service supervisor and the init daemon.")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
@@ -16,14 +16,30 @@ def build():
shutil.copy2("../../build_manifest.json", "build_manifest.json") shutil.copy2("../../build_manifest.json", "build_manifest.json")
rust.build() rust.build()
on_build(build) on_build(build)
def patch_logger_airs(path):
with open(path) as fd:
content = fd.read()
content = content.replace(
"/usr/libexec/airup/airup-fallback-logger",
get_prefix('airup') + "/libexec/airup-fallback-logger",
)
with open(path, 'wt+') as fd:
fd.write(content)
def pack_airup(composer): def pack_airup(composer):
os.chdir(rust.artifacts_dir())
composer.makedir("bin") composer.makedir("bin")
composer.makedir("libexec") composer.makedir("libexec")
composer.makedirs("share/services")
patch_logger_airs("docs/resources/airup-fallback-logger.airs")
composer.addfile("docs/resources/airup-fallback-logger.airs", "share/services/airup-fallback-logger.airs")
composer.addfile("docs/resources/airupd.airs", "share/services/airupd.airs")
os.chdir(rust.artifacts_dir())
composer.addfile("airup", "bin/airup") composer.addfile("airup", "bin/airup")
composer.addfile("airupd", "bin/airupd") composer.addfile("airupd", "bin/airupd")
composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger") composer.addfile("airup-fallback-logger", "libexec/airup-fallback-logger")
@@ -32,3 +48,4 @@ def pack_airup(composer):
package("airup") package("airup")
on_pack(pack_airup) on_pack(pack_airup)
dep("semi-libc @same-arch") dep("semi-libc @same-arch")
link("bin/airupd", "/bin/init")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("2026.4.26") version("2026.4.26")
description("The One True Awk programming language") description("The One True Awk programming language")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("5.5.0") version("5.5.0")
description("a general-purpose cryptographic library maintained by the AWS Cryptography team") description("a general-purpose cryptographic library maintained by the AWS Cryptography team")
maintainer("sisungo <[email protected]>") 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/c++")
builddep("shortcut/cmake") builddep("shortcut/cmake")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("7.0.3") version("7.0.3")
description("An implementation of the POSIX bc calculator with GNU extensions and dc") description("An implementation of the POSIX bc calculator with GNU extensions and dc")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("1.2.0") version("1.2.0")
description("Brotli compression format") description("Brotli compression format")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/cmake") builddep("shortcut/cmake")
+1 -3
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("1.34.8") version("1.34.8")
description("A C library for asynchronous DNS requests") description("A C library for asynchronous DNS requests")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://c-ares/c-ares#v1.34.8", "autotools")
"https://github.com/c-ares/c-ares/releases/download/v1.34.8/c-ares-1.34.8.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
@@ -0,0 +1,6 @@
#!/bin/sh
[ "${ACTION}" = "remove" ] && exit 0
command -v certutil >/dev/null 2>&1 || exit 0
certutil refresh
+2
View File
@@ -27,4 +27,6 @@ def pack(composer):
package("ca-certificates") package("ca-certificates")
arch_any() arch_any()
configure_script("configure/refresh")
recommend("certutil")
on_pack(pack) on_pack(pack)
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import rust
version("0.98.0") version("0.98.0")
description("The Rust package manager") description("The Rust package manager")
maintainer("sisungo <[email protected]>") 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("shortcut/c")
builddep("cargo") builddep("cargo")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("0.1.0") version("0.1.0")
description("SemiOS certification utility") description("SemiOS certification utility")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
+2 -1
View File
@@ -4,7 +4,8 @@ from lib.make import *
version("0.10.0") version("0.10.0")
description("system core utilities") description("system core utilities")
maintainer("sisungo <[email protected]>") 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") block_hook("autolink")
builddep("shortcut/rust") builddep("shortcut/rust")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib import cpp
version("1.37") version("1.37")
description("Linux D-Bus Message Broker") description("Linux D-Bus Message Broker")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://github.com/bus1/dbus-broker/releases/download/v37/dbus-broker-37.tar.xz") source_managed("github://bus1/dbus-broker#v37")
supported_arch(lambda arch: "linux" in arch) supported_arch(lambda arch: "linux" in arch)
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("0.5.0") version("0.5.0")
description("utility to compute difference between text files") description("utility to compute difference between text files")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
+2 -3
View File
@@ -7,15 +7,14 @@ from lib.make import *
version("2.8.3") version("2.8.3")
description("Fast streaming XML parser written in C99") description("Fast streaming XML parser written in C99")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://libexpat/libexpat#R_2_8_3")
"https://github.com/libexpat/libexpat/releases/download/R_2_8_3/expat-2.8.3.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/cmake") builddep("shortcut/cmake")
def build(): def build():
os.chdir("expat")
cpp.cmake([ cpp.cmake([
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libexpat')}/lib", f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libexpat')}/lib",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libexpat-dev')}/include", f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libexpat-dev')}/include",
+1 -2
View File
@@ -8,7 +8,7 @@ VERSION = "5.48"
version(VERSION) version(VERSION)
description("utility to infer file type and information") description("utility to infer file type and information")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
@@ -19,7 +19,6 @@ builddep(f"libbzip2-dev @{arch.get_target()}")
def build(): def build():
subprocess.run(["autoreconf", "-fiv"], check=True)
cpp.configure([ cpp.configure([
"--prefix=/", "--prefix=/",
f"--libdir={get_prefix('libmagic')}/lib", f"--libdir={get_prefix('libmagic')}/lib",
+1 -2
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("0.10.0") version("0.10.0")
description("implementation of the UNIX findutils") description("implementation of the UNIX findutils")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
@@ -12,7 +12,6 @@ builddep("shortcut/rust")
def build(): def build():
rust.build() rust.build()
on_build(build) on_build(build)
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("2.6.4") version("2.6.4")
description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++") description("The Fast Lexical Analyzer - scanner generator for lexing in C and C++")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("2.18.3") version("2.18.3")
description("a library for configuring and customizing font access") description("a library for configuring and customizing font access")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/meson") builddep("shortcut/meson")
+1 -3
View File
@@ -6,9 +6,7 @@ from lib.make import *
version("0.3.3") version("0.3.3")
description("small implementation of gettext and libintl") description("small implementation of gettext and libintl")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://sabotage-linux/gettext-tiny#v0.3.3")
"https://github.com/sabotage-linux/gettext-tiny/releases/download/v0.3.3/gettext-tiny-0.3.3.tar.xz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+6 -4
View File
@@ -14,13 +14,14 @@ source_url("https://download.gnome.org/sources/glib/2.89/glib-2.89.2.tar.xz")
builddep("shortcut/c++") builddep("shortcut/c++")
builddep("shortcut/meson") builddep("shortcut/meson")
builddep("gettext") builddep("gettext")
builddep(f"libintl-dev @{arch.get_target()}") builddep("libintl-dev @target")
builddep("pcre2-tools") builddep("pcre2-tools")
builddep(f"libpcre2-dev @{arch.get_target()}") builddep("libpcre2-dev @target")
builddep(f"libffi-dev @{arch.get_target()}") builddep("libffi-dev @target")
builddep("pkgconf") builddep("pkgconf")
builddep(f"libz-ng-dev @{arch.get_target()}") builddep("libz-ng-dev @target")
builddep("libexpat") builddep("libexpat")
builddep("gobject-introspection @target")
def build(): def build():
@@ -29,6 +30,7 @@ def build():
cpp.meson_setup([ cpp.meson_setup([
"-Druntime_dir=/run", "-Druntime_dir=/run",
f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules", f"-Dgio_module_dir=/lib/{arch.get_target()}/gio/modules",
"-Dintrospection=enabled",
"--prefix=/", "--prefix=/",
f"--bindir={get_prefix('glib-tools')}/bin", f"--bindir={get_prefix('glib-tools')}/bin",
f"--libdir={get_prefix('glib-dev')}/lib", f"--libdir={get_prefix('glib-dev')}/lib",
+1 -1
View File
@@ -8,7 +8,7 @@ from lib import cpp, arch
version("16.5.0") version("16.5.0")
description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator") description("Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator")
maintainer("sisungo <[email protected]>") 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/cmake")
builddep("shortcut/c++") builddep("shortcut/c++")
@@ -0,0 +1,48 @@
import shutil
from lib.make import *
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_managed("gitlab://gitlab.gnome.org/GNOME/gobject-introspection#1.86.0")
builddep("shortcut/meson")
builddep("shortcut/c")
builddep("glib-dev @target")
builddep("setuptools.py @target")
builddep("libpython-dev @target")
builddep("flex")
builddep("bison")
builddep("libexpat @target")
def build():
cpp.meson_setup([
f"--prefix={get_prefix('gobject-introspection')}",
f"-Dgir_dir_prefix=/lib/{arch.get_target()}/include/gir",
"-Dcairo=disabled",
"-Dpython=/bin/python3",
"-Dtests=false",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
def pack(composer):
composer.add_dir("include")
composer.add_dir("share")
composer.add_dir("bin")
composer.add_dir("lib")
shutil.rmtree(f"{composer.workdir}/bundle/lib/{arch.get_target()}")
composer.add_dir(f"lib/{arch.get_target()}/include/gir", "include/gir")
package("gobject-introspection")
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") version("1.3.15")
description("Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.") description("Graphite is a \"smart font\" system developed specifically to handle the complexities of lesser-known languages of the world.")
maintainer("sisungo <[email protected]>") 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/c++")
builddep("shortcut/cmake") builddep("shortcut/cmake")
+4 -4
View File
@@ -5,13 +5,13 @@ from lib.make import *
version("15.1.3") version("15.1.3")
description("SemiOS file pattern searcher") description("SemiOS file pattern searcher")
maintainer("sisungo <[email protected]>") 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("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}") builddep("libpcre2-dev @target")
builddep("pcre2-tools") builddep("pcre2-tools")
builddep(f"libbzip2-dev @{arch.get_target()}") builddep("libbzip2-dev @target")
builddep(f"libz-ng-dev @{arch.get_target()}") builddep("libz-ng-dev @target")
def build(): def build():
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp
version("3.5.2") version("3.5.2")
description("an interactive process viewer") description("an interactive process viewer")
maintainer("sisungo <[email protected]>") 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/autotools")
builddep("shortcut/c") builddep("shortcut/c")
+26
View File
@@ -0,0 +1,26 @@
import subprocess
import os
import lib
from lib.make import *
version("0.1.0-alpha.1")
description("SemiOS init scripts")
maintainer("sisungo <[email protected]>")
source_managed("gitea://gitea.semilabs.org/semios/init-scripts#0.1.0-alpha.1")
def build():
subprocess.run(["env", f"PREFIX={get_prefix('init-scripts')}", "sh", "install.sh"], check=True)
os.chdir("./target")
on_build(build)
def pack(composer):
composer.add("share")
composer.add("bin")
package("init-scripts")
arch_any()
on_pack(pack)
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("1.34") 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") 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]>") 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/c")
builddep("shortcut/meson") builddep("shortcut/meson")
+1 -3
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("3.8.9") version("3.8.9")
description("Multi-format archive and compression library") description("Multi-format archive and compression library")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://libarchive/libarchive#v3.8.9", "autotools")
"https://github.com/libarchive/libarchive/releases/download/v3.8.9/libarchive-3.8.9.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib import cpp, arch
version("2.4.134") version("2.4.134")
description("libdrm Direct Rendering Manager library and headers") description("libdrm Direct Rendering Manager library and headers")
maintainer("sisungo <[email protected]>") 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/meson")
builddep("shortcut/c") builddep("shortcut/c")
+38
View File
@@ -0,0 +1,38 @@
from lib import cpp
from lib.make import *
version("1.13.7")
description("Wrapper library for evdev devices")
maintainer("sisungo <[email protected]>")
source_managed("gitlab://gitlab.freedesktop.org/libevdev/libevdev#libevdev-1.13.7")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("linux-dev @target")
def build():
cpp.meson_setup([
"--prefix=/",
f"--libdir={get_prefix('libevdev')}/lib",
f"--includedir={get_prefix('libevdev-dev')}/include",
"-Dtests=disabled",
"-Ddocumentation=disabled",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
package("libevdev")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libevdev-tools")
dep("libevdev (same)")
cpp.use_auto_pack(["bin"])
package("libevdev-dev")
dep("libevdev (same)")
cpp.use_auto_pack(["dev"])
+1 -3
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("3.7.1") version("3.7.1")
description("A portable foreign-function interface library") description("A portable foreign-function interface library")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://libffi/libffi#v3.7.1", "autotools")
"https://github.com/libffi/libffi/releases/download/v3.7.1/libffi-3.7.1.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.2.0") version("0.2.0")
description("provides compatibility objects to gcc runtime libraries") description("provides compatibility objects to gcc runtime libraries")
maintainer("sisungo <[email protected]>") 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("shortcut/c")
builddep(f"libunwind-dev @{arch.get_target()}") builddep(f"libunwind-dev @{arch.get_target()}")
+1 -2
View File
@@ -7,7 +7,7 @@ from lib import cpp
version("1.7.0") version("1.7.0")
description("The GL Vendor-Neutral Dispatch library") description("The GL Vendor-Neutral Dispatch library")
maintainer("sisungo <[email protected]>") 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/meson")
builddep("shortcut/c") builddep("shortcut/c")
@@ -99,4 +99,3 @@ on_pack(lambda composer: pack_librun(composer, "libOpenGL"))
package("libopengl-dev") package("libopengl-dev")
dep("libopengl (same)") dep("libopengl (same)")
on_pack(lambda composer: pack_libdev(composer, "libopengl", "opengl.pc", ["GL"])) on_pack(lambda composer: pack_libdev(composer, "libopengl", "opengl.pc", ["GL"]))
@@ -0,0 +1,6 @@
--- a/gudev/meson.build
+++ b/gudev/meson.build
36c36
< '-export-dynamic',
---
> '-Wl,-export-dynamic',
+42
View File
@@ -0,0 +1,42 @@
from lib import cpp
from lib.make import *
version("238")
description("Input device management and event handling library")
maintainer("sisungo <[email protected]>")
source_managed("gitlab://gitlab.gnome.org/GNOME/libgudev#238")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("gobject-introspection @target")
builddep("glib-dev @target")
builddep("lxdeviced-libudev-dev @target")
builddep("glib-tools")
builddep("libexpat")
def build():
cpp.meson_setup([
"--prefix=/",
f"--libdir={get_prefix('libgudev')}/lib",
f"--includedir={get_prefix('libgudev-dev')}/include",
"-Dintrospection=enabled",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
package("libgudev")
dep("semi-libc @same-arch")
dep("lxdeviced-libudev @same-arch")
dep("libglib @same-arch")
dep("libgobject @same-arch")
cpp.use_auto_pack(["lib"])
package("libgudev-dev")
dep("libgudev (same)")
dep("lxdeviced-libudev-dev @same-arch")
dep("glib-dev @same-arch")
cpp.use_auto_pack(["dev"])
+58
View File
@@ -0,0 +1,58 @@
import glob
from lib import cpp
from lib.make import *
version("1.30.4")
description("Input device management and event handling library")
maintainer("sisungo <[email protected]>")
source_managed("gitlab://gitlab.freedesktop.org/libinput/libinput#1.30.4")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("lxdeviced-libudev-dev @target")
builddep("libevdev-dev @target")
builddep("libmtdev-dev @target")
builddep("libwacom-dev @target")
builddep("linux-dev @target")
def build():
cpp.meson_setup([
"--prefix=/",
f"--libdir={get_prefix('libinput')}/lib",
f"--libexecdir={get_prefix('libinput-tools')}/libexec",
f"--includedir={get_prefix('libinput-dev')}/include",
"--sysconfdir=/var/config",
f"--datadir={get_prefix('libinput')}/share",
"-Ddebug-gui=false",
"-Dtests=false",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
def pack(composer):
composer.makedir("lib")
for i in glob.glob("lib/*so*"):
composer.add(i)
composer.makedir("share")
composer.add("share/libinput")
def pack_tools(composer):
composer.add("bin")
composer.add("libexec")
package("libinput")
dep("semi-libc @same-arch")
on_pack(pack)
package("libinput-tools")
dep("libinput (same)")
on_pack(pack_tools)
package("libinput-dev")
dep("libinput (same)")
cpp.use_auto_pack(["dev"])
+32
View File
@@ -0,0 +1,32 @@
from lib import cpp
from lib.make import *
version("1.1.7")
description("a stand-alone library which transforms all variants of kernel MT events to the slotted type B protocol")
maintainer("sisungo <[email protected]>")
source_url("https://bitmath.se/org/code/mtdev/mtdev-1.1.7.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
builddep("linux-dev @target")
def build():
cpp.configure([
"--prefix=/",
f"--libdir={get_prefix('libmtdev')}/lib",
f"--includedir={get_prefix('libmtdev-dev')}/include",
])
cpp.make()
cpp.make_install()
on_build(build)
package("libmtdev")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libmtdev-dev")
dep("libmtdev (same)")
cpp.use_auto_pack(["dev"])
+2
View File
@@ -6,6 +6,8 @@ from lib.make import *
upstream_version = "3.2.25" upstream_version = "3.2.25"
version(upstream_version) 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") source_url("https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz")
builddep("shortcut/c") builddep("shortcut/c")
+33
View File
@@ -0,0 +1,33 @@
from lib import cpp
from lib.make import *
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")
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.make()
cpp.make_install()
on_build(build)
package("libogg")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libogg-dev")
dep("libogg (same)")
cpp.use_auto_pack(["dev"])
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("1.6.58") version("1.6.58")
description("the official PNG reference library") description("the official PNG reference library")
maintainer("sisungo <[email protected]>") 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", "autotools")
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -3
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("0.23.1") version("0.23.1")
description("C library for the Public Suffix List") description("C library for the Public Suffix List")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://rockdaboot/libpsl#0.23.1", "autotools")
"https://github.com/rockdaboot/libpsl/releases/download/0.23.1/libpsl-0.23.1.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, arch
version("2.24.1") version("2.24.1")
description("an implementation for VA-API") description("an implementation for VA-API")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://github.com/intel/libva/releases/download/2.24.1/libva-2.24.1.tar.bz2") source_managed("github://intel/libva#2.24.1", "autotools")
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+35
View File
@@ -0,0 +1,35 @@
from lib import cpp
from lib.make import *
version("1.3.7")
description("Reference implementation of the Ogg Vorbis audio format.")
maintainer("sisungo <[email protected]>")
source_url("https://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz")
builddep("shortcut/c")
builddep("shortcut/autotools")
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.make()
cpp.make_install()
on_build(build)
package("libvorbis")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("libvorbis-dev")
dep("libvorbis (same)")
cpp.use_auto_pack(["dev"])
+48
View File
@@ -0,0 +1,48 @@
from lib import cpp
from lib.make import *
version("2.19.1")
description("libwacom is a tablet description library")
maintainer("sisungo <[email protected]>")
source_managed("github://linuxwacom/libwacom#libwacom-2.19.1")
builddep("shortcut/c")
builddep("shortcut/meson")
builddep("linux-dev @target")
builddep("libgudev-dev @target")
builddep("libevdev-dev @target")
def build():
cpp.meson_setup([
"--prefix=/",
f"--libdir={get_prefix('libwacom')}/lib",
f"--bindir={get_prefix('libwacom-tools')}/bin",
f"--includedir={get_prefix('libwacom-dev')}/include",
f"--datadir={get_prefix('libwacom')}/share",
"-Dtests=disabled",
])
cpp.meson_compile()
cpp.meson_install()
on_build(build)
package("libwacom")
dep("semi-libc @same-arch")
dep("libgudev @same-arch")
dep("libgobject @same-arch")
dep("libglib @same-arch")
dep("libevdev @same-arch")
cpp.use_auto_pack(["lib"])
package("libwacom-tools")
dep("libwacom (same)")
cpp.use_auto_pack(["bin"])
package("libwacom-dev")
dep("libwacom (same)")
dep("libgudev-dev @same-arch")
dep("glib-dev @same-arch")
dep("libevdev-dev @same-arch")
cpp.use_auto_pack(["dev"])
+79
View File
@@ -0,0 +1,79 @@
import os
import shutil
from lib.make import *
from lib import cpp
version("1.6.0")
description("a library to encode and decode images in WebP format")
maintainer("sisungo <[email protected]>")
source_managed("github://webmproject/libwebp#v1.6.0")
builddep("shortcut/c")
builddep("shortcut/cmake")
def split_libsharpyuv():
os.makedirs("sharpyuv/libdev/pkgconfig")
os.makedirs("sharpyuv/lib")
os.makedirs("sharpyuv/include")
os.rename("lib/pkgconfig/libsharpyuv.pc", "sharpyuv/libdev/pkgconfig/libsharpyuv.pc")
os.system("mv lib/libsharpyuv* sharpyuv/lib/")
os.rename("include/webp/sharpyuv", "sharpyuv/include/sharpyuv")
with open("sharpyuv/libdev/pkgconfig/libsharpyuv.pc", "r") as pcf:
pc = pcf.read()
pc = pc.replace(get_prefix("libwebp"), get_prefix("libsharpyuv"))
pc = pc.replace(f"{get_prefix('libwebp-dev')}/include/webp", f"{get_prefix('libsharpyuv-dev')}/include")
with open("sharpyuv/libdev/pkgconfig/libsharpyuv.pc", "wt+") as pcf:
pcf.write(pc)
def build():
cpp.cmake([
"-DBUILD_SHARED_LIBS=1",
f"-DCMAKE_INSTALL_LIBDIR={get_prefix('libwebp')}/lib",
f"-DCMAKE_INSTALL_BINDIR={get_prefix('libwebp-tools')}/bin",
f"-DCMAKE_INSTALL_INCLUDEDIR={get_prefix('libwebp-dev')}/include",
])
cpp.ninja()
if os.path.exists("../cpp_install"):
shutil.rmtree("../cpp_install")
cpp.ninja_install()
split_libsharpyuv()
on_build(build)
def pack_libsharpyuv(composer):
composer.add_dir("sharpyuv/lib", "lib")
def pack_libsharpyuv_dev(composer):
composer.add_dir("sharpyuv/libdev", "lib")
composer.add_dir("sharpyuv/include", "include")
package("libsharpyuv")
description("Library for sharp RGB to YUV conversion")
dep("semi-libc @same-arch")
on_pack(pack_libsharpyuv)
package("libsharpyuv-dev")
description("Library for sharp RGB to YUV conversion")
dep("libsharpyuv (same)")
dep("semi-libc-dev @same-arch")
on_pack(pack_libsharpyuv_dev)
package("libwebp")
dep("semi-libc @same-arch")
dep("libsharpyuv (same)")
cpp.use_auto_pack(["lib"])
package("libwebp-tools")
dep("libwebp (same)")
cpp.use_auto_pack(["bin"])
package("libwebp-dev")
dep("libwebp (same)")
dep("libsharpyuv-dev (same)")
dep("semi-libc-dev @same-arch")
cpp.use_auto_pack(["dev"])
+3 -2
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("2.15.3") version("2.15.3")
description("an XML toolkit implemented in C, originally developed for the GNOME Project") description("an XML toolkit implemented in C, originally developed for the GNOME Project")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz") source_url("https://download.gnome.org/sources/libxml2/2.15/libxml2-2.15.3.tar.xz")
builddep("shortcut/autotools") builddep("shortcut/autotools")
@@ -27,5 +27,6 @@ dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"]) cpp.use_auto_pack(["lib"])
package("libxml2-dev") package("libxml2-dev")
dep("semi-libc @same-arch") dep("libxml2 (same)")
dep("semi-libc-dev @same-arch")
cpp.use_auto_pack(["dev"]) cpp.use_auto_pack(["dev"])
+1 -1
View File
@@ -3,7 +3,7 @@ from lib.make import *
version("2.0") version("2.0")
description("A small self-contained alternative to readline and libedit") description("A small self-contained alternative to readline and libedit")
maintainer("sisungo <[email protected]>") 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) on_build(lambda: None)
+2 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("0.1.0-alpha.2") version("0.1.0-alpha.2")
description("Linux device userspace daemon.") description("Linux device userspace daemon.")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/lxdeviced/archive/0.1.0-alpha.2.tar.gz") source_managed("gitea://gitea.semilabs.org/semios/lxdeviced#0.1.0-alpha.2", "rust")
builddep("shortcut/rust") builddep("shortcut/rust")
@@ -35,6 +35,7 @@ Libs: -L${libdir} -ludev
def pack(composer): def pack(composer):
composer.makedirs("share/device") composer.makedirs("share/device")
composer.add_dir("misc/rules", "share/device/rules") composer.add_dir("misc/rules", "share/device/rules")
composer.add_dir("misc/airup", "share/services")
oldpwd = os.getcwd() oldpwd = os.getcwd()
os.chdir(rust.artifacts_dir()) os.chdir(rust.artifacts_dir())
composer.makedir("bin") composer.makedir("bin")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("1.12.0") version("1.12.0")
description("The Meson Build System") description("The Meson Build System")
maintainer("sisungo <[email protected]>") 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") builddep("python")
+1 -3
View File
@@ -5,9 +5,7 @@ from lib.make import *
version("1.59.2") version("1.59.2")
description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions") description("the MirBSD Korn Shell, a minimal and useful implementation of the POSIX shell with extensions")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://mirabilos/mksh-cvs2git#mksh-R59c")
"https://github.com/mirabilos/mksh-cvs2git/archive/refs/tags/mksh-R59c.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("gnu-sed") builddep("gnu-sed")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("19") version("19")
description("A vi/ex editor for editing UTF-8 text") description("A vi/ex editor for editing UTF-8 text")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("5.3") version("5.3")
description("A small vi/ex terminal text editor (neatvi rewrite)") description("A small vi/ex terminal text editor (neatvi rewrite)")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -3
View File
@@ -5,9 +5,7 @@ from lib.make import *
version("1.70.0") version("1.70.0")
description("nghttp2 - HTTP/2 C Library and tools") description("nghttp2 - HTTP/2 C Library and tools")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://nghttp2/nghttp2#v1.70.0")
"https://github.com/nghttp2/nghttp2/releases/download/v1.70.0/nghttp2-1.70.0.tar.gz"
)
builddep("shortcut/c++") builddep("shortcut/c++")
builddep("shortcut/cmake") builddep("shortcut/cmake")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("1.13.2") version("1.13.2")
description("a small build system with a focus on speed") description("a small build system with a focus on speed")
maintainer("sisungo <[email protected]>") 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("shortcut/c++")
builddep("sed") builddep("sed")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("26.3") python.version("26.3")
description("Core utilities for Python packages") description("Core utilities for Python packages")
maintainer("sisungo <[email protected]>") 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") python.builddep("$shortcut")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("0.1.0-alpha.1") version("0.1.0-alpha.1")
description("SemiOS package manager") description("SemiOS package manager")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("15.1.1") version("15.1.1")
description("the SemiOS fork of the UNIX patch utility") description("the SemiOS fork of the UNIX patch utility")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/c")
+1 -3
View File
@@ -4,9 +4,7 @@ from lib.make import *
version("10.47") version("10.47")
description("a set of C functions that implement regular expression pattern matching") description("a set of C functions that implement regular expression pattern matching")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://PCRE2Project/pcre2#pcre2-10.47", "autotools")
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("0.46.4") version("0.46.4")
description("a low-level software library for pixel manipulation") description("a low-level software library for pixel manipulation")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/meson") builddep("shortcut/meson")
+1
View File
@@ -4,6 +4,7 @@ from lib.make import *
version("2.5.1") version("2.5.1")
description("package compiler and linker metadata toolkit") description("package compiler and linker metadata toolkit")
maintainer("sisungo <[email protected]>")
source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz") source_url("https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.gz")
builddep("shortcut/c") builddep("shortcut/c")
+1 -1
View File
@@ -7,7 +7,7 @@ from lib.make import *
version("4.0.7") version("4.0.7")
description("Command line and full screen utilities for browsing procfs") description("Command line and full screen utilities for browsing procfs")
maintainer("sisungo <[email protected]>") 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/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("3.0") python.version("3.0")
description("C parser in Python") description("C parser in Python")
maintainer("sisungo <[email protected]>") 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") python.builddep("$shortcut")
+1 -1
View File
@@ -8,7 +8,7 @@ upstream_version = "1.4.6"
version(upstream_version) version(upstream_version)
description("Great utility for computing hash sums") description("Great utility for computing hash sums")
maintainer("sisungo <[email protected]>") 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", "autotools")
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -4,7 +4,7 @@ from lib.make import *
version("15.2.0") version("15.2.0")
description("ripgrep recursively searches directories for a regex pattern while respecting your gitignore") description("ripgrep recursively searches directories for a regex pattern while respecting your gitignore")
maintainer("sisungo <[email protected]>") 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") builddep("shortcut/rust")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib.make import *
version("15.1.1") version("15.1.1")
description("SemiOS fork of the UNIX sed utility") description("SemiOS fork of the UNIX sed utility")
maintainer("sisungo <[email protected]>") 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("shortcut/c")
builddep(f"libpcre2-dev @{arch.get_target()}") builddep(f"libpcre2-dev @{arch.get_target()}")
+2 -2
View File
@@ -1,11 +1,11 @@
from lib import arch, cpp from lib import arch, cpp
from lib.make import * from lib.make import *
version("1.2.6+1") version("1.2.6+1")
description("the SemiOS fork of musl-libc, providing POSIX C standard library and system runtime") description("the SemiOS fork of musl-libc, providing POSIX C standard library and system runtime")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6-1.tar.gz") source_managed("gitea://gitea.semilabs.org/semios/semi-libc#v1.2.6-1")
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import python
python.version("84.0.0") python.version("84.0.0")
description("Most extensible Python build backend with support for C/C++ extension modules") description("Most extensible Python build backend with support for C/C++ extension modules")
maintainer("sisungo <[email protected]>") 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") python.builddep("$shortcut")
+1 -1
View File
@@ -6,7 +6,7 @@ upstream_version = "9.2.782"
version(upstream_version) version(upstream_version)
description("vim, a greatly improved version of the good old UNIX editor Vi") description("vim, a greatly improved version of the good old UNIX editor Vi")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url("https://github.com/vim/vim/archive/refs/tags/v9.2.0782.tar.gz") source_managed("github://vim/vim#v9.2.0782", "autotools")
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, arch
version("1.49") version("1.49")
description("Additional standard Wayland protocols.") description("Additional standard Wayland protocols.")
maintainer("sisungo <[email protected]>") 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/meson")
builddep("shortcut/c++") builddep("shortcut/c++")
+1 -1
View File
@@ -5,7 +5,7 @@ from lib import cpp, arch
version("1.26.0") 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") 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]>") 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/meson")
builddep("shortcut/c++") builddep("shortcut/c++")
+1 -3
View File
@@ -6,9 +6,7 @@ from lib.make import *
version("5.8.3") version("5.8.3")
description("a general-purpose LZMA data-compression library plus command-line tools") description("a general-purpose LZMA data-compression library plus command-line tools")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://tukaani-project/xz#v5.8.3", "autotools")
"https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+1 -1
View File
@@ -6,7 +6,7 @@ from lib.make import *
version("2.3.3") version("2.3.3")
description("zlib replacement with optimizations for next generation systems") description("zlib replacement with optimizations for next generation systems")
maintainer("sisungo <[email protected]>") 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/c++")
+1 -3
View File
@@ -7,9 +7,7 @@ from lib.make import *
version("1.5.7") version("1.5.7")
description("Zstandard - Fast real-time compression algorithm") description("Zstandard - Fast real-time compression algorithm")
maintainer("sisungo <[email protected]>") maintainer("sisungo <[email protected]>")
source_url( source_managed("github://facebook/zstd#v1.5.7")
"https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
)
builddep("shortcut/c") builddep("shortcut/c")
builddep("shortcut/autotools") builddep("shortcut/autotools")
+45 -15
View File
@@ -6,12 +6,7 @@ import sys
import typing import typing
import hooks import hooks
import lib.arch import lib
import lib.atombuild
import lib.make
import lib.packie
import lib.pkgcomposer
import lib.sources
os.chdir(os.path.dirname(__file__)) os.chdir(os.path.dirname(__file__))
sys.path.append(os.path.abspath("lib")) sys.path.append(os.path.abspath("lib"))
@@ -35,6 +30,9 @@ parser_list.add_argument("ITEM", choices=("all", "built", "new"))
parser_repo_push = subparsers.add_parser("repo-push") parser_repo_push = subparsers.add_parser("repo-push")
parser_repo_push.add_argument("REPO_DIR") parser_repo_push.add_argument("REPO_DIR")
parser_repo_push.add_argument("REPO_PUSH_PKGNAME", nargs="*") parser_repo_push.add_argument("REPO_PUSH_PKGNAME", nargs="*")
parser_vendor_src = subparsers.add_parser("vendor-src")
parser_vendor_src.add_argument("REPO_DIR")
parser_vendor_src.add_argument("VENDOR_PKGNAME")
args = argparser.parse_args() args = argparser.parse_args()
if args.target: if args.target:
@@ -43,6 +41,22 @@ else:
lib.arch.set_target(lib.arch.get_target()) 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): def run_hooks(map, arg: typing.Any = None):
current_dir = os.getcwd() current_dir = os.getcwd()
for n in map.keys(): for n in map.keys():
@@ -123,6 +137,9 @@ def cmd_build_package(package: str):
} }
composer.write_manifest(manifest) composer.write_manifest(manifest)
composer.write_links(pkginfo[lib.make._key_links]) composer.write_links(pkginfo[lib.make._key_links])
for i in pkginfo[lib.make._key_configure]:
composer.add_configure(i)
composer.compose() composer.compose()
# Build success # Build success
@@ -187,15 +204,8 @@ def cmd_build_atom(pkgname: str):
build_env_root = f"{target_dir}/atombuild_root" build_env_root = f"{target_dir}/atombuild_root"
# Read `pkgbuild.py` of that package # Read `pkgbuild.py` of that package
lib.make._in_atombuild = True lib.make._dry_run = True
try: load_pkgbuild(pkgname)
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)
# Initialize build environment # Initialize build environment
lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep) lib.atombuild.prepare_build_env(build_env_root, lib.make._builddep)
@@ -235,6 +245,24 @@ def cmd_repo_push(repo_dir: str, pkgname: list[str]):
print(f"error: failed to add '{pkg}': see the output above") 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)
if args.subcommand == "build": if args.subcommand == "build":
if args.atombuild: if args.atombuild:
cmd_build_atom(args.BUILD_PKGNAME) cmd_build_atom(args.BUILD_PKGNAME)
@@ -250,6 +278,8 @@ elif args.subcommand == "list":
cmd_list(args.ITEM) cmd_list(args.ITEM)
elif args.subcommand == "repo-push": elif args.subcommand == "repo-push":
cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME) cmd_repo_push(args.REPO_DIR, args.REPO_PUSH_PKGNAME)
elif args.subcommand == "vendor-src":
cmd_vendor_src(args.REPO_DIR, args.VENDOR_PKGNAME)
else: else:
print("error: no action specified", file=sys.stderr) print("error: no action specified", file=sys.stderr)
exit(1) exit(1)