[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[packages.git] / net / nufw / Makefile
1
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # This Makefile is a skeleton
8 #
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=nufw
13 PKG_VERSION:=2.2.17
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.nufw.org/download/nufw/
17 PKG_MD5SUM:=f25ef486b0fc71cd03a3913a26515029
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/nufw/Default
22   SECTION:=net
23   CATEGORY:=Network
24   DEPENDS:=+glib2 +libgnutls +libsasl2 +libintl +libiconv +libnetfilter-queue
25   TITLE:=nufw
26   URL:=http://www.nufw.org/
27 endef
28
29 define Package/nufw/description
30   NuFW adds user-based filtering to Netfilter,
31   the state of the art IP filtering layer from
32   the Linux kernel. Its exclusive algorithm allows
33   authenticated filtering even on multiuser computers.
34 endef
35
36 define Package/nufw
37   $(call Package/nufw/Default)
38 endef
39
40 define Package/nutcpc
41   $(call Package/nufw/Default)
42   TITLE:=client version
43 endef
44
45 define Package/nufw-python
46   $(call Package/nufw/Default)
47   TITLE:=python bindings
48 endef
49
50 define PyPackage/nufw-python/filespec
51 +|$(PYTHON_PKG_DIR)/nuauth_command/__init__.py
52 +|$(PYTHON_PKG_DIR)/nuauth_command/client.py
53 +|$(PYTHON_PKG_DIR)/nuauth_command/command_dec.py
54 +|$(PYTHON_PKG_DIR)/nuauth_command/version.py
55 endef
56
57
58 define Package/nufw-modules
59   $(call Package/nufw/Default)
60   TITLE:=NuFW modules
61 endef
62
63 CONFIGURE_ARGS += \
64         --enable-static \
65         --enable-shared \
66         --disable-pam-nufw \
67         --without-system-auth \
68         --with-libgnutls-prefix="$(STAGING_DIR)/usr/" \
69         --with-libgcrypt-prefix="$(STAGING_DIR)/usr/" \
70         --with-libsasl-prefix="$(STAGING_DIR)/usr/"
71
72 define Build/Compile
73         $(MAKE) -C $(PKG_BUILD_DIR) \
74                 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
75                         -I$(STAGING_DIR)/usr/lib/libintl/include \
76                         -I$(STAGING_DIR)/usr/lib/libiconv/include" \
77                 LDFLAGS="$(TARGET_LDFLAGS) \
78                         -L$(STAGING_DIR)/usr/lib/libintl/lib \
79                         -L$(STAGING_DIR)/usr/lib/libiconv/lib \
80                         -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -liconv \
81                         -lgnutls -lnetfilter_queue -lpthread" \
82                 DESTDIR="$(PKG_INSTALL_DIR)" \
83                 all install
84 endef
85
86
87 define Package/nufw/install
88         $(INSTALL_DIR) $(1)/usr/sbin
89         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nufw $(1)/usr/sbin/
90 endef
91
92 define Package/nutcpc/install
93         $(INSTALL_DIR) $(1)/usr/bin/
94         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nutcpc $(1)/usr/bin/  
95         $(INSTALL_DIR) $(1)/usr/lib/
96         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnuclient.so* $(1)/usr/lib/
97 endef
98
99 define Package/nufw-modules/install
100         $(INSTALL_DIR) $(1)/usr/lib/nuauth/modules/
101         $(CP) $(PKG_INSTALL_DIR)/usr/lib/nuauth/modules/*.so* $(1)/usr/lib/nuauth/modules/
102 endef
103
104 $(eval $(call BuildPackage,nufw))
105 $(eval $(call BuildPackage,nutcpc))
106 $(eval $(call BuildPackage,nufw-modules))
107 $(eval $(call PyPackage,nufw-python))
108 $(eval $(call BuildPackage,nufw-python))