forked from semios/ports
Compare commits
1
Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
7e4e1ece86 |
@@ -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,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": []
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|||||||
@@ -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_url("https://gitea.semilabs.org/semios/init-scripts/archive/0.1.0-alpha.1.tar.gz")
|
||||||
|
|
||||||
|
|
||||||
|
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,103 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
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")
|
|
||||||
|
|
||||||
builddep("shortcut/c")
|
|
||||||
builddep("shortcut/meson")
|
|
||||||
builddep("flex")
|
|
||||||
builddep("bison")
|
|
||||||
builddep("libxml2-dev @target")
|
|
||||||
builddep("libwayland-dev @target")
|
|
||||||
builddep("wayland-protocols @target")
|
|
||||||
builddep("awk")
|
|
||||||
builddep("bash")
|
|
||||||
builddep("xkeyboard-config-dev (=2.48) @any")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
os.environ["PKG_CONFIG_PATH"] = "/share/pkgconfig"
|
|
||||||
|
|
||||||
# FIXME: Building the package requires `/bin/sh` to be bash.
|
|
||||||
if in_atomic():
|
|
||||||
os.system("ln -sf /bin/bash /bin/sh")
|
|
||||||
|
|
||||||
cpp.meson_setup([
|
|
||||||
f"--libdir={get_prefix('libxkbcommon')}/lib",
|
|
||||||
f"--includedir={get_prefix('libxkbcommon-dev')}/include",
|
|
||||||
f"--bindir={get_prefix('xkbcli')}/bin",
|
|
||||||
f"--libexecdir={get_prefix('xkbcli')}/libexec",
|
|
||||||
"-Denable-x11=false",
|
|
||||||
])
|
|
||||||
cpp.meson_compile()
|
|
||||||
cpp.meson_install()
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_libxkbcommon(composer):
|
|
||||||
composer.makedir("lib")
|
|
||||||
for i in glob.glob("lib/*common*so*"):
|
|
||||||
composer.add(i)
|
|
||||||
|
|
||||||
package("libxkbcommon")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
def pack_libxkbregistry(composer):
|
|
||||||
composer.makedir("lib")
|
|
||||||
for i in glob.glob("lib/*registry*so*"):
|
|
||||||
composer.add(i)
|
|
||||||
|
|
||||||
package("libxkbregistry")
|
|
||||||
dep("semi-libc @same-arch")
|
|
||||||
dep("libxml2 @same-arch")
|
|
||||||
dep("xkeyboard-config (=2.48) @any")
|
|
||||||
cpp.use_auto_pack(["lib"])
|
|
||||||
|
|
||||||
def pack_libxkbcommon_dev(composer):
|
|
||||||
composer.makedirs("lib/pkgconfig")
|
|
||||||
composer.add("lib/pkgconfig/xkbcommon.pc")
|
|
||||||
composer.makedirs("include/xkbcommon")
|
|
||||||
for i in glob.glob("include/xkbcommon/*"):
|
|
||||||
if "registry" in i:
|
|
||||||
continue
|
|
||||||
composer.add(i)
|
|
||||||
|
|
||||||
package("libxkbcommon-dev")
|
|
||||||
dep("libxkbcommon (same)")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
|
|
||||||
def pack_libxkbregistry_dev(composer):
|
|
||||||
composer.makedirs("lib/pkgconfig")
|
|
||||||
with open("lib/pkgconfig/xkbregistry.pc", "r") as pcf:
|
|
||||||
pc = pcf.read()
|
|
||||||
pc = pc.replace(get_prefix("libxkbcommon"), get_prefix("libxkbregistry"))
|
|
||||||
pc = pc.replace(get_prefix("libxkbcommon-dev"), get_prefix("libxkbregistry-dev"))
|
|
||||||
with open("lib/pkgconfig/xkbregistry.pc", "wt+") as pcf:
|
|
||||||
pcf.write(pc)
|
|
||||||
composer.add("lib/pkgconfig/xkbregistry.pc")
|
|
||||||
composer.makedirs("include/xkbcommon")
|
|
||||||
for i in glob.glob("include/xkbcommon/*"):
|
|
||||||
if "registry" in i:
|
|
||||||
composer.add(i)
|
|
||||||
|
|
||||||
package("libxkbregistry-dev")
|
|
||||||
dep("libxkbregistry (same)")
|
|
||||||
dep("libxml2-dev @same-arch")
|
|
||||||
dep("xkeyboard-config-dev (=2.48) @any")
|
|
||||||
cpp.use_auto_pack(["dev"])
|
|
||||||
|
|
||||||
def pack_bin(composer):
|
|
||||||
composer.add("bin")
|
|
||||||
composer.add("libexec")
|
|
||||||
|
|
||||||
package("xkbcli")
|
|
||||||
dep("libxkbcommon (same)")
|
|
||||||
on_pack(pack_bin)
|
|
||||||
@@ -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,51 +0,0 @@
|
|||||||
import glob
|
|
||||||
|
|
||||||
from lib.make import *
|
|
||||||
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")
|
|
||||||
|
|
||||||
builddep("shortcut/c")
|
|
||||||
builddep("shortcut/meson")
|
|
||||||
builddep("libintl-dev @target")
|
|
||||||
builddep("gettext")
|
|
||||||
builddep("libexpat")
|
|
||||||
builddep("perl")
|
|
||||||
|
|
||||||
|
|
||||||
def build():
|
|
||||||
cpp.meson_setup([
|
|
||||||
f"--prefix={get_prefix('xkeyboard-config')}",
|
|
||||||
])
|
|
||||||
cpp.meson_compile()
|
|
||||||
cpp.meson_install()
|
|
||||||
|
|
||||||
on_build(build)
|
|
||||||
|
|
||||||
|
|
||||||
def pack(composer):
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add("share/xkeyboard-config-2")
|
|
||||||
|
|
||||||
package("xkeyboard-config")
|
|
||||||
arch_any()
|
|
||||||
on_pack(pack)
|
|
||||||
|
|
||||||
def pack_dev(composer):
|
|
||||||
for i in glob.glob("share/pkgconfig/*"):
|
|
||||||
with open(i, "r") as file:
|
|
||||||
content = file.read()
|
|
||||||
content = content.replace(get_prefix("xkeyboard-config-dev"), get_prefix("xkeyboard-config"))
|
|
||||||
with open(i, "wt+") as file:
|
|
||||||
file.write(content)
|
|
||||||
composer.makedir("share")
|
|
||||||
composer.add("share/pkgconfig")
|
|
||||||
|
|
||||||
package("xkeyboard-config-dev")
|
|
||||||
arch_any()
|
|
||||||
dep("xkeyboard-config (same-version) @any")
|
|
||||||
on_pack(pack_dev)
|
|
||||||
Reference in New Issue
Block a user