summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Luttringer2021-01-19 02:52:56 +0100
committerSébastien Luttringer2021-01-19 03:00:00 +0100
commit5f0df1a5f268093da956a18e71304f9a48e7fa76 (patch)
tree9f0a4724db96cb81a45cd2755c5a43bc47d02d88
downloadaur-arptables.tar.gz
Move arptables from [extra] to [unsupported]
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD48
-rw-r--r--arptables.service13
-rw-r--r--arptables.systemd21
4 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bc742a3de838
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = arptables
+ pkgdesc = ARP filtering utility
+ pkgver = 0.0.4
+ pkgrel = 6
+ url = https://ebtables.netfilter.org/
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ depends = perl
+ depends = bash
+ backup = etc/arptables.conf
+ source = ftp://ftp.netfilter.org/pub/arptables/arptables-v0.0.4.tar.gz
+ source = arptables.systemd
+ source = arptables.service
+ md5sums = c2e99c3aa9d78c9dfa30710ca3168182
+ md5sums = e54342a833c52b2bc67e7985e8f8fdfd
+ md5sums = 7e908fd77ef05bc7a9a05b6e877cd2bf
+
+pkgname = arptables
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..89e9d82d5ae5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Sébastien Luttringer
+# Contributor: Daniel Micay <danielmicay@gmail.com>
+# Contributor: Michal Soltys <soltys@ziu.info>
+
+pkgname=arptables
+pkgver=0.0.4
+pkgrel=6
+pkgdesc='ARP filtering utility'
+arch=('x86_64')
+url='https://ebtables.netfilter.org/'
+depends=('glibc' 'perl' 'bash')
+license=('GPL')
+backup=("etc/$pkgname.conf")
+source=("ftp://ftp.netfilter.org/pub/arptables/arptables-v$pkgver.tar.gz"
+ "$pkgname.systemd"
+ "$pkgname.service")
+md5sums=('c2e99c3aa9d78c9dfa30710ca3168182'
+ 'e54342a833c52b2bc67e7985e8f8fdfd'
+ '7e908fd77ef05bc7a9a05b6e877cd2bf')
+
+build() {
+ cd $pkgname-v${pkgver//_/-}
+ make
+}
+
+package() {
+ pushd $pkgname-v${pkgver//_/-}
+ make install \
+ DESTDIR="$pkgdir" \
+ PREFIX=/usr \
+ LIBDIR=/usr/lib/arptables \
+ BINDIR=/usr/bin \
+ MANDIR=/usr/share/man \
+ INITDIR=/etc/rc.d \
+ SYSCONFIGDIR=/etc
+ popd
+ # systemd
+ install -Dm 755 $pkgname.systemd \
+ "$pkgdir/usr/lib/systemd/scripts/$pkgname"
+ install -Dm 644 $pkgname.service \
+ "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ # default config file
+ install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf"
+ # remove upstream rc
+ rm -rf "$pkgdir/etc/rc.d"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/arptables.service b/arptables.service
new file mode 100644
index 000000000000..9d0f9e69e594
--- /dev/null
+++ b/arptables.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=ARP Tables
+Before=network-pre.target
+Wants=network-pre.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/scripts/arptables start
+ExecStop=/usr/lib/systemd/scripts/arptables stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/arptables.systemd b/arptables.systemd
new file mode 100644
index 000000000000..6a40192570a7
--- /dev/null
+++ b/arptables.systemd
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+CONFIG_FILE='/etc/arptables.conf'
+
+case $1 in
+ start)
+ arptables-restore < "$CONFIG_FILE"
+ ;;
+ stop)
+ arptables-restore < /dev/null
+ ;;
+ save)
+ arptables-save > "$CONFIG_FILE"
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|save}" >&2
+ exit 1
+ ;;
+esac
+
+# vim:set ts=2 sw=2 ft=sh et: