summaryrefslogtreecommitdiff
path: root/pcr/netifrc/PKGBUILD
blob: dedb469ebbef1d046c98d47fe3491d929904d293 (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
# Maintainer (Manjaro): artoo <artoo@manjaro.org>
# Contributor (Manjaro): williamh <williamh@gentoo.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@parabola.nu>

# Gentoo's ebuild file:
# https://gitweb.gentoo.org/repo/gentoo.git/tree/net-misc/netifrc/netifrc-0.6.1.ebuild
pkgname=netifrc
pkgver=0.6.1
pkgrel=1
pkgdesc="Gentoo Network Interface Management Scripts"
arch=('any')
url="https://wiki.gentoo.org/wiki/Netifrc"
license=('BSD2')
groups=('base-openrc')
depends=('gentoo-functions' 'openrc>=0.15' 'udev-init-scripts')
conflicts=('udev<172' 'udev-init-scripts<27')
makedepends=('git')
backup=('etc/conf.d/net')
validpgpkeys=('A28BEDE08F1744E16037514806C4536755758000') # Jason A. Donenfeld <zx2c4@gentoo.org>
source=("git://anongit.gentoo.org/proj/${pkgname}.git?signed#tag=${pkgver}")
sha256sums=('SKIP')

_makeargs=(
  SYSCONFDIR=/etc
  PREFIX=/usr
  SBINDIR=/usr/bin
  LIBEXECDIR="/usr/lib/${pkgname}"
)

build(){
    cd "$srcdir/$pkgname"
    make "${_makeargs[@]}"
}

package() {
    cd "$srcdir/$pkgname"

    make DESTDIR="$pkgdir" "${_makeargs[@]}" install
    
    install -Dm0644 doc/net.example "$pkgdir/etc/conf.d/net"

    install -d "$pkgdir/etc/runlevels/boot"
    ln -sT "/etc/init.d/net.lo" "$pkgdir/etc/runlevels/boot/net.lo"

    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}