# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Contrinutor: Lee Starnes <lee@canned-death.us>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=netifrc
pkgver=0.7.1
pkgrel=0
pkgdesc="User-friendly network interface management scripts for OpenRC"
url="https://www.gentoo.org/proj/en/base/openrc/"
arch="noarch"
options="!check"  # No test suite.
license="BSD-2-Clause"
depends="eudev openrc perl"
makedepends="eudev-dev pkgconf"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://gitweb.gentoo.org/proj/$pkgname.git/snapshot/$pkgname-$pkgver.tar.gz
	switch-l2tp-gawk-to-perl.patch"

build() {
	make UDEVDIR=/lib/udev LIBEXECDIR=/lib/$pkgname PF="$pkgname-$pkgver"
}

package() {
	make UDEVDIR=/lib/udev LIBEXECDIR=/lib/$pkgname DESTDIR="$pkgdir" install
	for doc in README CREDITS TODO; do
		install -m 644 "$builddir"/$doc "$pkgdir"/usr/share/doc/$pkgname/
	done
}

sha512sums="407071f8f58b7788703a62193677673ddd18114b69142894674337410473e620cf3895bb014cff133f719ac1a7191ac3bedfd969c9a11bf2f1c4b04d39683057  netifrc-0.7.1.tar.gz
21d5755d911446abaed75e19c86e6f090da4db6cbcac45d8473d01c2ce309da3debdbe84e538b559bda1a8c538c9be6d182c67c9253229f8d12e3d7b8257fb90  switch-l2tp-gawk-to-perl.patch"