57 lines
1.4 KiB
Python
57 lines
1.4 KiB
Python
import os
|
|
|
|
from lib.make import *
|
|
from lib import cpp, arch
|
|
|
|
|
|
version("0.9.3+1")
|
|
description("A minimal seat management daemon, and a universal seat management library.")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("srht://git.sr.ht/~kennylevinsen/seatd#0.9.3")
|
|
|
|
builddep("shortcut/c")
|
|
builddep("shortcut/meson")
|
|
if "linux" in arch.get_target():
|
|
builddep("linux-dev @target")
|
|
|
|
|
|
def build():
|
|
os.environ["CFLAGS"] = os.environ.get("CFLAGS", "") + " -Wno-error"
|
|
cpp.meson_setup([
|
|
f"--libdir={get_prefix('libseat')}/lib",
|
|
f"--includedir={get_prefix('libseat-dev')}/include",
|
|
f"--bindir={get_prefix('seatd')}/bin",
|
|
"-Ddefaultpath=/run/system/seatd.sock",
|
|
])
|
|
cpp.meson_compile()
|
|
cpp.meson_install()
|
|
|
|
on_build(build)
|
|
|
|
|
|
airs = os.getcwd() + "/files/seatd.airs"
|
|
|
|
def pack_daemon(composer):
|
|
composer.add("bin")
|
|
composer.makedirs("share/services")
|
|
composer.add(airs, "share/services/seatd.airs")
|
|
|
|
package("libseat")
|
|
dep("semi-libc @same-arch")
|
|
cpp.use_auto_pack(["lib"])
|
|
|
|
package("libseat-dev")
|
|
dep("semi-libc-dev @same-arch")
|
|
dep("libseat (same)")
|
|
if "linux" in arch.get_target():
|
|
dep("linux-dev @same-arch")
|
|
cpp.use_auto_pack(["dev"])
|
|
|
|
package("seatd")
|
|
dep("semi-libc @same-arch")
|
|
dep("libseat (same)")
|
|
# Our `.airs` file uses coreutils commands
|
|
dep("coreutils @same-arch")
|
|
configure_script("configure/create-group")
|
|
on_pack(pack_daemon)
|