openswan: Fix compile on linux-2.6.36
[openwrt/svn-archive/archive.git] / net / peerguardian / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=peerguardian
11 PKG_VERSION:=1.5beta
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=pglinux-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/peerguardian
16 PKG_MD5SUM:=0fb2bc5501b031604fc56eec3bd35fa4
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/pglinux-$(PKG_VERSION)
19
20 PKG_BUILD_DEPENDS:=iptables
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/peerguardian
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:= +libncurses +libpthread +uclibcxx +libnetfilter-queue
28 TITLE:=PeerGuardian for Linux
29 URL:=http://phoenixlabs.org/
30 endef
31
32 define Package/peerguardian/description
33 PeerGuardian helps protect your privacy by blocking many ranges of aggressive
34 IPs while you use P2P.
35 endef
36
37 define Package/peerguardian/conffiles
38 /etc/PG.conf
39 /etc/p2p.p2b.p2p
40 endef
41
42 CONFIGURE_VARS+= \
43 CXXFLAGS="$$$$CXXFLAGS $$$$CPPFLAGS -fno-builtin -fno-rtti -I$(STAGING_DIR)/usr/include/libnetfilter_queue/" \
44 LIBS="-nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm $(LIBGCC_S)" \
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 CXXLD="$(TARGET_CC)"
49 endef
50
51 define Package/peerguardian/install
52 $(INSTALL_DIR) $(1)/etc
53 $(INSTALL_DATA) $(PKG_BUILD_DIR)/PG.conf $(1)/etc/
54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/p2p.p2b.p2p $(1)/etc/
55 $(INSTALL_DIR) $(1)/usr/sbin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/peerguardnf $(1)/usr/sbin/
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgtext $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/peerguardian.init $(1)/etc/init.d/peerguardian
60 endef
61
62 $(eval $(call BuildPackage,peerguardian))