summaryrefslogtreecommitdiff
path: root/community/ipset
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/ipset
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/ipset')
-rw-r--r--community/ipset/PKGBUILD41
-rw-r--r--community/ipset/ipset.service12
2 files changed, 53 insertions, 0 deletions
diff --git a/community/ipset/PKGBUILD b/community/ipset/PKGBUILD
new file mode 100644
index 000000000..a4d3cb929
--- /dev/null
+++ b/community/ipset/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 90514 2013-05-12 23:45:55Z seblu $
+# Maintainer: Sébastien Luttringer
+
+pkgname=ipset
+pkgver=6.19
+pkgrel=2
+pkgdesc='Administration tool for IP sets'
+arch=('i686' 'x86_64')
+url='http://ipset.netfilter.org'
+license=('GPL2')
+depends=('libmnl' 'bash')
+backup=("etc/$pkgname.conf")
+options=('!libtool')
+source=("http://ipset.netfilter.org/$pkgname-$pkgver.tar.bz2"
+ "$pkgname.service")
+md5sums=('cabba1bd63a93f6e1c3db3fb22412b64'
+ '6be6a2b34c1f38fc8ad60828403e2077')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --sbindir=/usr/bin --with-kmod=no
+ make
+}
+
+package() {
+ pushd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ # install doc
+ install -dm755 "$pkgdir/usr/share/doc/$pkgname"
+ install -m644 README UPGRADE ChangeLog "$pkgdir/usr/share/doc/$pkgname"
+ # install pkgconfig file
+ install -Dm644 lib/libipset.pc "$pkgdir/usr/lib/pkgconfig/libipset.pc"
+ popd
+ # systemd
+ install -Dm 644 $pkgname.service \
+ "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ # default config file
+ install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/ipset/ipset.service b/community/ipset/ipset.service
new file mode 100644
index 000000000..39183c7d7
--- /dev/null
+++ b/community/ipset/ipset.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Loading IP Sets
+Before=iptables.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/ipset -f /etc/ipset.conf restore
+ExecStop=/usr/bin/ipset destroy
+
+[Install]
+WantedBy=multi-user.target