47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
import os
|
|
import shutil
|
|
|
|
from lib import rust
|
|
from lib.make import *
|
|
|
|
version("0.1.0-alpha.3")
|
|
description("SemiOS system account service & utilities")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("gitea://gitea.semilabs.org/semios/account#v0.1.0-alpha.3", "rust")
|
|
|
|
builddep("shortcut/rust")
|
|
builddep("libpam-dev @target")
|
|
|
|
|
|
def build():
|
|
os.environ["DEFAULT_LIBEXEC_DIR"] = get_prefix("account") + "/libexec"
|
|
os.makedirs("build_config", exist_ok=True)
|
|
shutil.copy2("../../init.wdjson", "build_config/init.wdjson")
|
|
rust.build(["--features", "embed_init_file"])
|
|
|
|
|
|
on_build(build)
|
|
|
|
|
|
def pack(composer):
|
|
composer.makedirs("share/services")
|
|
composer.addfile("misc/accountd.airs", "share/services/accountd.airs")
|
|
os.chdir(rust.artifacts_dir())
|
|
composer.makedir("bin")
|
|
composer.makedir("libexec")
|
|
composer.addfile("account", "bin/account")
|
|
composer.addfile("accountd", "bin/accountd")
|
|
composer.addfile("auth_password", "libexec/auth_password")
|
|
|
|
def pack_pam(composer):
|
|
composer.makedirs("lib/pam")
|
|
composer.addfile("libpam_semios.so", "lib/pam/pam_semios.so")
|
|
|
|
package("account")
|
|
dep("semi-libc @same-arch")
|
|
on_pack(pack)
|
|
|
|
package("pam-semios")
|
|
dep("semi-libc @same-arch")
|
|
on_pack(pack_pam)
|