diff --git a/net/peerguardian/Makefile b/net/peerguardian/Makefile index 4c5c0a2b3..395f7bba0 100644 --- a/net/peerguardian/Makefile +++ b/net/peerguardian/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=peerguardian -PKG_VERSION:=1.5beta -PKG_RELEASE:=3 +PKG_VERSION:=2.2.2 +PKG_RELEASE:=1 -PKG_SOURCE:=pglinux-$(PKG_VERSION).tar.gz +PKG_SOURCE:=pgl-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/peerguardian -PKG_MD5SUM:=0fb2bc5501b031604fc56eec3bd35fa4 +PKG_MD5SUM:= -PKG_BUILD_DIR:=$(BUILD_DIR)/pglinux-$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/pgl-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 - -PKG_BUILD_DEPENDS:=iptables +PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -26,13 +25,13 @@ define Package/peerguardian SECTION:=net CATEGORY:=Network SUBMENU:=P2P - DEPENDS:= +libncurses +libpthread +libnetfilter-queue +libipq +libstdcpp + DEPENDS:=+libnetfilter-queue +zlib TITLE:=PeerGuardian for Linux URL:=http://phoenixlabs.org/ endef define Package/peerguardian/description - PeerGuardian helps protect your privacy by blocking many ranges of aggressive + PeerGuardian helps protect your privacy by blocking many ranges of aggressive IPs while you use P2P. endef @@ -41,23 +40,22 @@ define Package/peerguardian/conffiles /etc/p2p.p2b.p2p endef -EXTRA_CFLAGS:=-fno-rtti -I$(STAGING_DIR)/usr/include/libnetfilter_queue/ - -CONFIGURE_VARS+= \ - LIBS="-lm" - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - CXXLD="$(TARGET_CXX)" -endef +CONFIGURE_ARGS += \ + --enable-lowmem \ + --without-qt4 \ + --disable-dbus \ + --disable-networkmanager \ + --disable-cron define Package/peerguardian/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/PG.conf $(1)/etc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/p2p.p2b.p2p $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/ + $(CP) $(PKG_INSTALL_DIR)/etc/pgl $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pglcmd $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/peerguardnf $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgtext $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pgld $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pgl $(1)/usr/lib/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/peerguardian.init $(1)/etc/init.d/peerguardian endef diff --git a/net/peerguardian/files/peerguardian.init b/net/peerguardian/files/peerguardian.init index c0cb8be16..a17e1e95f 100644 --- a/net/peerguardian/files/peerguardian.init +++ b/net/peerguardian/files/peerguardian.init @@ -2,11 +2,10 @@ # Copyright (C) 2006 OpenWrt.org START=50 -BIN=peerguardnf -CFG_F=/etc/PG.conf -OPTIONS="-c $CFG_F -d" +CONTROL_MAIN="/usr/lib/pgl/pglcmd.main" +BIN=pgctl start() { - $BIN $OPTIONS + $BIN $1 } diff --git a/net/peerguardian/patches/001-no_host_includes.patch b/net/peerguardian/patches/001-no_host_includes.patch deleted file mode 100644 index 11a63f07d..000000000 --- a/net/peerguardian/patches/001-no_host_includes.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -74,8 +74,8 @@ peerguardnf_SOURCES = Main.cpp PeerGuard - pgtext_SOURCES = pgtext.cpp - peerguardnf_LDADD = -lipq -lpthread - pgtext_LDADD = -lncurses -lpthread --peerguardnf_LDFLAGS = $(all_includes) -I/usr/include/libipq --AM_CPPFLAGS = $(ALL_INCLUDES) -I/usr/include/libipq -+peerguardnf_LDFLAGS = $(all_includes) -+AM_CPPFLAGS = $(ALL_INCLUDES) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs - CONFIG_HEADER = config.h diff --git a/net/peerguardian/patches/002-new_libipq.patch b/net/peerguardian/patches/002-new_libipq.patch deleted file mode 100644 index c7ca95992..000000000 --- a/net/peerguardian/patches/002-new_libipq.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -3,7 +3,7 @@ man_MANS=peerguardnf.1 - mybin_PROGRAMS = peerguardnf pgtext - peerguardnf_SOURCES=Main.cpp PeerGuard.cpp BlockList.cpp Blocker_Linux.cpp Blocker_BSD.cpp HttpServer.cpp HttpRequest.cpp sha1.cpp - pgtext_SOURCES=pgtext.cpp --peerguardnf_LDADD=-lipq -lpthread -+peerguardnf_LDADD=-lipq -lnetfilter_queue -lnfnetlink -lpthread - pgtext_LDADD=-lncurses -lpthread - peerguardnf_LDFLAGS=$(all_includes) -I/usr/include/libipq - AM_CPPFLAGS=$(ALL_INCLUDES) -I/usr/include/libipq ---- a/Makefile.in -+++ b/Makefile.in -@@ -72,7 +72,7 @@ man_MANS = peerguardnf.1 - mybin_PROGRAMS = peerguardnf pgtext - peerguardnf_SOURCES = Main.cpp PeerGuard.cpp BlockList.cpp Blocker_Linux.cpp Blocker_BSD.cpp HttpServer.cpp HttpRequest.cpp sha1.cpp - pgtext_SOURCES = pgtext.cpp --peerguardnf_LDADD = -lipq -lpthread -+peerguardnf_LDADD = -lipq -lnetfilter_queue -lnfnetlink -lpthread - pgtext_LDADD = -lncurses -lpthread - peerguardnf_LDFLAGS = $(all_includes) - AM_CPPFLAGS = $(ALL_INCLUDES) ---- a/Blocker_Linux.cpp -+++ b/Blocker_Linux.cpp -@@ -22,6 +22,7 @@ - - #include "PeerGuard.h" - -+#include - #include - extern "C" { - #include diff --git a/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch b/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch deleted file mode 100644 index aaa72c364..000000000 --- a/net/peerguardian/patches/003-gcc_4_3-compile-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/Main.cpp -+++ b/Main.cpp -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - using namespace PG; - using namespace std; ---- a/PeerGuard.h -+++ b/PeerGuard.h -@@ -24,6 +24,7 @@ - #include "BlockList.h" - - #include -+#include - - namespace PG { -