diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-03-23 11:58:01 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-03-23 11:58:01 -0300 |
commit | 1988c77fae4e3c3e762d1d361249e21622f548cf (patch) | |
tree | 5c0b658d83f23533b7c43758468b5282cd1ead68 /pcr/openrc-core/PKGBUILD | |
parent | 5333f9d3db9e5e7a174d4028107246338c1094eb (diff) | |
parent | 63dda12e2f3cdba9df1605f8ca845bf3ffcf416f (diff) | |
download | abslibre-1988c77fae4e3c3e762d1d361249e21622f548cf.tar.gz abslibre-1988c77fae4e3c3e762d1d361249e21622f548cf.tar.bz2 abslibre-1988c77fae4e3c3e762d1d361249e21622f548cf.zip |
Merge branch 'master' of ssh://projects.parabola.nu/~git/abslibre
Diffstat (limited to 'pcr/openrc-core/PKGBUILD')
-rw-r--r-- | pcr/openrc-core/PKGBUILD | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/pcr/openrc-core/PKGBUILD b/pcr/openrc-core/PKGBUILD new file mode 100644 index 000000000..1391075e5 --- /dev/null +++ b/pcr/openrc-core/PKGBUILD @@ -0,0 +1,134 @@ +# Maintainer : <freaj@riseup.net> +# Maintainer (Manjaro): artoo <artoo@manjaro.org> +# Contributor (Gentoo): williamh <williamh@gentoo.org> + +_pkgname="openrc" + +_src_uri="http://dev.gentoo.org/~williamh/dist" +_net_uri="http://dev.gentoo.org/~robbat2/distfiles" + +_udev="udev-init-scripts" +_uver=27 + +_net="netifrc" +_nver=0.2.4 + +pkgname=openrc-core +pkgdesc="Gentoo's universal init system, udev enabled." +pkgver=0.13.11 +pkgrel=1 +pkgdesc="Gentoo's universal init system, udev enabled." +arch=('i686' 'x86_64') +url="http://www.gentoo.org/proj/en/base/openrc/" +license=('GPL2') +depends=('inetutils' 'psmisc' 'sysvinit' 'udev>=186') +optdepends=('dhcpcd-openrc: dhcpcd initscript') +conflicts=('openrc' 'openrc-git' 'initscripts' 'systemd-sysvcompat' 'openrc-sysvinit') +backup=('etc/rc.conf' + 'etc/conf.d/consolefont' + 'etc/conf.d/keymaps' + 'etc/conf.d/hostname' + 'etc/conf.d/modules' + 'etc/conf.d/net' + 'etc/conf.d/hwclock' + 'etc/inittab') +install=${_pkgname}.install +source=("${_src_uri}/${_pkgname}-${pkgver}.tar.bz2" + "${_src_uri}/${_udev}-${_uver}.tar.bz2" + "${_net_uri}/${_net}-${_nver}.tar.bz2" + "${_pkgname}.logrotate" + 'kmod-static-nodes' + 'aufs-unmount.patch') + + +_base_args=(SYSCONFDIR=/etc) +if [ -f /etc/os-release ]; then + . /etc/os-release + _base_args+=(BRANDING="$NAME") +else + _base_args+=(BRANDING='Unknown Linux') +fi +_base_args+=(PREFIX=/usr) +_base_args+=(SBINDIR=/usr/bin) + +_rc_args=( "${_base_args[@]}" ) +_rc_args+=(LIBEXECDIR=/usr/lib/rc) +_rc_args+=(MKSELINUX=no) +_rc_args+=(MKPAM=pam) +_rc_args+=(MKTERMCAP=ncurses) +_rc_args+=(MKNET=no) + +_net_args=( "${_base_args[@]}" ) +_net_args+=(LIBEXECDIR=/usr/lib/${_net}) + +prepare(){ + cd "${srcdir}/${_pkgname}-${pkgver}" + local _bin='s|/sbin|/usr/bin|g' + sed -e "${_bin}" -i support/sysvinit/inittab + #sed -i 's:0444:0644:' mk/sys.mk + + patch -p1 -i "$srcdir/aufs-unmount.patch" +} + +build(){ + # make openrc + cd "${srcdir}/${_pkgname}-${pkgver}" + make "${_rc_args[@]}" + # make netifrc + cd "${srcdir}/${_net}-${_nver}" + make "${_net_args[@]}" +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" "${_rc_args[@]}" install + # inittab + install -m644 "${srcdir}/${_pkgname}-${pkgver}/support/sysvinit/inittab" "${pkgdir}/etc/inittab" + # logrotate + install -Dm644 "${srcdir}/${_pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${_pkgname}" + # enable unicode & logger + sed -e 's/#unicode="NO"/unicode="YES"/' \ + -e 's/#rc_logger="YES"/rc_logger="YES"/' \ + -i "${pkgdir}/etc/rc.conf" + + install -d ${pkgdir}/usr/lib/rc/cache + + # udev + cd "${srcdir}/${_udev}-${_uver}" + make DESTDIR="${pkgdir}" install + # fix shebang & path to udevd + local _bin='s|/sbin/udevd|/usr/bin/udevd|g' \ + _shebang='s|#!/sbin/runscript|#!/usr/bin/openrc-run|' + + sed -e "${_shebang}" \ + -e "${_bin}" \ + -i "${pkgdir}/etc/init.d/udev" + # create runlevel + cd "${srcdir}/${_pkgname}-${pkgver}" + ln -sf "/etc/init.d/udev" "${pkgdir}/etc/runlevels/sysinit/udev" + + # netifrc + cd "${srcdir}/${_net}-${_nver}" + make DESTDIR="${pkgdir}" "${_net_args[@]}" install + install -Dm 644 "${srcdir}/${_net}-${_nver}/doc/net.example" "${pkgdir}/etc/conf.d/net" + + _shebang='s|#!/usr/bin/runscript|#!/usr/bin/openrc-run|' + sed -e "${_shebang}" \ + -i "${pkgdir}/etc/init.d/net.lo" + + # create runlevel + ln -sf "/etc/init.d/net.lo" "${pkgdir}/etc/runlevels/boot/net.lo" + + # kmod-static-nodes + cd "${srcdir}/${_pkgname}-${pkgver}" + install -Dm755 "${srcdir}/kmod-static-nodes" "${pkgdir}/etc/init.d/kmod-static-nodes" + + # create runlevel + ln -sf "/etc/init.d/kmod-static-nodes" "${pkgdir}/etc/runlevels/sysinit/kmod-static-nodes" +} +sha256sums=('30edffa8b39d5e68129ddd9e8cd8dfde8ca8cfafc8b470124d7323a32a4a443c' + '1a091c361e9845861c138b505881edcb7b68fcf91708db526dff0b320243c936' + '9b53eb3c8e6e80cd4073a34f911a28055c28b9f7a9f119a397002b0de7ac0691' + '0b44210db9770588bd491cd6c0ac9412d99124c6be4c9d3f7d31ec8746072f5c' + 'fc90e8d480de39aff90e41477f79720a98bee2a2359c53c209d0ca7bb75fb6ba' + '5a22d53f3bda7365d12270845a62ef651f98725c84032ae8c9bdd6512b464ec9') |