From c46585d255183aa1cfbfc077ae56d7a1eba12f4b Mon Sep 17 00:00:00 2001 From: David P Date: Tue, 12 Nov 2019 23:21:59 -0300 Subject: addpkg: nonsystemd/opensysusers 0.5.1-1 Signed-off-by: David P --- nonsystemd/opensysusers/20-opensysusers.hook | 11 ++++++ nonsystemd/opensysusers/PKGBUILD | 55 ++++++++++++++++++++++++++++ nonsystemd/opensysusers/sysusers-hook | 14 +++++++ 3 files changed, 80 insertions(+) create mode 100644 nonsystemd/opensysusers/20-opensysusers.hook create mode 100644 nonsystemd/opensysusers/PKGBUILD create mode 100644 nonsystemd/opensysusers/sysusers-hook (limited to 'nonsystemd/opensysusers') diff --git a/nonsystemd/opensysusers/20-opensysusers.hook b/nonsystemd/opensysusers/20-opensysusers.hook new file mode 100644 index 000000000..f4e0839a5 --- /dev/null +++ b/nonsystemd/opensysusers/20-opensysusers.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = usr/lib/sysusers.d/*.conf + +[Action] +Description = Creating system user accounts... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/sysusers-hook sysusers +NeedsTargets diff --git a/nonsystemd/opensysusers/PKGBUILD b/nonsystemd/opensysusers/PKGBUILD new file mode 100644 index 000000000..384cb873e --- /dev/null +++ b/nonsystemd/opensysusers/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer David P. +# Contributor: Omar Vega Ramos +# Contributor: Luke Shumaker +# Maintainer (Artix): Chris Cromer +# Maintainer (Artix): artoo + +pkgbase=opensysusers +pkgname=(opensysusers opensysusers-docs) +pkgver=0.5.1 +pkgrel=1 +pkgdesc="A standalone utility for handling systemd-style sysusers.d users and groups" +arch=('any') +url="https://gitea.artixlinux.org/artix/opensysusers" +license=('BSD2') +makedepends=('docbook-xsl') +conflicts=('systemd-tools') +source=("${pkgbase}-${pkgver}.tar.gz::https://gitea.artixlinux.org/artix/opensysusers/archive/${pkgver}.tar.gz" + '20-opensysusers.hook' + 'sysusers-hook') +sha256sums=('e941ad0f8cb8b576d434c2880ef9374ba44f28a05a9325a55f09aab0974e3de3' + '8085d3f8e7b2030cef5e0f50622121ea161a2d9d087664f0a11d36f275b24970' + '4222b2496d8bb1ac9c07707e4ef1b334b8b59eb15451ea8ba0fd6e4c93e50c56') + +prepare(){ + cd "${pkgbase}" +} + +build(){ + cd "${pkgbase}" + make PREFIX=/usr HAVEOPENRC=no +} + +package_opensysusers() { + depends=('pacman') + replaces=('opensysusers-systemdcompat') + + cd "${pkgbase}" + make PREFIX=/usr DESTDIR="${pkgdir}" install-shared install-default-bin + + # pacman hooks + install -Dm755 ${srcdir}/sysusers-hook "$pkgdir"/usr/share/libalpm/scripts/sysusers-hook + install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook + + ln -snf "/usr/bin/sysusers" "${pkgdir}/usr/bin/systemd-sysusers" +} + +package_opensysusers-docs(){ + pkgdesc="Opensysusers man" + depends=('opensysusers') + replaces=(opensysusers-manpages) + + cd "${pkgbase}" + make PREFIX=/usr DESTDIR="${pkgdir}" install-man +} + diff --git a/nonsystemd/opensysusers/sysusers-hook b/nonsystemd/opensysusers/sysusers-hook new file mode 100644 index 000000000..03fec32dc --- /dev/null +++ b/nonsystemd/opensysusers/sysusers-hook @@ -0,0 +1,14 @@ +#!/bin/sh -e + +each_conf() { + while read -r f; do + "$@" "$(basename "$f")" + done +} + +case $1 in + sysusers) each_conf /usr/bin/systemd-sysusers ;; + *) echo >&2 " Invalid operation '$1'"; exit 1 ;; +esac + +exit 0 -- cgit v1.2.3