aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-11-18 05:34:39 +0800
committerantoine <antoine@FreeBSD.org>2014-11-18 05:34:39 +0800
commit0aed24775d53745e9ddfa35cb380f41b8ab3bcc9 (patch)
tree36a1848c18be24ea53a6e1df37375bcc5f2e7639
parentb4385370b666a6c150499c852272f020579dbf3e (diff)
downloadfreebsd-ports-gnome-0aed24775d53745e9ddfa35cb380f41b8ab3bcc9.tar.gz
freebsd-ports-gnome-0aed24775d53745e9ddfa35cb380f41b8ab3bcc9.tar.zst
freebsd-ports-gnome-0aed24775d53745e9ddfa35cb380f41b8ab3bcc9.zip
Unbreak
-rw-r--r--www/rejik/Makefile35
-rw-r--r--www/rejik/files/patch-Makefile59
-rw-r--r--www/rejik/pkg-plist18
3 files changed, 85 insertions, 27 deletions
diff --git a/www/rejik/Makefile b/www/rejik/Makefile
index 7289a7609286..4bb0b0b364f0 100644
--- a/www/rejik/Makefile
+++ b/www/rejik/Makefile
@@ -1,29 +1,26 @@
# Created by: Elisey Savateev <b3k@mail.ru>
# $FreeBSD$
-PORTNAME= rejik
-PORTVERSION= 3.2.11
-CATEGORIES= www
-MASTER_SITES= http://www.rejik.ru/download/
-DISTNAME= redirector-${PORTVERSION}_squid_3.4
+PORTNAME= rejik
+PORTVERSION= 3.2.11
+PORTREVISION= 1
+CATEGORIES= www
+MASTER_SITES= http://www.rejik.ru/download/
+DISTNAME= redirector-${PORTVERSION}_squid_3.4
-MAINTAINER= roma.a.g@gmail.com
-COMMENT= Squid redirector used for blocking unwanted content
+MAINTAINER= roma.a.g@gmail.com
+COMMENT= Squid redirector used for blocking unwanted content
-LICENSE= BSD4CLAUSE
+LICENSE= BSD4CLAUSE
-BROKEN= Fails to stage as a regular user, installs suspicious check-redirector and set-permissions
+RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid
+LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
-RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid
-LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
+USES= perl5 tar:tgz
+USE_GCC= any
+MAKE_ARGS= CC=${CC}
-USES= perl5 tar:tgz
-USE_GCC= any
-
-post-patch:
- @${REINPLACE_CMD} -e 's|gcc|${CC}|; s|INSTALL_PATH=/usr/local/rejik3|INSTALL_PATH=${STAGEDIR}${PREFIX}/rejik3|; s|>> ${INSTALL_PATH}|/usr/local/rejik3|g' ${WRKSRC}/Makefile
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/rejik3/make-cache
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/rejik3/redirector
+USERS= squid
+GROUPS= squid
.include <bsd.port.mk>
diff --git a/www/rejik/files/patch-Makefile b/www/rejik/files/patch-Makefile
new file mode 100644
index 000000000000..270861b43d01
--- /dev/null
+++ b/www/rejik/files/patch-Makefile
@@ -0,0 +1,59 @@
+--- Makefile.orig 2013-11-15 10:28:02 UTC
++++ Makefile
+@@ -40,36 +40,35 @@ cygwin: clean cygwin_vars ${REDIRECTOR_O
+
+ install:
+ # Make dirs
+- mkdir -p ${INSTALL_PATH}/tools
++ mkdir -p ${DESTDIR}${INSTALL_PATH}/tools
+
+ # Install redirector
+- cp make-cache ${INSTALL_PATH}
+- cp redirector ${INSTALL_PATH}
+- cp redirector.conf.dist ${INSTALL_PATH}
++ ${BSD_INSTALL_PROGRAM} make-cache ${DESTDIR}${INSTALL_PATH}
++ ${BSD_INSTALL_PROGRAM} redirector ${DESTDIR}${INSTALL_PATH}
++ cp redirector.conf.dist ${DESTDIR}${INSTALL_PATH}
+
+ # Install tools
+- echo "#!/bin/sh" > ${INSTALL_PATH}/tools/check-redirector
+- echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${INSTALL_PATH}/tools/check-redirector
+- chmod 755 ${INSTALL_PATH}/tools/check-redirector
++ echo "#!/bin/sh" > ${DESTDIR}${INSTALL_PATH}/tools/check-redirector
++ echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${DESTDIR}${INSTALL_PATH}/tools/check-redirector
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/check-redirector
+
+- echo "#!/bin/sh" > ${INSTALL_PATH}/tools/set-permissions
+- echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${INSTALL_PATH}/tools/set-permissions
+- chmod 755 ${INSTALL_PATH}/tools/set-permissions
++ echo "#!/bin/sh" > ${DESTDIR}${INSTALL_PATH}/tools/set-permissions
++ echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${DESTDIR}${INSTALL_PATH}/tools/set-permissions
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/set-permissions
+
+
+- cp tools/kill-cache ${INSTALL_PATH}/tools
+- chmod 755 ${INSTALL_PATH}/tools/kill-cache
++ cp tools/kill-cache ${DESTDIR}${INSTALL_PATH}/tools
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/kill-cache
+
+- cp tools/benchmark ${INSTALL_PATH}/tools
+- chmod 755 ${INSTALL_PATH}/tools/benchmark
++ cp tools/benchmark ${DESTDIR}${INSTALL_PATH}/tools
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/benchmark
+
+- cp tools/IN.gz ${INSTALL_PATH}/tools
+- chmod 644 ${INSTALL_PATH}/tools/IN.gz
++ cp tools/IN.gz ${DESTDIR}${INSTALL_PATH}/tools
++ chmod 644 ${DESTDIR}${INSTALL_PATH}/tools/IN.gz
+
+ # Set permissions
+- chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}
+- chmod 770 ${INSTALL_PATH}
+- chmod 644 ${INSTALL_PATH}/redirector.conf.dist
+- chmod 755 ${INSTALL_PATH}/redirector
+- chmod 755 ${INSTALL_PATH}/make-cache
++ chmod 770 ${DESTDIR}${INSTALL_PATH}
++ chmod 644 ${DESTDIR}${INSTALL_PATH}/redirector.conf.dist
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/redirector
++ chmod 755 ${DESTDIR}${INSTALL_PATH}/make-cache
+
diff --git a/www/rejik/pkg-plist b/www/rejik/pkg-plist
index 6c2f34a3cea9..93e65337154c 100644
--- a/www/rejik/pkg-plist
+++ b/www/rejik/pkg-plist
@@ -1,8 +1,10 @@
-rejik3/make-cache
-rejik3/redirector
-rejik3/redirector.conf.dist
-rejik3/tools/IN.gz
-rejik3/tools/benchmark
-rejik3/tools/check-redirector
-rejik3/tools/kill-cache
-rejik3/tools/set-permissions
+@(squid,squid,) rejik3/make-cache
+@(squid,squid,) rejik3/redirector
+@(squid,squid,) rejik3/redirector.conf.dist
+@(squid,squid,) rejik3/tools/IN.gz
+@(squid,squid,) rejik3/tools/benchmark
+@(squid,squid,) rejik3/tools/check-redirector
+@(squid,squid,) rejik3/tools/kill-cache
+@(squid,squid,) rejik3/tools/set-permissions
+@dir(squid,squid,) rejik3/tools
+@dir(squid,squid,) rejik3