From 6fee4a09ee12c43bd0bc9f702aec4b7dd0d53a08 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Fri, 18 Mar 2016 20:16:34 -0500 Subject: udev-openrc: add new package to [pcr] --- pcr/udev-openrc/PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pcr/udev-openrc/PKGBUILD (limited to 'pcr') 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 +# Maintainer: Omar Vega Ramos + +_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" +} -- cgit v1.2.3-54-g00ecf