peerguardian: update to 2.2.2

libipq is removed so the old version cannot be built anymore.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34638 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-12-11 17:51:01 +00:00
parent 4f9707c748
commit 7bb67f087d
5 changed files with 25 additions and 93 deletions

View File

@ -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. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -8,17 +8,16 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=peerguardian PKG_NAME:=peerguardian
PKG_VERSION:=1.5beta PKG_VERSION:=2.2.2
PKG_RELEASE:=3 PKG_RELEASE:=1
PKG_SOURCE:=pglinux-$(PKG_VERSION).tar.gz PKG_SOURCE:=pgl-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/peerguardian 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_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=iptables
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -26,13 +25,13 @@ define Package/peerguardian
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
SUBMENU:=P2P SUBMENU:=P2P
DEPENDS:= +libncurses +libpthread +libnetfilter-queue +libipq +libstdcpp DEPENDS:=+libnetfilter-queue +zlib
TITLE:=PeerGuardian for Linux TITLE:=PeerGuardian for Linux
URL:=http://phoenixlabs.org/ URL:=http://phoenixlabs.org/
endef endef
define Package/peerguardian/description 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. IPs while you use P2P.
endef endef
@ -41,23 +40,22 @@ define Package/peerguardian/conffiles
/etc/p2p.p2b.p2p /etc/p2p.p2b.p2p
endef endef
EXTRA_CFLAGS:=-fno-rtti -I$(STAGING_DIR)/usr/include/libnetfilter_queue/ CONFIGURE_ARGS += \
--enable-lowmem \
CONFIGURE_VARS+= \ --without-qt4 \
LIBS="-lm" --disable-dbus \
--disable-networkmanager \
define Build/Compile --disable-cron
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CXXLD="$(TARGET_CXX)"
endef
define Package/peerguardian/install define Package/peerguardian/install
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/PG.conf $(1)/etc/ $(CP) $(PKG_INSTALL_DIR)/etc/pgl $(1)/etc/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/p2p.p2b.p2p $(1)/etc/ $(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pglcmd $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/peerguardnf $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pgld $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pgtext $(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_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/peerguardian.init $(1)/etc/init.d/peerguardian $(INSTALL_BIN) ./files/peerguardian.init $(1)/etc/init.d/peerguardian
endef endef

View File

@ -2,11 +2,10 @@
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
START=50 START=50
BIN=peerguardnf CONTROL_MAIN="/usr/lib/pgl/pglcmd.main"
CFG_F=/etc/PG.conf BIN=pgctl
OPTIONS="-c $CFG_F -d"
start() { start() {
$BIN $OPTIONS $BIN $1
} }

View File

@ -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

View File

@ -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 <linux/types.h>
#include <linux/netfilter.h>
extern "C" {
#include <libipq.h>

View File

@ -1,20 +0,0 @@
--- a/Main.cpp
+++ b/Main.cpp
@@ -25,6 +25,7 @@
#include <signal.h>
#include <iostream>
#include <fstream>
+#include <cstring>
using namespace PG;
using namespace std;
--- a/PeerGuard.h
+++ b/PeerGuard.h
@@ -24,6 +24,7 @@
#include "BlockList.h"
#include <ostream>
+#include <cstring>
namespace PG {