wshaper: fix install path
[openwrt/svn-archive/archive.git] / net / nufw / Makefile
1 #
2 # Copyright (C) 2007 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 # $Id: $
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=nufw
14 PKG_VERSION:=2.2.11
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://www.nufw.org/download/nufw/
18 PKG_MD5SUM:=ad7804254875fece7354b8749128df51
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/nufw/Default
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+glib2 +libgnutls +libpam +libsasl2 +libintl +libiconv +libnetfilter-queue
29 TITLE:=nufw
30 URL:=http://www.nufw.org/
31 endef
32
33 define Package/nufw/description
34 NuFW adds user-based filtering to Netfilter,
35 the state of the art IP filtering layer from
36 the Linux kernel. Its exclusive algorithm allows
37 authenticated filtering even on multiuser computers.
38 endef
39
40 define Package/nufw
41 $(call Package/nufw/Default)
42 endef
43
44 define Package/nutcpc
45 $(call Package/nufw/Default)
46 TITLE:=client version
47 endef
48
49 define Package/nufw-python
50 $(call Package/nufw/Default)
51 TITLE:=python bindings
52 endef
53
54 define PyPackage/nufw-python/filespec
55 +|$(PYTHON_PKG_DIR)/nuauth_command/__init__.py
56 +|$(PYTHON_PKG_DIR)/nuauth_command/client.py
57 +|$(PYTHON_PKG_DIR)/nuauth_command/command_dec.py
58 +|$(PYTHON_PKG_DIR)/nuauth_command/version.py
59 endef
60
61
62 define Package/nufw-modules
63 $(call Package/nufw/Default)
64 TITLE:=NuFW modules
65 endef
66
67 CONFIGURE_ARGS += \
68 --enable-static \
69 --enable-shared \
70 --disable-pam-nufw \
71 --with-libgnutls-prefix="$(STAGING_DIR)/usr/" \
72 --with-libgcrypt-prefix="$(STAGING_DIR)/usr/" \
73 --with-libsasl-prefix="$(STAGING_DIR)/usr/"
74
75 define Build/Compile
76 $(MAKE) -C $(PKG_BUILD_DIR) \
77 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libintl/include/ \
78 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \
79 -I$(STAGING_DIR)/usr/lib/libiconv/include" \
80 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib \
81 -L$(STAGING_DIR)/usr/lib/libintl/lib \
82 -L$(STAGING_DIR)/usr/lib/libiconv/lib \
83 -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -liconv" \
84 DESTDIR="$(PKG_INSTALL_DIR)" \
85 all install
86 endef
87
88
89 define Package/nufw/install
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nufw $(1)/usr/sbin/
92 endef
93
94 define Package/nutcpc/install
95 $(INSTALL_DIR) $(1)/usr/bin/
96 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nutcpc $(1)/usr/bin/
97 $(INSTALL_DIR) $(1)/usr/lib/
98 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnuclient.so* $(1)/usr/lib/
99 endef
100
101 define Package/nufw-modules/install
102 $(INSTALL_DIR) $(1)/usr/lib/nuauth/modules/
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/nuauth/modules/*.so* $(1)/usr/lib/nuauth/modules/
104 endef
105
106 $(eval $(call BuildPackage,nufw))
107 $(eval $(call BuildPackage,nutcpc))
108 $(eval $(call BuildPackage,nufw-modules))
109 $(eval $(call PyPackage,nufw-python))
110 $(eval $(call BuildPackage,nufw-python))