summaryrefslogtreecommitdiff
path: root/pcr/opensysusers/PKGBUILD
blob: c4ec3993f3b34f9eff84c73e08fe3414dc53d6fd (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
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: David P. <megver83@parabola.nu>
# Maintainer (Artix): Chris Cromer <chris@artixlinux.org>

_url="https://github.com/artix-linux/opensysusers/archive"

pkgname=opensysusers
pkgver=0.3.2
pkgrel=4.parabola1
pkgdesc="A standalone utility for handling systemd-style sysusers.d users and groups"
arch=('any')
url="https://github.com/artix-linux/opensysusers"
license=('BSD2')
groups=('openrc-base' 'base-openrc')
depends=('shadow')
optdepends=('openrc: update automatically on boot')
source=("${pkgname}-${pkgver}.tar.gz::${_url}/${pkgver}.tar.gz"
        'opensysusers.hook'
        sysgid.patch::"https://github.com/artix-linux/opensysusers/commit/3f451ccfe5e5943d0ebc98f5f0d095a6c0ee11b4.patch")
sha256sums=('0a3ffb2bf5a3baa9bd49ef522d4bef7fbfa2f51ca6cce24d6354a7ae3c0344d8'
            '90fdf362a29138f1ed65e86e8b97d1251adb6b2e94d829cceb0094a63d00252a'
            '8575316ee9ab0f9b751e7856fbe28bfbe3d7442d56eab7582342d7bd8f1566d9')

prepare(){
    cd "${srcdir}/${pkgname}-${pkgver}"
    patch -Np 1 -i ${srcdir}/sysgid.patch
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make bindir="/usr/bin" DESTDIR="${pkgdir}" install
    ln -snf "/usr/bin/sysusers" "${pkgdir}/usr/bin/systemd-sysusers"

    install -vDm0755 openrc/opensysusers.initd "${pkgdir}"/etc/init.d/opensysusers
    
    install -dm0755 "${pkgdir}/etc/runlevels/boot"
    ln -snf "/etc/init.d/opensysusers" "${pkgdir}/etc/runlevels/boot/opensysusers"

    install -vDm0644 "${srcdir}"/opensysusers.hook "${pkgdir}/usr/share/libalpm/hooks/opensysusers.hook"
}