summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..58165a1642de
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = netplug
+ pkgdesc = A Linux daemon that manages network interfaces in response to network cables being plugged in and out
+ pkgver = 1.2.9.2
+ pkgrel = 3
+ url = http://www.red-bean.com/~bos/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = iproute2>=2.4.7
+ backup = etc/netplug.d/netplugd.conf
+ backup = etc/netplug.d/netplug
+ source = http://www.red-bean.com/~bos/netplug/netplug-1.2.9.2.tar.bz2
+ source = http://pkgs.fedoraproject.org/cgit/netplug.git/plain/netplugd.service
+ source = http://pkgs.fedoraproject.org/cgit/netplug.git/plain/netplug-1.2.9.2-man.patch
+ md5sums = 1d6db99536bdf875ce441f2c0e45ebf2
+ md5sums = 4482ef8c71bfb0b0335e9426d2852056
+ md5sums = 7c44d211426ef68af4b4896b2b870882
+
+pkgname = netplug
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c06259b6caf9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+pkgname=netplug
+pkgver=1.2.9.2
+pkgrel=3
+pkgdesc="A Linux daemon that manages network interfaces in response to network cables being plugged in and out"
+arch=('i686' 'x86_64')
+url="http://www.red-bean.com/~bos/"
+license=('GPL2')
+depends=('iproute2>=2.4.7')
+backup=("etc/$pkgname.d/${pkgname}d.conf"
+ "etc/$pkgname.d/$pkgname")
+source=("$url$pkgname/$pkgname-$pkgver.tar.bz2"
+ "http://pkgs.fedoraproject.org/cgit/$pkgname.git/plain/${pkgname}d.service"
+ "http://pkgs.fedoraproject.org/cgit/$pkgname.git/plain/$pkgname-$pkgver-man.patch")
+md5sums=('1d6db99536bdf875ce441f2c0e45ebf2'
+ '4482ef8c71bfb0b0335e9426d2852056'
+ '7c44d211426ef68af4b4896b2b870882')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -p1 < "$srcdir/$pkgname-$pkgver-man.patch"
+
+ # Place all configuration files in the same directory (/etc/netplug.d)
+ sed -e "/^etcdir ?=/ s|/etc/$pkgname|/etc/$pkgname.d|" \
+ -i Makefile
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" bindir=/usr/bin install
+
+ # Replace default sysvinit script with a systemd unit
+ rm -r "$pkgdir/"etc/rc.d
+ install -D -m644 {"$srcdir","$pkgdir/"usr/lib/systemd/system}/${pkgname}d.service
+}
+
+# vim: set ft=sh ts=4 sw=4 noet: