aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ifplugd/APKBUILD
blob: 109da89bd6487bb0353d9a7cc665c15262a3fc47 (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
# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
# Maintainer:
pkgname=ifplugd
pkgver=0.28
pkgrel=4
pkgdesc="Detect and take action when an ethernet cable is unplugged"
url="http://0pointer.de/lennart/projects/ifplugd"
arch="all"
license="GPL2+"
depends=""
depends_dev="libdaemon-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="http://dev.alpinelinux.org/archive/ifplugd-$pkgver.tar.gz
	$pkgname.initd
	musl-type.patch"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-lynx \
		--mandir=/usr/share/man \
		|| return 1
     make || return 1
}

package() {
	cd "$_builddir"
 	make DESTDIR="$pkgdir" install || return 1
 	install -m755 -D "$pkgdir"/etc/init.d/$pkgname "$pkgdir"/usr/sbin/$pkgname-helper
 	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

md5sums="df6f4bab52f46ffd6eb1f5912d4ccee3  ifplugd-0.28.tar.gz
7d7d45d6cf8edcb46ff18bedf7cfb961  ifplugd.initd
e96027299ece16ac8e48bf9244d75222  musl-type.patch"
sha256sums="474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0  ifplugd-0.28.tar.gz
f9c9e4872cedca9dc9d68fcba67359f802f1a0b89b85ed983d619b6e55e87372  ifplugd.initd
29df5d6628ebc22e5ba76591d326e031bd040c8e42d116614aa68a7b0c7430d9  musl-type.patch"
sha512sums="c606e456f81f224eba9f8912e11fb76b759c160313d1db3c9035775b8c1ca57ca10c88dfb33318ba02f5c025218a377ca78ee160fc3d9a31ac6e95b92f340d4f  ifplugd-0.28.tar.gz
ea0393d2dd0c047d9164881b1fdd4ab4e3581e8758e167a8ae22b2c4b5f361a05dbd126d4c0238204e87322127ebfe70a24b0c9773c3372257180e6cc29a7b1d  ifplugd.initd
bd221a2074c3f4310501d51659dddf9a84ca3d93457abdd176ca7c843ee05909f831d5808832945d6d0442b0246a1e1573fdbbc6e6fd40cae5d2460d41587d32  musl-type.patch"