summaryrefslogtreecommitdiff
path: root/package/dansguardian
diff options
context:
space:
mode:
Diffstat (limited to 'package/dansguardian')
-rw-r--r--package/dansguardian/Config.in27
-rw-r--r--package/dansguardian/Makefile44
-rw-r--r--package/dansguardian/files/dansguardian.init28
-rw-r--r--package/dansguardian/files/dansguardian.postinst6
4 files changed, 105 insertions, 0 deletions
diff --git a/package/dansguardian/Config.in b/package/dansguardian/Config.in
new file mode 100644
index 000000000..2a12515ee
--- /dev/null
+++ b/package/dansguardian/Config.in
@@ -0,0 +1,27 @@
+config ADK_PACKAGE_DANSGUARDIAN
+ prompt "dansguardian......................... web content filter proxy"
+ tristate
+ depends on ADK_CXX
+ select ADK_PACKAGE_LIBPCRE
+ default n
+ help
+ http://dansguardian.org
+
+choice
+prompt "C++ library to use"
+depends on ADK_PACKAGE_DANSGUARDIAN
+default ADK_COMPILE_DANSGUARDIAN_WITH_STDCXX if ADK_TARGET_LIB_GLIBC
+default ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX if ADK_TARGET_LIB_UCLIBC
+
+config ADK_COMPILE_DANSGUARDIAN_WITH_STDCXX
+ bool "Standard C++ library"
+ select ADK_PACKAGE_LIBSTDCXX
+ help
+
+config ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX
+ bool "Embedded uClibc++ library"
+ select ADK_PACKAGE_UCLIBCXX
+ help
+
+endchoice
+
diff --git a/package/dansguardian/Makefile b/package/dansguardian/Makefile
new file mode 100644
index 000000000..4e1ef09e6
--- /dev/null
+++ b/package/dansguardian/Makefile
@@ -0,0 +1,44 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= dansguardian
+PKG_VERSION:= 2.10.1.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 0987a1c9bfbdf398118386f10279611a
+PKG_DESCR:= web content filter proxy
+PKG_SECTION:= net
+PKG_DEPENDS:= libpcre
+PKG_URL:= http://dansguardian.org
+PKG_SITES:= http://dansguardian.org/downloads/2/Stable/
+
+ifeq ($(ADK_COMPILE_DANSGUARDIAN_WITH_UCLIBCXX),y)
+PKG_DEPENDS+= uclibc++
+else
+PKG_DEPENDS+= libstdcxx
+endif
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,DANSGUARDIAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ARGS+= --enable-orig-ip \
+ --with-proxyuser=proxy \
+ --with-proxygroup=proxy
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_DANSGUARDIAN}/usr/sbin ${IDIR_DANSGUARDIAN}/etc/dansguardian \
+ ${IDIR_DANSGUARDIAN}/usr/share/dansguardian/languages/ukenglish
+ ${CP} ${WRKINST}/usr/share/dansguardian/languages/ukenglish/* \
+ ${IDIR_DANSGUARDIAN}/usr/share/dansguardian/languages/ukenglish
+ ${CP} ${WRKINST}/usr/share/dansguardian/transparent1x1.gif \
+ ${IDIR_DANSGUARDIAN}/usr/share/dansguardian
+ ${CP} ${WRKINST}/etc/dansguardian/* \
+ ${IDIR_DANSGUARDIAN}/etc/dansguardian
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/dansguardian ${IDIR_DANSGUARDIAN}/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/dansguardian/files/dansguardian.init b/package/dansguardian/files/dansguardian.init
new file mode 100644
index 000000000..8c883d4bf
--- /dev/null
+++ b/package/dansguardian/files/dansguardian.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG dansguardian
+#INIT 80
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${dansguardian:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ dansguardian
+ ;;
+stop)
+ killall dansguardian
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+
+*)
+ echo "usage: $0 {start | stop | restart}"
+ exit 1
+esac
+exit $?
diff --git a/package/dansguardian/files/dansguardian.postinst b/package/dansguardian/files/dansguardian.postinst
new file mode 100644
index 000000000..80272f705
--- /dev/null
+++ b/package/dansguardian/files/dansguardian.postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+gid=$(get_next_gid)
+add_user proxy $(get_next_uid) $gid /etc/dansguardian
+add_group proxy $gid
+add_rcconf dansguardian dansguardian NO