Add nufw
authorFlorian Fainelli <florian@openwrt.org>
Tue, 5 Feb 2008 15:58:13 +0000 (15:58 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 5 Feb 2008 15:58:13 +0000 (15:58 +0000)
SVN-Revision: 10397

net/nufw/Makefile [new file with mode: 0644]
net/nufw/patches/001-no_doc_tests.patch [new file with mode: 0644]
net/nufw/patches/002-config_binaries.patch [new file with mode: 0644]
net/nufw/patches/003-nuauth_install_dir.patch [new file with mode: 0644]

diff --git a/net/nufw/Makefile b/net/nufw/Makefile
new file mode 100644 (file)
index 0000000..599277b
--- /dev/null
@@ -0,0 +1,110 @@
+# 
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# This Makefile is a skeleton
+#
+# $Id: $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nufw
+PKG_VERSION:=2.2.11
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://www.nufw.org/download/nufw/
+PKG_MD5SUM:=ad7804254875fece7354b8749128df51
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nufw/Default
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+glib2 +libgnutls +libpam +libsasl2 +libintl +libiconv +libnetfilter-queue
+  TITLE:=nufw
+  URL:=http://www.nufw.org/
+endef
+
+define Package/nufw/description
+  NuFW adds user-based filtering to Netfilter,
+  the state of the art IP filtering layer from
+  the Linux kernel. Its exclusive algorithm allows
+  authenticated filtering even on multiuser computers.
+endef
+
+define Package/nufw
+  $(call Package/nufw/Default)
+endef
+
+define Package/nutcpc
+  $(call Package/nufw/Default)
+  TITLE:=client version
+endef
+
+define Package/nufw-python
+  $(call Package/nufw/Default)
+  TITLE:=python bindings
+endef
+
+define PyPackage/nufw-python/filespec
++|$(PYTHON_PKG_DIR)/nuauth_command/__init__.py
++|$(PYTHON_PKG_DIR)/nuauth_command/client.py
++|$(PYTHON_PKG_DIR)/nuauth_command/command_dec.py
++|$(PYTHON_PKG_DIR)/nuauth_command/version.py
+endef
+
+
+define Package/nufw-modules
+  $(call Package/nufw/Default)
+  TITLE:=NuFW modules
+endef
+
+CONFIGURE_ARGS += \
+       --enable-static \
+       --enable-shared \
+       --disable-pam-nufw \
+       --with-libgnutls-prefix="$(STAGING_DIR)/usr/" \
+       --with-libgcrypt-prefix="$(STAGING_DIR)/usr/" \
+       --with-libsasl-prefix="$(STAGING_DIR)/usr/"
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libintl/include/ \
+                               -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
+                               -I$(STAGING_DIR)/usr/lib/libiconv/include" \
+               LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib \
+                       -L$(STAGING_DIR)/usr/lib/libintl/lib \
+                       -L$(STAGING_DIR)/usr/lib/libiconv/lib \
+                       -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -liconv" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+
+define Package/nufw/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nufw $(1)/usr/sbin/
+endef
+
+define Package/nutcpc/install
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nutcpc $(1)/usr/bin/  
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnuclient.so* $(1)/usr/lib/
+endef
+
+define Package/nufw-modules/install
+       $(INSTALL_DIR) $(1)/usr/lib/nuauth/modules/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/nuauth/modules/*.so* $(1)/usr/lib/nuauth/modules/
+endef
+
+$(eval $(call BuildPackage,nufw))
+$(eval $(call BuildPackage,nutcpc))
+$(eval $(call BuildPackage,nufw-modules))
+$(eval $(call PyPackage,nufw-python))
+$(eval $(call BuildPackage,nufw-python))
diff --git a/net/nufw/patches/001-no_doc_tests.patch b/net/nufw/patches/001-no_doc_tests.patch
new file mode 100644 (file)
index 0000000..9f1f368
--- /dev/null
@@ -0,0 +1,21 @@
+diff -urN nufw-2.2.11/Makefile.am nufw-2.2.11.new/Makefile.am
+--- nufw-2.2.11/Makefile.am    2007-12-08 12:08:50.000000000 +0100
++++ nufw-2.2.11.new/Makefile.am        2008-02-05 12:10:08.000000000 +0100
+@@ -1,4 +1,4 @@
+-SUBDIRS = src scripts doc tests
++SUBDIRS = src scripts
+ EXTRA_DIST = conf doc patches python debian autogen.sh
+diff -urN nufw-2.2.11/Makefile.in nufw-2.2.11.new/Makefile.in
+--- nufw-2.2.11/Makefile.in    2008-01-08 22:35:41.000000000 +0100
++++ nufw-2.2.11.new/Makefile.in        2008-02-05 12:09:47.000000000 +0100
+@@ -234,7 +234,7 @@
+ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+-SUBDIRS = src scripts doc tests
++SUBDIRS = src scripts 
+ EXTRA_DIST = conf doc patches python debian autogen.sh
+ all: all-recursive
diff --git a/net/nufw/patches/002-config_binaries.patch b/net/nufw/patches/002-config_binaries.patch
new file mode 100644 (file)
index 0000000..eb6ec3c
--- /dev/null
@@ -0,0 +1,11 @@
+--- nufw-2.2.11/configure      2008-01-08 22:35:36.000000000 +0100
++++ nufw-2.2.11.new/configure  2008-02-05 12:31:52.000000000 +0100
+@@ -20555,7 +20555,7 @@
+   if test x$libgnutls_config_prefix != x ; then
+      if test x${LIBGNUTLS_CONFIG+set} != xset ; then
+-        LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
++        LIBGNUTLS_CONFIG=$STAGING_DIR/host/bin/libgnutls-config
+      fi
+   fi
diff --git a/net/nufw/patches/003-nuauth_install_dir.patch b/net/nufw/patches/003-nuauth_install_dir.patch
new file mode 100644 (file)
index 0000000..40eec10
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN nufw-2.2.11/src/nuauth/Makefile.am nufw-2.2.11.new/src/nuauth/Makefile.am
+--- nufw-2.2.11/src/nuauth/Makefile.am 2007-12-18 14:11:10.000000000 +0100
++++ nufw-2.2.11.new/src/nuauth/Makefile.am     2008-02-05 16:41:29.000000000 +0100
+@@ -27,7 +27,7 @@
+ nuauth_LDADD = $(GLIB_LIBS) -lm  -lgnutls -lsasl2 -lnufw -L$(top_builddir)/src/include/
+ install-exec-local:
+-      install -d $(localstatedir)/run/nuauth/
++      install -d $(DESTDIR)/$(localstatedir)/run/nuauth/
+ nuauth$(EXEEXT): $(nuauth_OBJECTS) $(nuauth_DEPENDENCIES)
+       @rm -f nuauth$(EXEEXT)