mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
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>
This commit is contained in:
parent
1fd604d920
commit
f6e8c60aa9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=147988
@ -734,6 +734,7 @@
|
||||
SUBDIR += qdecoder
|
||||
SUBDIR += quixote
|
||||
SUBDIR += raqdevil
|
||||
SUBDIR += rejik
|
||||
SUBDIR += reportmagic
|
||||
SUBDIR += resin2
|
||||
SUBDIR += resin3
|
||||
|
101
www/rejik/Makefile
Normal file
101
www/rejik/Makefile
Normal file
@ -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>
|
12
www/rejik/distinfo
Normal file
12
www/rejik/distinfo
Normal file
@ -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
|
11
www/rejik/files/patch-Makefile
Normal file
11
www/rejik/files/patch-Makefile
Normal file
@ -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
|
10
www/rejik/files/pkg-message.in
Normal file
10
www/rejik/files/pkg-message.in
Normal file
@ -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.
|
7
www/rejik/pkg-descr
Normal file
7
www/rejik/pkg-descr
Normal file
@ -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
|
36
www/rejik/pkg-plist
Normal file
36
www/rejik/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user