aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ifplugd/APKBUILD
blob: ba645e14f0618ef1e3f8dadbf5b966afbe292c58 (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
# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
# Maintainer:
pkgname=ifplugd
pkgver=0.28
pkgrel=3
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://0pointer.de/lennart/projects/ifplugd/ifplugd-$pkgver.tar.gz
		$pkgname.initd"

_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"