summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiorgio Dal Molin <giorgio.nicole@arcor.de>2014-11-12 17:41:06 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-11-12 21:43:56 +0100
commit8fbb012f92ed491620b8f0ae312c8842aadffe06 (patch)
tree4f7c72953d5bb0529bda5cd68eff82a70d1f576a
parentc12d635ca3ef24345e37aca7bd2bb1aa280c0e34 (diff)
build: add autotools support for the 'files' subdir
Added support to install some 'nft' scripts under '${sysconfdir}/nftables', typically '/etc/nftables'. Signed-off-by: Giorgio Dal Molin <giorgio.nicole@arcor.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac2
-rw-r--r--files/Makefile.am1
-rw-r--r--files/Makefile.in5
-rw-r--r--files/nftables/Makefile.am13
-rw-r--r--files/nftables/bridge-filter2
-rw-r--r--files/nftables/inet-filter2
-rw-r--r--files/nftables/ipv4-filter2
-rw-r--r--files/nftables/ipv4-mangle2
-rw-r--r--files/nftables/ipv4-nat2
-rw-r--r--files/nftables/ipv6-filter2
-rw-r--r--files/nftables/ipv6-mangle2
-rw-r--r--files/nftables/ipv6-nat2
13 files changed, 26 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index b7fdc42c..068009bd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,4 +2,5 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src \
include \
- doc
+ doc \
+ files
diff --git a/configure.ac b/configure.ac
index 7bbd86ef..1525ac4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,8 @@ AC_CONFIG_FILES([ \
include/linux/Makefile \
include/linux/netfilter/Makefile \
doc/Makefile \
+ files/Makefile \
+ files/nftables/Makefile \
])
AC_OUTPUT
diff --git a/files/Makefile.am b/files/Makefile.am
new file mode 100644
index 00000000..a8394c06
--- /dev/null
+++ b/files/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = nftables
diff --git a/files/Makefile.in b/files/Makefile.in
deleted file mode 100644
index dc237e23..00000000
--- a/files/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-install:
- @echo -e " INSTALL\tfiles"
- $(MKDIR_P) $(DESTDIR)/$(confdir)
- $(INSTALL) -m 755 -p $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/
- $(SED) -i "s~#\! nft~#\!@sbindir@/nft~" $(DESTDIR)/$(confdir)/*
diff --git a/files/nftables/Makefile.am b/files/nftables/Makefile.am
new file mode 100644
index 00000000..1378e2b6
--- /dev/null
+++ b/files/nftables/Makefile.am
@@ -0,0 +1,13 @@
+
+pkgsysconfdir = ${sysconfdir}/nftables
+dist_pkgsysconf_DATA = bridge-filter \
+ inet-filter \
+ ipv4-filter \
+ ipv4-mangle \
+ ipv4-nat \
+ ipv6-filter \
+ ipv6-mangle \
+ ipv6-nat
+
+install-data-hook:
+ ${SED} -i 's|@sbindir[@]|${sbindir}/|g' ${DESTDIR}${pkgsysconfdir}/*
diff --git a/files/nftables/bridge-filter b/files/nftables/bridge-filter
index 54779c4a..2add455d 100644
--- a/files/nftables/bridge-filter
+++ b/files/nftables/bridge-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table bridge filter {
chain input { type filter hook input priority -200; }
diff --git a/files/nftables/inet-filter b/files/nftables/inet-filter
index 9f3108f8..f572db59 100644
--- a/files/nftables/inet-filter
+++ b/files/nftables/inet-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table inet filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv4-filter b/files/nftables/ipv4-filter
index 3174e7a9..a4ca7f25 100644
--- a/files/nftables/ipv4-filter
+++ b/files/nftables/ipv4-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv4-mangle b/files/nftables/ipv4-mangle
index 27327d3b..be564a51 100644
--- a/files/nftables/ipv4-mangle
+++ b/files/nftables/ipv4-mangle
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table mangle {
chain output { type route hook output priority -150; }
diff --git a/files/nftables/ipv4-nat b/files/nftables/ipv4-nat
index 99d69514..01c6c3d8 100644
--- a/files/nftables/ipv4-nat
+++ b/files/nftables/ipv4-nat
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table nat {
chain prerouting { type nat hook prerouting priority -150; }
diff --git a/files/nftables/ipv6-filter b/files/nftables/ipv6-filter
index 98fce02d..ce4d7de2 100644
--- a/files/nftables/ipv6-filter
+++ b/files/nftables/ipv6-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv6-mangle b/files/nftables/ipv6-mangle
index 72743532..fa32402a 100644
--- a/files/nftables/ipv6-mangle
+++ b/files/nftables/ipv6-mangle
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 mangle {
chain output { type route hook output priority -150; }
diff --git a/files/nftables/ipv6-nat b/files/nftables/ipv6-nat
index 33ecf9b6..3f57c56d 100644
--- a/files/nftables/ipv6-nat
+++ b/files/nftables/ipv6-nat
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 nat {
chain prerouting { type nat hook prerouting priority -150; }