updated on Fri Jan 13 04:01:25 UTC 2012
[aur-mirror.git] / netplug / PKGBUILD
blobf8eaf3e148654a2a3413ab0a33b55c494f1bb62c
1 # vim:set ts=2 sw=2 et:
3 pkgname=netplug
4 pkgver=1.2.9.2
5 pkgrel=2
6 pkgdesc='A Linux daemon that manages network interfaces in response to network cables being plugged in and out.'
7 arch=('i686' 'x86_64')
8 url='http://www.red-bean.com/~bos/'
9 license=('GPL2')
10 depends=('iproute2>=2.4.7')
11 backup=('etc/netplug/netplug' 'etc/netplug/netplugd.conf')
12 options=('!purge')
13 install="${pkgname}d.install"
14 source=("http://www.red-bean.com/~bos/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
15         "rc.${pkgname}d"
16         "${pkgname}d.conf.d"
17         "${pkgname}d.install")
18 md5sums=('1d6db99536bdf875ce441f2c0e45ebf2'
19          '1f7a33ca800f04b2cdb01555292a55a7'
20          'ddda834021991b23d4c4fdf161523387'
21          '50c01189419b0fc26c0fd8d3efd7e1f6')
23 build() {
24   cd "${srcdir}/${pkgname}-${pkgver}"
26   # Remove tarball building stuff with hg from Makefile
27   /bin/sed --in-place '33,46 d' Makefile
28   /usr/bin/make scriptdir=/etc/netplug
30   # Adjust path to confifuration files into man pages
31   /bin/sed --in-place \
32     -e 's#/etc/netplug.d#/etc/netplug#' \
33     -e 's#/init.d##' \
34   man/man8/netplugd.8
37 package() {
38   cd "${srcdir}/${pkgname}-${pkgver}"
39   /usr/bin/make DESTDIR="${pkgdir}/" install \
40     bindir=/usr/sbin/ \
41     initdir=/etc/rc.d/ \
42     scriptdir=/etc/netplug
43   /bin/rm "${pkgdir}/etc/rc.d/${pkgname}d"
44   /bin/install -d -m755 "${pkgdir}/etc/conf.d/"
45   /bin/install -D -m644 "${srcdir}/${pkgname}d.conf.d" "${pkgdir}/etc/conf.d/${pkgname}d"
46   /bin/install -m755 -o root -g root "${srcdir}/rc.${pkgname}d" "${pkgdir}/etc/rc.d/${pkgname}d"
47