diff options
author | Sam James <sam@gentoo.org> | 2020-09-26 20:41:13 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-09-26 20:42:15 +0000 |
commit | a47cec5305ebab864083eb338e0926fc1887eb81 (patch) | |
tree | a4d9c44a22a8c79bead3b661b07757bf468a7b37 /net-proxy/rejik/rejik-3.2.11.ebuild | |
parent | net-proxy/rejik: port to EAPI 7 (diff) | |
download | gentoo-a47cec5305ebab864083eb338e0926fc1887eb81.tar.gz gentoo-a47cec5305ebab864083eb338e0926fc1887eb81.tar.bz2 gentoo-a47cec5305ebab864083eb338e0926fc1887eb81.zip |
net-proxy/rejik: bump to 3.2.11
Closes: https://bugs.gentoo.org/706766
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-proxy/rejik/rejik-3.2.11.ebuild')
-rw-r--r-- | net-proxy/rejik/rejik-3.2.11.ebuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/net-proxy/rejik/rejik-3.2.11.ebuild b/net-proxy/rejik/rejik-3.2.11.ebuild new file mode 100644 index 000000000000..b7da9c359d07 --- /dev/null +++ b/net-proxy/rejik/rejik-3.2.11.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="A squid redirector used for blocking unwanted content" +HOMEPAGE="https://rejik.ru/" +SRC_URI="https://rejik.ru/download/redirector-${PV}.tgz + banlists? ( http://rejik.ru/download/banlists-2.x.x.tgz )" +S="${WORKDIR}/redirector-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="banlists" + +DEPEND="dev-libs/libpcre" +RDEPEND="${DEPEND} + dev-perl/Text-Iconv + dev-perl/XML-Parser + net-proxy/squid" + +src_prepare() { + # Workaround for GCC 10 failure, bug #706766 + append-cflags -fcommon + + sed -i -e "s:INSTALL_PATH=/usr/local/rejik3:INSTALL_PATH=${ED}/opt/rejik:g" Makefile || die + sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" vars.h || die + sed -i -e "s:SQUID_USER=nobody:SQUID_USER=squid:g" Makefile || die + sed -i -e "s:SQUID_GROUP=nogroup:SQUID_GROUP=squid:g" Makefile || die + # Respect CFLAGS + sed -i -e "s;CC=gcc -Wall;CC=$(tc-getCC) $CFLAGS;" Makefile || die + # Respect LDFLAGS + sed -i -e "s:LIBS=-L/lib \`pcre-config --libs\`:LIBS=-L/lib \`pcre-config --libs\` $LDFLAGS:" Makefile || die + # + sed -i -e "s:error_log /usr/local/rejik3:error_log /var/log/rejik:g" redirector.conf.dist || die + sed -i -e "s:change_log /usr/local/rejik3:change_log /var/log/rejik:g" redirector.conf.dist || die + sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" redirector.conf.dist || die + + default +} + +src_install() { + dodir /opt/rejik + exeinto /opt/rejik + insinto /opt/rejik + + doexe make-cache + doexe redirector + doins redirector.conf.dist + + dodir /opt/rejik/tools + insinto /opt/rejik/tools + exeinto /opt/rejik/tools + + doexe tools/kill-cache + doexe tools/benchmark + doins tools/IN.gz + + fowners -R squid:squid /opt/rejik + fperms 750 /opt/rejik + + keepdir /var/log/rejik + fowners -R squid:squid /var/log/rejik + + if use banlists; then + insinto /opt/rejik + doins -r "${WORKDIR}/banlists" + fi +} + +pkg_postinst() { + einfo "" + einfo "Copy /opt/rejik/redirector.conf.dist to /opt/rejik/redirector.conf and add line" + einfo "for squid 3.*" + einfo "url_rewrite_program /opt/rejik/redirector /opt/rejik/redirector.conf " + einfo "for squid 2.*" + einfo "redirect_program /opt/rejik/redirector /opt/rejik/redirector.conf" + einfo "to /etc/squid/squid.conf" + einfo "" + einfo "Don't forget to edit /opt/rejik/redirector.conf" + einfo "Be sure redirector.conf has right permissions" +} |