]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
build: add autotools support for the 'files' subdir
authorGiorgio Dal Molin <giorgio.nicole@arcor.de>
Wed, 12 Nov 2014 16:41:06 +0000 (17:41 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 12 Nov 2014 20:43:56 +0000 (21:43 +0100)
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>
13 files changed:
Makefile.am
configure.ac
files/Makefile.am [new file with mode: 0644]
files/Makefile.in [deleted file]
files/nftables/Makefile.am [new file with mode: 0644]
files/nftables/bridge-filter
files/nftables/inet-filter
files/nftables/ipv4-filter
files/nftables/ipv4-mangle
files/nftables/ipv4-nat
files/nftables/ipv6-filter
files/nftables/ipv6-mangle
files/nftables/ipv6-nat

index b7fdc42c57661284971718dea206b146e090e39c..068009bd3c9166fbc78024f91d02d786ebd95a39 100644 (file)
@@ -2,4 +2,5 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS =      src     \
                include \
-               doc
+               doc     \
+               files
index 7bbd86ef6608aaaa5cebecdc17bab55386510e79..1525ac4d4395e9fa99b3dd5fe37365fb04249956 100644 (file)
@@ -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 (file)
index 0000000..a8394c0
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = nftables
diff --git a/files/Makefile.in b/files/Makefile.in
deleted file mode 100644 (file)
index dc237e2..0000000
+++ /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 (file)
index 0000000..1378e2b
--- /dev/null
@@ -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}/*
index 54779c4ae787c5fb8a09723bdcb35e7a53353c1f..2add455d2dbb7df191afae65a44f0d3af8f1564e 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table bridge filter {
        chain input             { type filter hook input priority -200; }
index 9f3108f8bb4e776e04540cc067807225adae9ac3..f572db59fc3538dc94c24a968b913734609f168b 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table inet filter {
        chain input             { type filter hook input priority 0; }
index 3174e7a9e3edb15c2f944bb5ed780332c679a07d..a4ca7f25976d76b738c059e2d84e96aeeb550978 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table filter {
        chain input             { type filter hook input priority 0; }
index 27327d3b83a1fa0f46578ccc147b86ce777b4f9d..be564a517ae37cb4d6880a8f7527da5c9f85dc53 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table mangle {
        chain output            { type route hook output priority -150; }
index 99d69514904aa2f4345142f9f1d2cf3a07a8525e..01c6c3d8d6a1a21b616b689c2cb306798efce4b5 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table nat {
        chain prerouting        { type nat hook prerouting priority -150; }
index 98fce02d7b9f2067f6b35578f6beea8862d7446c..ce4d7de29b05cb872af5510d023b1ab16efa8c2b 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table ip6 filter {
        chain input             { type filter hook input priority 0; }
index 727435325340c18ea55d5709464a87969e6faf0a..fa32402a1e10019fc52d24eef6e66311643b62c7 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table ip6 mangle {
        chain output            { type route hook output priority -150; }
index 33ecf9b697c2ab1d0093a2e8b10c28a78ac8b0f4..3f57c56dea78c3d4e93f2bdb1e90def4204563fb 100644 (file)
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
 
 table ip6 nat {
        chain prerouting        { type nat hook prerouting priority -150; }