summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLW-archlinux2017-03-12 19:10:04 +0100
committerLW-archlinux2017-03-12 19:10:04 +0100
commitd815f06915cf3b0070f38c498e8a37ce2d779147 (patch)
tree2c1579d9f50edffb0a64efa328aeb8d0f30c296c
downloadaur-d815f06915cf3b0070f38c498e8a37ce2d779147.tar.gz
initial upload to AUR
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD46
-rw-r--r--opentmpfiles.install15
-rw-r--r--replace-sbin-with-usr-bin.patch18
4 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1fc29018dc6f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = opentmpfiles
+ pkgdesc = a standalone utility for handling systemd-style tmpfiles.d settings
+ pkgver = 0.1.3
+ pkgrel = 1
+ url = https://github.com/openrc/opentmpfiles
+ install = opentmpfiles.install
+ arch = any
+ license = BSD
+ depends = openrc
+ depends = sh
+ backup = etc/openrc/conf.d/opentmpfiles-dev
+ backup = etc/openrc/conf.d/opentmpfiles-setup
+ source = opentmpfiles-0.1.3::https://github.com/OpenRC/opentmpfiles/archive/0.1.3.tar.gz
+ source = replace-sbin-with-usr-bin.patch
+ sha512sums = fd0b10ebfeb621466edadede50ec6e8f415861ab3b14b833c75bd71f7296e9c091e59144d39e1f9efd342b6d97776cade5a692c941085e33e9651fd885da7121
+ sha512sums = 7ff8e3269668850f0d812bb6003ec5111ee89a5beab882fd09c9a2cbb30b35a0b96c083bde007845418e8747082160f907b5043562425d909a13af0beacdb1e6
+
+pkgname = opentmpfiles
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cfb7edfc0b30
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer Lone_Wolf <lonewolf at xs4all dot nl>
+
+
+pkgname=opentmpfiles
+pkgver=0.1.3
+pkgrel=1
+pkgdesc='a standalone utility for handling systemd-style tmpfiles.d settings'
+arch=('any')
+url='https://github.com/openrc/opentmpfiles'
+license=('BSD')
+depends=('openrc' 'sh')
+
+backup=(etc/openrc/conf.d/opentmpfiles-dev etc/openrc/conf.d/opentmpfiles-setup )
+
+source=($pkgname-$pkgver::https://github.com/OpenRC/$pkgname/archive/$pkgver.tar.gz
+ replace-sbin-with-usr-bin.patch
+ )
+install=$pkgname.install
+
+sha512sums=('fd0b10ebfeb621466edadede50ec6e8f415861ab3b14b833c75bd71f7296e9c091e59144d39e1f9efd342b6d97776cade5a692c941085e33e9651fd885da7121'
+ '7ff8e3269668850f0d812bb6003ec5111ee89a5beab882fd09c9a2cbb30b35a0b96c083bde007845418e8747082160f907b5043562425d909a13af0beacdb1e6')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i "$srcdir"/replace-sbin-with-usr-bin.patch
+}
+
+package() {
+
+ cd "${pkgname}-${pkgver}"
+
+ # install tmpfiles.sh script
+ make bindir=/usr/bin DESTDIR="${pkgdir}" install
+
+ # put service files in correct locations
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ install -Dm755 openrc/$f.confd "$pkgdir"/etc/openrc/conf.d/$f
+ install -Dm755 openrc/$f.initd "$pkgdir"/etc/openrc/init.d/$f
+ done
+
+ # activating the services is done in .install file
+
+ # License is BSD 2 clause type and needs to be installed
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 "${srcdir}/${pkgname}-${pkgver}/license" "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/opentmpfiles.install b/opentmpfiles.install
new file mode 100644
index 000000000000..6265f6f6746d
--- /dev/null
+++ b/opentmpfiles.install
@@ -0,0 +1,15 @@
+## arg 1: the new package version
+post_install() {
+ echo "auto-enabling systemd-style tmpfiles support"
+ /usr/bin/rc-update add opentmpfiles-dev sysinit
+ /usr/bin/rc-update add opentmpfiles-setup boot
+}
+
+
+## arg 1: the old package version
+post_remove() {
+ echo "disabling systemd-style tmpfiles support"
+ /usr/bin/rc-update del opentmpfiles-dev sysinit
+ /usr/bin/rc-update del opentmpfiles-setup boot
+
+}
diff --git a/replace-sbin-with-usr-bin.patch b/replace-sbin-with-usr-bin.patch
new file mode 100644
index 000000000000..0f85afa65ad2
--- /dev/null
+++ b/replace-sbin-with-usr-bin.patch
@@ -0,0 +1,18 @@
+diff -ura opentmpfiles-0.1.3.org/openrc/opentmpfiles-dev.initd opentmpfiles-0.1.3.new/openrc/opentmpfiles-dev.initd
+--- opentmpfiles-0.1.3.org/openrc/opentmpfiles-dev.initd 2017-03-09 00:34:36.000000000 +0100
++++ opentmpfiles-0.1.3.new/openrc/opentmpfiles-dev.initd 2017-03-12 14:44:24.788332295 +0100
+@@ -1,4 +1,4 @@
+-#!/sbin/openrc-run
++#!/usr/bin/openrc-run
+ # Copyright 1999-2012 Gentoo Foundation
+ # Released under the 2-clause BSD license.
+
+diff -ura opentmpfiles-0.1.3.org/openrc/opentmpfiles-setup.initd opentmpfiles-0.1.3.new/openrc/opentmpfiles-setup.initd
+--- opentmpfiles-0.1.3.org/openrc/opentmpfiles-setup.initd 2017-03-09 00:34:36.000000000 +0100
++++ opentmpfiles-0.1.3.new/openrc/opentmpfiles-setup.initd 2017-03-12 14:44:45.410427676 +0100
+@@ -1,4 +1,4 @@
+-#!/sbin/openrc-run
++#!/usr/bin/openrc-run
+ # Copyright 1999-2012 Gentoo Foundation
+ # Released under the 2-clause BSD license.
+