# Maintainer: Marco Rubin # Contributor: EatMyVenom # Contributor: Andrew Gregory # Contributor: Lone_Wolf # Contributor: Bartłomiej Piotrowski pkgname=openrc pkgver=0.54 pkgrel=1 pkgdesc='Dependency based init system that works with sysvinit and systemd or on its own.' arch=('i686' 'x86_64') url='https://github.com/OpenRC/openrc' license=('BSD') depends=('pam') optdepends=('openrc-arch-services-git: collection of services for Arch' 'net-tools: for network service support' 'opentmpfiles: adds support for systemd-style tmpfiles.d' 'bash-completion: tab completion for openrc commands in bash shells' 'zsh-completions: tab completion for openrc commands in zsh shells') makedepends=('meson' 'pam' 'psmisc') provides=('librc.so' 'init-rc' 'libeinfo.so' 'svc-manager') backup=(etc/openrc/inittab etc/openrc/rc.conf etc/openrc/conf.d/{bootmisc,consolefont,devfs,dmesg,fsck,hostname,hwclock,keymaps} etc/openrc/conf.d/{killprocs,localmount,modules,netmount,network,staticroute}) source=("$url/archive/$pkgver.tar.gz" 'openrc.logrotate') b2sums=('cdc420a3fa1733664eab0c556cb71712ecd1da17895aef6c77f229b3a9f9258b049c5f67d817a808253adb37afd0e65a276c7d89c77a64e3a1fd619f0a68e0ab' 'f283de20b5a07e3c5d21a28b9de72f0a71fd2cc1b70a5567db80373c7144aec0e6ac217eef77acbbb05eff2134c22ee6746b7f248abc4587042c456ed0a32a31') prepare() { cd $pkgname-$pkgver # inittab does not honor SBINDIR sed -ie 's!/sbin/rc!/usr/bin/rc!g' support/sysvinit/inittab } build() { cd $pkgname-$pkgver # libexecdir and sbindir: overwrite arch-meson defaults # sysconfdir: avoid conflicts with other init systems arch-meson \ --libexecdir=/usr/libexec/rc \ --sbindir=/usr/bin \ -Dbash-completions=true \ -Dbranding='"Arch Linux"' \ -Dos=Linux \ -Dpam=true \ -Dpkg_prefix='' \ -Dpkgconfig=true \ -Dselinux=disabled \ -Dsysconfdir=/etc/openrc \ -Dzsh-completions=true \ build meson compile -C build } package() { cd $pkgname-$pkgver meson install -C build --destdir "$pkgdir" # default path to inittab conflicts with initscripts # install -Dm644 support/sysvinit/inittab "$pkgdir/etc/inittab" # avoid initscripts conflict, requires openrc-sysvinit install -Dm644 support/sysvinit/inittab "$pkgdir/etc/openrc/inittab" # rotate boot log install -Dm0644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }