aboutsummaryrefslogtreecommitdiff
path: root/openrc/PKGBUILD
blob: e7f97ceb8885f0c9fefeb70c093da12b55809ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer : David Phillips <david sighup d.t nz>
# Contributor:  Andrew Gregory <andrew.gregory.8@gmail.com>
# Contributor: Lone_Wolf <lonewolf at xs4all dot nl>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=openrc
pkgver=0.31.1
pkgrel=1
pkgdesc='Dependency-based init system that works with sysvinit.'
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')
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=("$pkgname-$pkgver::https://github.com/OpenRC/$pkgname/archive/$pkgver.tar.gz"
        "$pkgname.logrotate")
sha512sums=('98001e05896d113e20fad27ba100e2db5588262cb9c0b52c2800b38fd320b9baf4a99302044ef4045ba3a746d685d0cc27f8fdb42dccbc0574e32c6db9e6d3d2'
            '690612fddfb2c4cf8f6b5ba7239b9faf29eb3d9b152ab4dcf62694aa2852780440d08cee56d98a9597607f446b3697c911269562821a8402bb5747cbbae34bd9')


# LIBMODE to enable binary stripping by makepkg
MAKEFLAGS="BRANDING='Arch Linux'\
           MKPAM=pam \
           MKSELINUX=no \
           MKTERMCAP=ncurses \
           PKG_PREFIX="" \
           LIBDIR=/usr/lib \
           LIBMODE=0644 \
           SHLIBDIR=/usr/lib \
           LIBEXECDIR=/usr/lib/openrc \
           BINDIR=/usr/bin \
           SBINDIR=/usr/bin \
           SYSCONFDIR=/etc/openrc"

build() {
    cd "${pkgname}-${pkgver}"
    make
}

package() {

    cd "${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install

    # avoid initscripts conflict, requires openrc-sysvinit
    install -m 644 support/sysvinit/inittab "${pkgdir}/etc/openrc/inittab"

    # rotate boot log
    install -Dm0644 "${srcdir}/${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}"

    install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
    install -m644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" "${srcdir}/${pkgname}-${pkgver}/AUTHORS" "${pkgdir}/usr/share/licenses/${pkgname}/"
}