From 4ec6f5cc0b168d7a7e458e43ff614a986945a836 Mon Sep 17 00:00:00 2001 From: beefcurtains Date: Sat, 30 May 2015 10:58:06 +0000 Subject: [PATCH 1/2] New package: arptables-0.0.4 --- .../arptables/patches/makefile-cflags.patch | 13 ++++++++++++ srcpkgs/arptables/template | 20 +++++++++++++++++++ srcpkgs/arptables/update | 1 + 3 files changed, 34 insertions(+) create mode 100644 srcpkgs/arptables/patches/makefile-cflags.patch create mode 100644 srcpkgs/arptables/template create mode 100644 srcpkgs/arptables/update diff --git a/srcpkgs/arptables/patches/makefile-cflags.patch b/srcpkgs/arptables/patches/makefile-cflags.patch new file mode 100644 index 00000000000..34dd2a8e776 --- /dev/null +++ b/srcpkgs/arptables/patches/makefile-cflags.patch @@ -0,0 +1,13 @@ +-D__GLIBC__=2 is required to build on *-musl, +it's normally defined by features.h of glibc. +--- Makefile.orig ++++ Makefile +@@ -11,7 +11,7 @@ + DESTDIR:= + + COPT_FLAGS:=-O2 +-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG ++override CFLAGS+=-Wall -D__GLIBC__=2 -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" + + ifndef ARPT_LIBDIR + ARPT_LIBDIR:=$(LIBDIR)/arptables diff --git a/srcpkgs/arptables/template b/srcpkgs/arptables/template new file mode 100644 index 00000000000..58c367f86df --- /dev/null +++ b/srcpkgs/arptables/template @@ -0,0 +1,20 @@ +# Template file for 'arptables' +pkgname=arptables +version=0.0.4 +revision=1 +wrksrc="${pkgname}-v${version}" +build_style=gnu-makefile +depends="perl" +short_desc="ARP table administration" +maintainer="beefcurtains " +license="GPL-2" +homepage="http://ebtables.sourceforge.net/" +distfiles="ftp://ftp.netfilter.org/pub/arptables/arptables-v0.0.4.tar.gz" +checksum=277985e29ecd93bd759a58242cad0e02ba9d4a6e1b7795235e3b507661bc0049 + +do_install() { + vbin arptables + vbin arptables-restore + vbin arptables-save + vman arptables.8 +} diff --git a/srcpkgs/arptables/update b/srcpkgs/arptables/update new file mode 100644 index 00000000000..5dd4ff91b57 --- /dev/null +++ b/srcpkgs/arptables/update @@ -0,0 +1 @@ +pattern="${pkgname}-v\\K[\\d.]+(?=\\.tar)" From 5506df67f487b7971bf0f8be461b2f9d5ee48e9c Mon Sep 17 00:00:00 2001 From: beefcurtains Date: Sun, 31 May 2015 03:31:37 +0000 Subject: [PATCH 2/2] arptables: add runit service --- srcpkgs/arptables/files/arptables/finish | 5 +++++ srcpkgs/arptables/files/arptables/run | 6 ++++++ srcpkgs/arptables/template | 1 + 3 files changed, 12 insertions(+) create mode 100755 srcpkgs/arptables/files/arptables/finish create mode 100755 srcpkgs/arptables/files/arptables/run diff --git a/srcpkgs/arptables/files/arptables/finish b/srcpkgs/arptables/files/arptables/finish new file mode 100755 index 00000000000..5c5d5361f8f --- /dev/null +++ b/srcpkgs/arptables/files/arptables/finish @@ -0,0 +1,5 @@ +#!/bin/sh +RULES=/etc/iptables/arptables.rules +[ -r conf ] && . ./conf +[ -n $SKIP_SAVE ] && exit 0 +arptables-save > $RULES diff --git a/srcpkgs/arptables/files/arptables/run b/srcpkgs/arptables/files/arptables/run new file mode 100755 index 00000000000..cf92801f9e6 --- /dev/null +++ b/srcpkgs/arptables/files/arptables/run @@ -0,0 +1,6 @@ +#!/bin/sh +RULES=/etc/iptables/arptables.rules +[ -r conf ] && . ./conf +[ -r $RULES ] || exit 0 +arptables-restore < $RULES +exec chpst -b arptables pause diff --git a/srcpkgs/arptables/template b/srcpkgs/arptables/template index 58c367f86df..6f7a04137ff 100644 --- a/srcpkgs/arptables/template +++ b/srcpkgs/arptables/template @@ -17,4 +17,5 @@ do_install() { vbin arptables-restore vbin arptables-save vman arptables.8 + vsv arptables }