diff options
Diffstat (limited to 'nonsystemd')
-rw-r--r-- | nonsystemd/opentmpfiles/30-opentmpfiles.hook | 11 | ||||
-rw-r--r-- | nonsystemd/opentmpfiles/PKGBUILD | 37 | ||||
-rw-r--r-- | nonsystemd/opentmpfiles/tmpfiles-hook | 14 |
3 files changed, 62 insertions, 0 deletions
diff --git a/nonsystemd/opentmpfiles/30-opentmpfiles.hook b/nonsystemd/opentmpfiles/30-opentmpfiles.hook new file mode 100644 index 000000000..ac173048a --- /dev/null +++ b/nonsystemd/opentmpfiles/30-opentmpfiles.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = usr/lib/tmpfiles.d/*.conf + +[Action] +Description = Creating temporary files... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/tmpfiles-hook tmpfiles +NeedsTargets diff --git a/nonsystemd/opentmpfiles/PKGBUILD b/nonsystemd/opentmpfiles/PKGBUILD new file mode 100644 index 000000000..25a366aac --- /dev/null +++ b/nonsystemd/opentmpfiles/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: David P. <megver83@parabola.nu> +# Contributor: Luke Shumaker <lukeshu@parabola.nu> +# Maintainer (Artix): artoo <artoo@artixlinux.org> + +pkgname=opentmpfiles +pkgver=0.2 +pkgrel=1 +pkgdesc="A standalone utility for handling systemd-style tmpfiles.d settings" +arch=('any') +url="https://github.com/OpenRC/opentmpfiles" +license=('BSD2') +depends=('pacman') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz" + '30-opentmpfiles.hook' + 'tmpfiles-hook') +sha256sums=('4fa6a78600b1d67d34c441919e5e62ad181af358d9353ce380f515d623177ecb' + '23c73b3cc20ec38e0a5166f254293c911d20ae3efec8e133f424c1a1d0703fb8' + 'adbee03530006e8284ea44c5dd7eb99f6cc6c4e383c09fec36d7a22f7d486fc5') + +package_opentmpfiles() { + replaces=('opentmpfiles-systemdcompat') + conflicts=('opentmpfiles-systemdcompat' 'systemd-tools') + + cd "${pkgbase}-${pkgver}" + + make bindir="/usr/bin" DESTDIR="${pkgdir}" install + + # pacman hooks + install -Dm755 ${srcdir}/tmpfiles-hook "$pkgdir"/usr/share/libalpm/scripts/tmpfiles-hook + install -Dm644 -t "$pkgdir"/usr/share/libalpm/hooks ${srcdir}/*.hook + + ln -snf "/usr/bin/tmpfiles" "${pkgdir}/usr/bin/systemd-tmpfiles" + + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 "license" "${pkgdir}/usr/share/licenses/${pkgname}/" +} + diff --git a/nonsystemd/opentmpfiles/tmpfiles-hook b/nonsystemd/opentmpfiles/tmpfiles-hook new file mode 100644 index 000000000..786616b89 --- /dev/null +++ b/nonsystemd/opentmpfiles/tmpfiles-hook @@ -0,0 +1,14 @@ +#!/bin/sh -e + +each_conf() { + while read -r f; do + "$@" "$(basename "$f")" + done +} + +case $1 in + tmpfiles) each_conf /usr/bin/tmpfiles --create ;; + *) echo >&2 " Invalid operation '$1'"; exit 1 ;; +esac + +exit 0 |