archrelease: copy trunk to extra-x86_64
[arch-packages.git] / ifplugd / repos / extra-x86_64 / PKGBUILD
blobf5abbcf5e0471d500ba74c297ceaf447c97e40da
1 # Contributor: Manolis Tzanidakis
2 # Contributor: kevin <kevin@archlinux.org>
3 # Maintainer: 
5 pkgname=ifplugd
6 pkgver=0.28
7 pkgrel=17
8 pkgdesc="A daemon which brings up/down network interfaces upon cable insertion/removal."
9 arch=('x86_64')
10 url="http://0pointer.de/lennart/projects/ifplugd"
11 install=ifplugd.install
12 license=('GPL2')
13 depends=('libdaemon' 'bash')
14 backup=('etc/ifplugd/ifplugd.conf')
15 options=('!makeflags' '!emptydirs')
16 source=($url/${pkgname}-${pkgver}.tar.gz
17         ifplugd-0.28-interface.patch
18         ifplugd-fix-return-value.patch
19         ifplugd-daemon
20         ifplugd.systemd)
21 sha256sums=('474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0'
22             '1bdbe17f26f467be2a5f300f20f2f8aa332ffa48cbe50bfc4bbff37de8f1bc67'
23             'cbe50f373a30de95a7520f8084f99dac3f13ff9e73184877ed1add8ddcc2399e'
24             'd69608997bb61d1deeec1525e9e7a018374875ad65ab39111c232210a43af47a'
25             'f41b7a66a478652fa91a523c11943259a6e4b48b984dd314aca6309776533e83')
27 prepare() {
28   cd ${pkgname}-${pkgver}
29   patch -p0 -i ../ifplugd-0.28-interface.patch
30   patch -p1 -i ../ifplugd-fix-return-value.patch
31   sed 's|/var/run|/run|' -i src/ifplugd.c
34 build() {
35   cd ${pkgname}-${pkgver}
36   CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
37   ./configure --prefix=/usr --sbindir=/usr/bin --mandir=/usr/share/man --sysconfdir=/etc \
38       --with-initdir=/etc/rc.d --disable-xmltoman --disable-subversion --disable-lynx
39   make
42 package() {
43   cd ${pkgname}-${pkgver}
44   make DESTDIR="${pkgdir}" install
46   install -D -m755 "${srcdir}"/ifplugd-daemon "${pkgdir}"/usr/bin/ifplugd-daemon
47   # remove the default init script and action script
48   rm -f "${pkgdir}"/etc/{ifplugd/ifplugd.action,rc.d/ifplugd}
49   # install systemd unit
50   install -D -m644 "${srcdir}"/ifplugd.systemd "${pkgdir}"/usr/lib/systemd/system/ifplugd@.service