Compare commits

..
12 Commits
Author SHA1 Message Date
sisungo 16a1087785 feat: add package file
Signed-off-by: sisungo <[email protected]>
2026-06-27 18:28:20 +08:00
sisungo d0186dacb5 Merge pull request 'feat: add package python' (#49) from sisungo/semios-packages:python into master
Reviewed-on: semios/semios-packages#49
2026-06-27 13:45:30 +08:00
sisungo 574f8a5996 Merge pull request 'feat: update semi-libc to v1.2.6' (#50) from sisungo/semios-packages:semi-libc-new into master
Reviewed-on: semios/semios-packages#50
2026-06-27 13:44:27 +08:00
sisungo bb3c5b2741 feat: update semi-libc to v1.2.6
Signed-off-by: sisungo <[email protected]>
2026-06-27 13:43:36 +08:00
sisungo e749a4f1f9 feat: add package python
Signed-off-by: sisungo <[email protected]>
2026-06-27 10:46:20 +08:00
sisungo 10ca4e4931 Merge pull request 'feat: add package openssh' (#47) from sisungo/semios-packages:openssh into master
Reviewed-on: semios/semios-packages#47
2026-06-26 19:58:49 +08:00
sisungo e65eee4bf1 Merge pull request 'feat: add package iana-timezone' (#46) from sisungo/semios-packages:iana-timezone into master
Reviewed-on: semios/semios-packages#46
2026-06-26 19:58:39 +08:00
sisungo 7797e7674c Merge pull request 'feat: add package mandoc' (#45) from sisungo/semios-packages:mandoc into master
Reviewed-on: semios/semios-packages#45
2026-06-26 19:58:24 +08:00
sisungo d9b7a01d01 Merge pull request 'feat: add package ncurses' (#48) from sisungo/semios-packages:ncurses into master
Reviewed-on: semios/semios-packages#48
2026-06-26 19:58:08 +08:00
sisungo 232d8c51d6 feat: add package ncurses
Signed-off-by: sisungo <[email protected]>
2026-06-26 18:11:33 +08:00
sisungo 510eca1ab6 feat: add package iana-timezone
Signed-off-by: sisungo <[email protected]>
2026-06-26 16:43:12 +08:00
sisungo 057330e43f feat: add package mandoc
Signed-off-by: sisungo <[email protected]>
2026-06-26 14:30:24 +08:00
6 changed files with 262 additions and 2 deletions
+43
View File
@@ -0,0 +1,43 @@
import subprocess
from lib import cpp
from lib.make import *
VERSION = "5.48"
version(VERSION)
source_git("https://github.com/file/file.git", "FILE5_48")
def build():
subprocess.run(["autoreconf", "-fiv"], check=True)
cpp.configure(["--prefix=/", f"--datadir=/share/file"])
cpp.make()
cpp.make_install()
on_build(build)
def pack_magic_db(composer):
composer.add_dir(f"share/file", "share")
package("file-magic-db")
arch_any()
link("share/misc/magic.mgc", "/share/file/misc/magic.mgc")
on_pack(pack_magic_db)
package("libmagic")
dep("semi-libc @same-arch")
dep("file-magic-db (same-version) @any")
cpp.use_auto_pack(["lib"])
package("libmagic-dev")
dep("libmagic (same)")
cpp.use_auto_pack(["dev"])
package("file")
dep("libmagic (same)")
cpp.use_auto_pack(["bin"])
+33
View File
@@ -0,0 +1,33 @@
import os
from lib import cpp
from lib.make import *
version("2026.4.22")
source_url("https://data.iana.org/time-zones/releases/tzdb-2026b.tar.lz")
def build():
cpp.make()
cpp.make_install()
os.chdir("usr")
on_build(build)
def pack_db(composer):
composer.makedir("share")
composer.add_dir("share/zoneinfo", "share/zoneinfo")
package("iana-timezone-db")
arch_any()
on_pack(pack_db)
package("iana-timezone-tools")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["bin"])
package("iana-timezone-dev")
cpp.use_auto_pack(["dev"])
+22
View File
@@ -0,0 +1,22 @@
import os
import subprocess
from lib import cpp
from lib.make import *
version("1.14.6")
source_url("https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz")
def build():
cpp.configure()
cpp.make([f"CC={os.environ['CC']}"])
cpp.make_install()
os.chdir("usr/local")
subprocess.run(["sh", "-c", "chmod +w bin/* sbin/*"], check=True)
on_build(build)
package("mandoc")
cpp.use_auto_pack(["bin"])
+62
View File
@@ -0,0 +1,62 @@
import os
from lib import cpp
from lib.make import *
version("6.6")
source_url("https://invisible-island.net/archives/ncurses/ncurses-6.6.tar.gz")
def build():
cpp.configure(
[
"--prefix=/",
"--enable-pc-files",
"--with-shared",
"--with-terminfo-dirs=/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()
os.unlink("lib/terminfo")
os.rename("usr/lib/pkgconfig", "lib/pkgconfig")
on_build(build)
package("libncurses")
dep("semi-libc @same-arch")
cpp.use_auto_pack(["lib"])
package("ncurses-tools")
dep("libncurses (same)")
cpp.use_auto_pack(["bin"])
package("libncurses-dev")
dep("libncurses (same)")
cpp.use_auto_pack(["dev"])
def pack_terminfo(composer):
composer.makedir("share")
composer.add_dir("share/tabset", "share/tabset")
composer.add_dir("share/terminfo", "share/terminfo")
package("ncurses-terminfo")
arch_any()
on_pack(pack_terminfo)
+100
View File
@@ -0,0 +1,100 @@
import os
import shutil
import subprocess
from lib import arch, cpp
from lib.make import *
VERSION_BASE = "3.14"
VERSION_APPEND = "6"
VERSION_FULL = f"{VERSION_BASE}.{VERSION_APPEND}"
version(VERSION_FULL)
source_url(
f"https://www.python.org/ftp/python/{VERSION_FULL}/Python-{VERSION_FULL}.tar.xz"
)
def build():
cpp.configure(
[
"--prefix=/",
f"--with-platlibdir=lib/{arch.get_target()}",
"--enable-shared",
"--enable-safety",
"--enable-optimizations",
"--enable-loadable-sqlite-extensions",
"--enable-ipv6",
"--with-lto=thin",
"--with-tzpath=/share/zoneinfo",
"--with-system-expat",
"--with-system-libmpdec",
"--with-readline=editline",
"--with-tail-call-interp",
"--without-ensurepip",
]
)
cpp.make()
try:
shutil.rmtree("../cpp_install")
except:
pass
cpp.make_install()
os.rename(
f"lib/{arch.get_target()}/python{VERSION_BASE}", f"lib/python{VERSION_BASE}"
)
os.rmdir(f"lib/{arch.get_target()}")
on_build(build)
def python_config_target():
return arch.get_target().replace("-semios-linux", "-linux-musl")
def pack_libpython(composer):
# Pack the standard library
pystdpath = f"{composer.workdir}/bundle/lib/python{VERSION_BASE}"
composer.makedir("lib")
composer.add_dir(f"lib/python{VERSION_BASE}", f"lib/python{VERSION_BASE}")
shutil.rmtree(f"{pystdpath}/test")
os.remove(
f"{pystdpath}/config-{VERSION_BASE}-{python_config_target()}/libpython{VERSION_BASE}.a"
)
os.remove(f"{pystdpath}/config-{VERSION_BASE}-{python_config_target()}/python.o")
# Pack native libraries
composer.addfile(
f"lib/libpython{VERSION_BASE}.so", f"lib/libpython{VERSION_BASE}.so"
)
composer.addfile(
f"lib/libpython{VERSION_BASE}.so.1.0", f"lib/libpython{VERSION_BASE}.so.1.0"
)
composer.addfile("lib/libpython3.so", "lib/libpython3.so")
package("libpython")
dep("semi-libc @same-arch")
on_pack(pack_libpython)
package("python")
dep("libpython (same)")
cpp.use_auto_pack(["bin"])
link(f"bin/python{VERSION_BASE}", "/bin/python3")
link(f"bin/python{VERSION_BASE}", "/bin/python")
package("libpython-dev")
dep("libpython (same)")
cpp.use_auto_pack(["dev"])
def pack_test(composer):
composer.makedirs(f"lib/python{VERSION_BASE}")
composer.add_dir(f"lib/python{VERSION_BASE}/test", f"lib/python{VERSION_BASE}/test")
package("python-test")
dep("libpython (same)")
on_pack(pack_test)
+2 -2
View File
@@ -2,9 +2,9 @@ import lib.arch as arch
from lib.cpp import *
from lib.make import *
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.5.tar.gz")
version("1.2.5")
version("1.2.6")
source_url("https://gitea.semilabs.org/semios/semi-libc/archive/v1.2.6.tar.gz")
def build():
configure(["--prefix=/"])