summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-03-18 20:16:34 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-03-18 20:16:34 -0500
commit6fee4a09ee12c43bd0bc9f702aec4b7dd0d53a08 (patch)
tree7b0a74a8a1058a2d13a147a655d2fde3bfea381f
parent9b2447bdb035755c183f462b7424587f93f7503c (diff)
downloadabslibre-6fee4a09ee12c43bd0bc9f702aec4b7dd0d53a08.tar.gz
abslibre-6fee4a09ee12c43bd0bc9f702aec4b7dd0d53a08.tar.bz2
abslibre-6fee4a09ee12c43bd0bc9f702aec4b7dd0d53a08.zip
udev-openrc: add new package to [pcr]
-rw-r--r--pcr/udev-openrc/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/pcr/udev-openrc/PKGBUILD b/pcr/udev-openrc/PKGBUILD
new file mode 100644
index 000000000..af3c6df06
--- /dev/null
+++ b/pcr/udev-openrc/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer (Manjaro): artoo <artoo@manjaro.org>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_url="https://raw.githubusercontent.com/gentoo/gentoo/master"
+
+pkgname=udev-openrc
+pkgver=30
+pkgrel=3
+pkgdesc="OpenRC udev startup scripts"
+arch=('any')
+url="https://github.com/manjaro/packages-openrc"
+license=('GPL2')
+groups=('openrc-base' 'openrc-desktop')
+depends=('openrc' 'udev')
+conflicts=('systemd-sysvcompat')
+source=("http://dev.gentoo.org/~williamh/dist/udev-init-scripts-${pkgver}.tar.gz"
+ "kmod-static-nodes.initd::${_url}/sys-apps/kmod/files/kmod-static-nodes-r1")
+sha256sums=('4de998d68e28f8ce4c1d4c9955aec0fa4cfe84673cbf3bfe1be71a1e9918693f'
+ 'b9452437b06aae67e19e2cade37e89398ab5a7162318e15d1ed083606b1fe7e0')
+
+_inst_initd(){
+ install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
+
+ sed -e 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' \
+ -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|' \
+ -e 's|/var/run|/run|g' \
+ -i ${pkgdir}/etc/init.d/$1
+}
+
+_inst_confd(){
+ install -Dm755 ${srcdir}/$1.confd ${pkgdir}/etc/conf.d/$1
+}
+
+package(){
+ cd "${srcdir}/udev-init-scripts-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "s|#!/sbin/openrc-run|#!/usr/bin/openrc-run|" \
+ -e "s|#!/sbin/runscript|#!/usr/bin/openrc-run|" \
+ -e "s|/bin/udevadm|/usr/bin/udevadm|g" \
+ -e "s|/sbin/udevd|/usr/bin/udevd|g" \
+ -i "$f"
+ done
+ install -d "${pkgdir}/etc/runlevels/sysinit"
+ ln -sf "/etc/init.d/udev" "${pkgdir}/etc/runlevels/sysinit/udev"
+ ln -sf "/etc/init.d/udev-trigger" "${pkgdir}/etc/runlevels/sysinit/udev-trigger"
+
+ # kmod-static-nodes
+ _inst_initd 'kmod-static-nodes'
+
+ ln -sf "/etc/init.d/kmod-static-nodes" "${pkgdir}/etc/runlevels/sysinit/kmod-static-nodes"
+}