PKGBUILDs/extra/ifplugd/PKGBUILD

39 lines
1.5 KiB
Bash
Raw Normal View History

2009-10-10 02:23:22 +00:00
# $Id: PKGBUILD 40898 2009-05-31 21:45:42Z thayer $
# Contributor: Manolis Tzanidakis
# Contributor: kevin <kevin@archlinux.org>
# Maintainer: Thayer Williams <thayer@archlinux.org>
pkgname=ifplugd
pkgver=0.28
pkgrel=6
pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
arch=('i686' 'x86_64')
url="http://0pointer.de/lennart/projects/ifplugd"
license=('GPL2')
depends=('libdaemon' 'bash')
backup=('etc/ifplugd/ifplugd.conf' 'etc/ifplugd/ifplugd.action')
options=('!makeflags')
source=($url/$pkgname-$pkgver.tar.gz 'ifplugd' 'ifplugd.action' 'ifplugd-0.28-interface.patch')
md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3' '70d66121ae5163348855236951e069a2'\
'9a1f7f70e42a844131b4295aa6b9019a' '54eb22844b5aeed161c0b80aa9008570')
build() {
cd $srcdir/$pkgname-$pkgver
patch -p0 < ../ifplugd-0.28-interface.patch
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \
--with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
/usr/bin/make || return 1
/usr/bin/make DESTDIR=$pkgdir install
# replace INTERFACES with NET_IFS since AL already uses it in /etc/rc.conf
/bin/sed -i "s:INTERFACES:NET_IFS:g" \
$pkgdir/etc/ifplugd/ifplugd.conf || return 1
# replace the default init script & action files with ours.
#/bin/rm -rf $/pkgdir/etc/init.d
/bin/install -D -m755 $srcdir/ifplugd $pkgdir/etc/rc.d/ifplugd || return 1
/bin/install -D -m755 $srcdir/ifplugd.action \
$pkgdir/etc/ifplugd/ifplugd.action || return 1
}