packages/net/nufw/Makefile
florian 41c998b820 Add nufw
git-svn-id: svn://svn.openwrt.org/openwrt/packages@10397 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-02-05 15:58:13 +00:00

111 lines
2.9 KiB
Makefile

#
# 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))