From 2cec37708ad22fefa7ecfb29add5b7a8de5dd221 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 7 Mar 2021 11:48:45 +0100 Subject: [PATCH] New package: rundird-0.1.1 --- common/build-style/zig.sh | 22 ++++++++++++++++++++++ srcpkgs/rundird/files/rundird/run | 2 ++ srcpkgs/rundird/template | 17 +++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 common/build-style/zig.sh create mode 100644 srcpkgs/rundird/files/rundird/run create mode 100644 srcpkgs/rundird/template diff --git a/common/build-style/zig.sh b/common/build-style/zig.sh new file mode 100644 index 000000000000..2fa0426debbd --- /dev/null +++ b/common/build-style/zig.sh @@ -0,0 +1,22 @@ +do_build() { + local zig_target_abi + case $XBPS_TARGET_LIBC in + glibc) zig_target_abi="gnu";; + musl) zig_target_abi="musl";; + esac + + # The Zig build system only has a single install step, there is no + # way to build artifacts for a given prefix and then install those artifacts + # to that prefix at some later time. Therefore, we build and install to the zig-out + # directory and later copy the artifacts to the destdir in do_install(). + # We use zig-out to avoid path conflicts as it is the default install + # prefix used by the zig build system. + DESTDIR="zig-out" zig build \ + --search-prefix $XBPS_CROSS_BASE \ + -Dtarget="${XBPS_TARGET_MACHINE%-musl}-linux-${zig_target_abi}" \ + -Drelease-safe --prefix /usr install +} + +do_install() { + cp -r zig-out/* "${DESTDIR}" +} diff --git a/srcpkgs/rundird/files/rundird/run b/srcpkgs/rundird/files/rundird/run new file mode 100644 index 000000000000..df06fdb0fc88 --- /dev/null +++ b/srcpkgs/rundird/files/rundird/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/rundird diff --git a/srcpkgs/rundird/template b/srcpkgs/rundird/template new file mode 100644 index 000000000000..5c7ab5408adf --- /dev/null +++ b/srcpkgs/rundird/template @@ -0,0 +1,17 @@ +# Template file for 'rundird' +pkgname=rundird +version=0.1.1 +revision=1 +build_style=zig +hostmakedepends="zig" +makedepends="pam-devel" +short_desc="Simple daemon + PAM module providing an XDG_RUNTIME_DIR" +maintainer="Isaac Freund " +license="GPL-3.0-or-later" +homepage="https://github.com/ifreund/rundird" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum=d3a848fba0016841385aab57298164ba8f30377799c217b6b6abf83ce1d2ca91 + +post_install() { + vsv rundird +}