APKBUILD 2.74 KB
Newer Older
1
2
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=ifupdown-ng
3
pkgver=0.10.2
4
pkgrel=2
5
6
7
8
9
pkgdesc="tools for managing network configuration"
url="https://github.com/ifupdown-ng/ifupdown-ng"
arch="all"
license="ISC"
checkdepends="kyua atf"
10
makedepends="scdoc"
11
install=""
12
subpackages="$pkgname-doc $pkgname-iproute2 $pkgname-ppp $pkgname-wireguard $pkgname-ethtool $pkgname-batman"
13
source="https://distfiles.dereferenced.org/ifupdown-ng/ifupdown-ng-$pkgver.tar.xz"
14
builddir="$srcdir/ifupdown-ng-$pkgver"
15
16
17
18
19
20
provides="ifupdown-any"
provider_priority=900

# We conflict with the vlan package because we provide our own
# vlan support with the link executor.
depends="!vlan"
21

22
23
# We only install the core executors right now.  The other executors are
# still being ported to run under ifupdown-ng natively, and so we will
24
25
26
# use the ifupdown scripts for now for those cases.  However, it is nice
# to make the automatic dependency resolution work, and ifupdown-ng
# provides some stubs to enable that.
27
_executor_stubs="bridge bond"
28

29
30
# These are optional executors which do not conflict with what we are
# presently shipping.  These executors require iproute2.
31
_executor_iproute2="vrf gre vxlan"
32
33

# These are all optional executors we plan to use.
34
_executor_opt="ppp wireguard ethtool batman $_executor_iproute2"
35

36
37
build() {
	make
38
	make docs
39
40
41
42
43
44
45
}

check() {
	make check
}

package() {
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	make DESTDIR="$pkgdir" EXECUTOR_SCRIPTS_OPT="$_executor_opt" EXECUTOR_SCRIPTS_STUB="$_executor_stubs" install install_docs
}

iproute2() {
	pkgdesc="ifupdown-ng integration for iproute2"
	depends="iproute2-minimal"
	install_if="$pkgname $depends"

	for exec in $_executor_iproute2; do
		amove usr/libexec/ifupdown-ng/$exec
	done
}

ppp() {
	pkgdesc="ifupdown-ng integration for ppp"
	depends="ppp-daemon"
	install_if="$pkgname $depends"

	amove usr/libexec/ifupdown-ng/ppp
65
66
}

67
68
wireguard() {
	pkgdesc="ifupdown-ng integration for wireguard"
69
	depends="wireguard-tools-wg"
70
71
72
73
74
	install_if="$pkgname $depends"

	amove usr/libexec/ifupdown-ng/wireguard
}

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
ethtool() {
	pkgdesc="ifupdown-ng integration for ethtool"
	depends="ethtool"
	install_if="$pkgname $depends"

	amove usr/libexec/ifupdown-ng/ethtool
}

batman() {
	pkgdesc="ifupdown-ng integration for B.A.T.M.A.N. advanced"
	depends="batctl"
	install_if="$pkgname $depends"

	amove usr/libexec/ifupdown-ng/batman
}

91
92
93
94
95
96
97
98
99
openrc() {
	pkgdesc="ifupdown-ng openrc init scripts"
	install_if="$pkgname openrc"
	replaces="openrc"

	install -D -m755 "$builddir"/dist/openrc/networking.initd "$subpkgdir"/etc/init.d/networking
	install -D -m644 "$builddir"/dist/openrc/networking.confd "$subpkgdir"/etc/conf.d/networking
}

100
sha512sums="b824e40cfafd9dc831f2adc547fb2877947ab264418b410be757686f62a8799fd2ad6101d673b9a7af5cd9f6bc4ccfb5a86a184aaeee25ff1a2e1db3e9c511c6  ifupdown-ng-0.10.2.tar.xz"