diff options
author | pav <pav@FreeBSD.org> | 2005-11-12 06:00:24 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-11-12 06:00:24 +0800 |
commit | 231f4059caf72333264b5c6a252a7c5de3cb5f16 (patch) | |
tree | 65cd4ecb4154d7b04409bd3e2076ce29a4680639 | |
parent | 16075466c1aae518d40d73c71c84a5d85b67b877 (diff) | |
download | freebsd-ports-gnome-231f4059caf72333264b5c6a252a7c5de3cb5f16.tar.gz freebsd-ports-gnome-231f4059caf72333264b5c6a252a7c5de3cb5f16.tar.zst freebsd-ports-gnome-231f4059caf72333264b5c6a252a7c5de3cb5f16.zip |
Rejik is a squid redirector used for blocking unwanted content basing
on URLs and Perl Compatible Regular Expressions (http://www.pcre.org/).
PR: ports/88395
Submitted by: Elisey Savateev <b3k@mail.ru>
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/rejik/Makefile | 101 | ||||
-rw-r--r-- | www/rejik/distinfo | 12 | ||||
-rw-r--r-- | www/rejik/files/patch-Makefile | 11 | ||||
-rw-r--r-- | www/rejik/files/pkg-message.in | 10 | ||||
-rw-r--r-- | www/rejik/pkg-descr | 7 | ||||
-rw-r--r-- | www/rejik/pkg-plist | 36 |
7 files changed, 178 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index 664e79f91375..f295fd05d2f9 100644 --- a/www/Makefile +++ b/www/Makefile @@ -734,6 +734,7 @@ SUBDIR += qdecoder SUBDIR += quixote SUBDIR += raqdevil + SUBDIR += rejik SUBDIR += reportmagic SUBDIR += resin2 SUBDIR += resin3 diff --git a/www/rejik/Makefile b/www/rejik/Makefile new file mode 100644 index 000000000000..20e1dddf3259 --- /dev/null +++ b/www/rejik/Makefile @@ -0,0 +1,101 @@ +# New ports collection makefile for: rejik +# Date created: 29 October 2005 +# Whom: Elisey Savateev <b3k@mail.ru> +# +# $FreeBSD$ +# + +PORTNAME= rejik +PORTVERSION= 3.2.0 +CATEGORIES= www +MASTER_SITES= http://www.rejik.ru/download/ +DISTNAME= redirector-${PORTVERSION} +EXTRACT_SUFX= .tgz +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= b3k@mail.ru +COMMENT= A squid redirector used for blocking unwanted content + +LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre +RUN_DEPENDS= squid:${PORTSDIR}/www/squid + +USE_REINPLACE= yes +WRKSRC= ${WRKDIR}/redirector + +# Redifine this if you need +SQUID_USER?= squid +SQUID_GROUP?= squid +WWW_USER?= www +WWW_GROUP?= www +WWW_DIR?= www +WWW_PATH?= ${PREFIX}/${WWW_DIR} +INSTALL_DIR?= ${PORTNAME} +INSTALL_PATH?= ${PREFIX}/${INSTALL_DIR} + +PLIST_SUB= WWW_DIR=${WWW_DIR} INSTALL_DIR=${INSTALL_DIR} +SUB_LIST= WWW_DIR=${WWW_DIR} INSTALL_DIR=${INSTALL_DIR} SQUID_USER=${SQUID_USER} SQUID_GROUP=${SQUID_GROUP} +SUB_FILES= pkg-message + +OPTIONS= BAN "With banlists" on \ + DBL "With DBL scripts" off \ + WWW "With error pages" on \ + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_BAN) +DISTFILES+= banlists-2.x.x.tgz +PLIST_SUB+= BAN="" +.else +PLIST_SUB+= BAN="@comment " +.endif + +.if !defined(WITHOUT_WWW) +DISTFILES+= squid-like-www-en.tgz +PLIST_SUB+= WWW="" +.else +PLIST_SUB+= WWW="@comment " +.endif + +.if defined(WITH_DBL) +DISTFILES+= dbl-2.0.tgz +USE_PERL5_RUN= yes +RUN_DEPENDS+= ${SITE_PERL}/mach/Text/Iconv.pm:${PORTSDIR}/converters/p5-Text-Iconv \ + ${SITE_PERL}/mach/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \ + wget:${PORTSDIR}/ftp/wget +PLIST_SUB+= DBL="" +.else +PLIST_SUB+= DBL="@comment " +.endif + +post-extract: + @${ECHO_MSG} "===> ----------------------------------------------" + @${ECHO_MSG} "===> Make sure that squid runs under user squid" + @${ECHO_MSG} "===> and group squid. If not, redefine SQUID_USER" + @${ECHO_MSG} "===> and SQUID_GROUP." + @${ECHO_MSG} "===> ----------------------------------------------" + +post-patch: + @${REINPLACE_CMD} -e 's|SQUID_USER=nobody|SQUID_USER=${SQUID_USER}|; \ + s|SQUID_GROUP=nogroup|SQUID_GROUP=${SQUID_GROUP}|; \ + s|INSTALL_PATH=/usr/local/rejik3|INSTALL_PATH=${INSTALL_PATH}|' \ + ${WRKSRC}/Makefile + +post-install: +.if !defined(WITHOUT_BAN) + @${TAR} -xzf ${DISTDIR}/banlists-2.x.x.tgz -C ${INSTALL_PATH} + @${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}/banlists +.endif +.if defined(WITH_DBL) + @${TAR} -xzf ${DISTDIR}/dbl-2.0.tgz -C ${INSTALL_PATH} + @${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}/dbl +.endif +.if !defined(WITHOUT_WWW) + @${TAR} -xzf ${DISTDIR}/squid-like-www-en.tgz -C ${WWW_PATH} + @${MV} ${WWW_PATH}/squid-like-www-en ${WWW_PATH}/ban + @${CHOWN} -R ${WWW_USER}:${WWW_GROUP} ${WWW_PATH}/ban +.endif + + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/www/rejik/distinfo b/www/rejik/distinfo new file mode 100644 index 000000000000..fd9682648b46 --- /dev/null +++ b/www/rejik/distinfo @@ -0,0 +1,12 @@ +MD5 (redirector-3.2.0.tgz) = 0b5a5c013424716ab1869b742eb16530 +SHA256 (redirector-3.2.0.tgz) = 725e6b0d8da86da00699170ebe66234c94f57491920e5fe1dd6458a601d31caa +SIZE (redirector-3.2.0.tgz) = 43991 +MD5 (banlists-2.x.x.tgz) = a1c7c48f9ae94b2ef35f56a094285c10 +SHA256 (banlists-2.x.x.tgz) = 221a40e8db9d19477d6fdece00c9152526a0d2f0c2298504fc99b4378457b09e +SIZE (banlists-2.x.x.tgz) = 116100 +MD5 (squid-like-www-en.tgz) = 94ea17b04c7793cc395643909b33c30c +SHA256 (squid-like-www-en.tgz) = 7212d877218185a709ea59089d73da862aa8551127926566ca58effb453a6fb6 +SIZE (squid-like-www-en.tgz) = 897 +MD5 (dbl-2.0.tgz) = f8d51329458aaac5b7fe1a89ad9bbd4a +SHA256 (dbl-2.0.tgz) = 45577958a9f9519919e0b61ccfdbda30a467f55721d94a67cb07e8f1c1e55c55 +SIZE (dbl-2.0.tgz) = 3355 diff --git a/www/rejik/files/patch-Makefile b/www/rejik/files/patch-Makefile new file mode 100644 index 000000000000..3d3faf86cd9c --- /dev/null +++ b/www/rejik/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.bak Sat Oct 29 09:55:05 2005 ++++ Makefile Wed Nov 2 12:52:41 2005 +@@ -4,7 +4,7 @@ + SQUID_GROUP=nogroup + + CC=gcc -Wall +-INCLUDE=-I/usr/include -I/usr/local/include -I/usr/include/pcre ++INCLUDE=-I/usr/include -I/usr/local/include -I/usr/local/include/pcre + LIBS=-L/lib `pcre-config --libs` + + ### Don't edit diff --git a/www/rejik/files/pkg-message.in b/www/rejik/files/pkg-message.in new file mode 100644 index 000000000000..522b8e37faff --- /dev/null +++ b/www/rejik/files/pkg-message.in @@ -0,0 +1,10 @@ +1. Make sure that squid runs under user %%SQUID_USER%% and group %%SQUID_GROUP%%. + +2. Copy %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf.dist to + %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf and edit it. + +3. Add line + redirect_program %%PREFIX%%/%%INSTALL_DIR%%/redirector %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf + to squid.conf. + +4. See http://www.rejik.ru/ for detailed instructions. diff --git a/www/rejik/pkg-descr b/www/rejik/pkg-descr new file mode 100644 index 000000000000..6285d494f233 --- /dev/null +++ b/www/rejik/pkg-descr @@ -0,0 +1,7 @@ +Rejik is a squid redirector used for blocking unwanted content basing +on URLs and Perl Compatible Regular Expressions (http://www.pcre.org/). + +WWW: http://www.rejik.ru/ + +- Elisey Savateev +b3k@mail.ru diff --git a/www/rejik/pkg-plist b/www/rejik/pkg-plist new file mode 100644 index 000000000000..9f2aa821f0a3 --- /dev/null +++ b/www/rejik/pkg-plist @@ -0,0 +1,36 @@ +%%BAN%%%%INSTALL_DIR%%/banlists/banners/pcre +%%BAN%%%%INSTALL_DIR%%/banlists/banners/urls +%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/banners +%%BAN%%%%INSTALL_DIR%%/banlists/js/urls +%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/js +%%BAN%%%%INSTALL_DIR%%/banlists/mp3/pcre +%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/mp3 +%%BAN%%%%INSTALL_DIR%%/banlists/porno/urls +%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/porno +%%BAN%%@dirrm %%INSTALL_DIR%%/banlists +%%DBL%%%%INSTALL_DIR%%/dbl/FAST +%%DBL%%%%INSTALL_DIR%%/dbl/FULL +%%DBL%%@dirrm %%INSTALL_DIR%%/dbl/NEW +%%DBL%%%%INSTALL_DIR%%/dbl/Update +%%DBL%%%%INSTALL_DIR%%/dbl/Update.Fast +%%DBL%%%%INSTALL_DIR%%/dbl/dbl_expand +%%DBL%%%%INSTALL_DIR%%/dbl/dbl_stat +%%DBL%%@dirrm %%INSTALL_DIR%%/dbl/lists +%%DBL%%@dirrm %%INSTALL_DIR%%/dbl +%%INSTALL_DIR%%/make-cache +%%INSTALL_DIR%%/redirector +%%INSTALL_DIR%%/redirector.conf.dist +%%INSTALL_DIR%%/tools/IN.gz +%%INSTALL_DIR%%/tools/benchmark +%%INSTALL_DIR%%/tools/check-redirector +%%INSTALL_DIR%%/tools/kill-cache +%%INSTALL_DIR%%/tools/set-permissions +@dirrm %%INSTALL_DIR%%/tools +@dirrm %%INSTALL_DIR%% +%%WWW%%%%WWW_DIR%%/ban/1x1.gif +%%WWW%%%%WWW_DIR%%/ban/audio-video.html +%%WWW%%%%WWW_DIR%%/ban/js.js +%%WWW%%%%WWW_DIR%%/ban/mp3.html +%%WWW%%%%WWW_DIR%%/ban/porno.html +%%WWW%%%%WWW_DIR%%/ban/warez.html +%%WWW%%@dirrm %%WWW_DIR%%/ban |