# Contributor: Manolis Tzanidakis # Contributor: kevin # Maintainer: pkgname=ifplugd pkgver=0.28 pkgrel=17 pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal." arch=('x86_64') url="http://0pointer.de/lennart/projects/ifplugd" install=ifplugd.install license=('GPL2') depends=('libdaemon' 'bash') backup=('etc/ifplugd/ifplugd.conf') options=('!makeflags' '!emptydirs') source=($url/${pkgname}-${pkgver}.tar.gz ifplugd-0.28-interface.patch ifplugd-fix-return-value.patch ifplugd-daemon ifplugd.systemd ifplugd-nlapi-fix-replybuf-size.patch) md5sums=('df6f4bab52f46ffd6eb1f5912d4ccee3' '54eb22844b5aeed161c0b80aa9008570' 'f26dbd7597d9d637f0b2b104b11ab820' 'f2e8a37af52b79ee0e3c5bcc2470ce10' '3dc2ce45d0e12d155ecc7a5bc9e3ee04' 'f233834ee9c174336064286b920e3698') prepare() { cd ${pkgname}-${pkgver} patch -p0 -i ../ifplugd-0.28-interface.patch patch -p1 -i ../ifplugd-fix-return-value.patch patch -p1 -i ../ifplugd-nlapi-fix-replybuf-size.patch sed 's|/var/run|/run|' -i src/ifplugd.c } build() { cd ${pkgname}-${pkgver} CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \ --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx make } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install install -D -m755 "${srcdir}"/ifplugd-daemon "${pkgdir}"/usr/bin/ifplugd-daemon # remove the default init script and action script rm -f "${pkgdir}"/etc/{ifplugd/ifplugd.action,rc.d/ifplugd} # install systemd unit install -D -m644 "${srcdir}"/ifplugd.systemd "${pkgdir}"/usr/lib/systemd/system/ifplugd@.service }