From b263cdc214e8d677168437ad15af3257d5bc6850 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 21 Feb 2008 10:17:15 +0000 Subject: [PATCH 1/1] Add dansguardian and compile it against uClibc++ SVN-Revision: 10514 --- net/dansguardian/Makefile | 70 +++++++++++++++++++ .../patches/001-include_dir.patch | 47 +++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 net/dansguardian/Makefile create mode 100644 net/dansguardian/patches/001-include_dir.patch diff --git a/net/dansguardian/Makefile b/net/dansguardian/Makefile new file mode 100644 index 0000000000..4451d54d4a --- /dev/null +++ b/net/dansguardian/Makefile @@ -0,0 +1,70 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dansguardian +PKG_VERSION:=2.9.9.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://dansguardian.org/downloads/2/Beta +PKG_MD5SUM:= + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/dansguardian + SECTION:=net + DEPENDS:=+libpthread +uclibcxx + CATEGORY:=Network + TITLE:=DansGuardian + URL:=http://dansguardian.org +endef + +define Package/dansguardian/conffiles +/etc/dansguardian/dansguardian.conf +endef + +CONFIGURE_VARS += \ + INCLUDES="" \ + CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/uClibc++" \ + LDFLAGS="$$$$LDFLAGS" \ + LIBS="-nodefaultlibs -luClibc++ -lpthread" \ + + +define Build/Configure + $(call Build/Configure/Default,\ + --disable-clamav \ + --with-sysconfsubdir=dansguardian \ + --with-proxyuser=root \ + --with-proxygroup=root \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/dansguardian/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/dansguardian $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/share/dansguardian + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/dansguardian/transparent1x1.gif $(1)/usr/share/dansguardian/ + $(INSTALL_DIR) $(1)/usr/share/dansguardian/languages/ukenglish + $(CP) $(PKG_INSTALL_DIR)/usr/share/dansguardian/languages/ukenglish/* $(1)/usr/share/dansguardian/languages/ukenglish/ +endef + +$(eval $(call BuildPackage,dansguardian)) diff --git a/net/dansguardian/patches/001-include_dir.patch b/net/dansguardian/patches/001-include_dir.patch new file mode 100644 index 0000000000..b174a2e75a --- /dev/null +++ b/net/dansguardian/patches/001-include_dir.patch @@ -0,0 +1,47 @@ +--- dansguardian-2.9.9.2/configure 2007-11-13 17:17:03.000000000 +0100 ++++ dansguardian-2.9.9.2.new/configure 2008-02-21 11:15:07.000000000 +0100 +@@ -799,7 +799,7 @@ + sharedstatedir='${prefix}/com' + localstatedir='${prefix}/var' + includedir='${prefix}/include' +-oldincludedir='/usr/include' ++oldincludedir='${prefix}/usr/include' + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + infodir='${datarootdir}/info' + htmldir='${docdir}' +@@ -6429,7 +6429,7 @@ + # Check whether --with-zlib was given. + if test "${with_zlib+set}" = set; then + withval=$with_zlib; # check for header & func (in library) in given prefix +- CPPFLAGS="${CPPFLAGS} -I${withval}/include" ++ CPPFLAGS="${CPPFLAGS}" + if test "x$staticzlib" = "xtrue"; then + LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}" + else +@@ -9637,7 +9637,7 @@ + PCRE_PREFIX=`pcre-config --prefix` + + LIBS="${PCRE_LIBS} ${LIBS}" +- CPPFLAGS="${CPPFLAGS} -I${PCRE_PREFIX}/include" ++ CPPFLAGS="${CPPFLAGS}" + + { echo "$as_me:$LINENO: checking for REG_DOTALL in pcreposix.h" >&5 + echo $ECHO_N "checking for REG_DOTALL in pcreposix.h... $ECHO_C" >&6; } +@@ -10076,7 +10076,7 @@ + CLAMAV_PREFIX=`clamav-config --prefix` + + LIBS="${CLAMAV_LIBS} -lclamav ${LIBS}" +- CPPFLAGS="${CPPFLAGS} -I${CLAMAV_PREFIX}/include" ++ CPPFLAGS="${CPPFLAGS}" + + + cat >>confdefs.h <<\_ACEOF +@@ -10753,7 +10753,7 @@ + if test "${with_libiconv+set}" = set; then + withval=$with_libiconv; # check for header & func (in library) in given prefix + if test "x$withval" != "x"; then +- CPPFLAGS="${CPPFLAGS} -I${withval}/include" ++ CPPFLAGS="${CPPFLAGS}" + LIBS="-L${withval}/lib -liconv ${LIBS}" + else + LIBS="-liconv ${LIBS}" -- 2.30.2