/[gentoo-x86]/net-proxy/rejik/rejik-3.2.10.ebuild
Gentoo

Contents of /net-proxy/rejik/rejik-3.2.10.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Jul 31 12:41:37 2012 UTC (8 years ago) by yngwin
Branch: MAIN
CVS Tags: HEAD
Initial commit from bug #426320. Package proxy-maintained by Sergey Popov.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="4"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="A squid redirector used for blocking unwanted content"
10 HOMEPAGE="http://rejik.ru/"
11 SRC_URI="http://rejik.ru/download/redirector-${PV}.tgz
12 banlists? ( http://rejik.ru/download/banlists-2.x.x.tgz )"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~x86 ~amd64"
17 IUSE="banlists"
18
19 DEPEND="dev-libs/libpcre"
20 RDEPEND="${DEPEND}
21 dev-perl/Text-Iconv
22 dev-perl/XML-Parser
23 net-proxy/squid"
24
25 S=${WORKDIR}/redirector-${PV}
26
27 src_prepare() {
28 sed -i -e "s:INSTALL_PATH=/usr/local/rejik3:INSTALL_PATH=${D}/opt/rejik:g" Makefile
29 sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" vars.h
30 sed -i -e "s:SQUID_USER=nobody:SQUID_USER=squid:g" Makefile
31 sed -i -e "s:SQUID_GROUP=nogroup:SQUID_GROUP=squid:g" Makefile
32 # Respect CFLAGS
33 sed -i -e "s:CC=gcc -Wall:CC=$(tc-getCC) $CFLAGS:" Makefile
34 # Respect LDFLAGS
35 sed -i -e "s:LIBS=-L/lib \`pcre-config --libs\`:LIBS=-L/lib \`pcre-config --libs\` $LDFLAGS:" Makefile
36 #
37 sed -i -e "s:error_log /usr/local/rejik3:error_log /var/log/rejik:g" redirector.conf.dist
38 sed -i -e "s:change_log /usr/local/rejik3:change_log /var/log/rejik:g" redirector.conf.dist
39 sed -i -e "s:/usr/local/rejik3:/opt/rejik:g" redirector.conf.dist
40 }
41
42 src_install() {
43 dodir /opt/rejik
44 exeinto /opt/rejik
45 insinto /opt/rejik
46
47 doexe make-cache
48 doexe redirector
49 doins redirector.conf.dist
50
51 dodir /opt/rejik/tools
52 insinto /opt/rejik/tools
53 exeinto /opt/rejik/tools
54
55 fperms +x tools/kill-cache
56 fperms +x tools/benchmark
57
58 doexe tools/kill-cache
59 doexe tools/benchmark
60 doins tools/IN.gz
61
62 fowners -R squid:squid /opt/rejik
63 fperms 750 /opt/rejik
64
65 keepdir /var/log/rejik
66 fowners -R squid:squid /var/log/rejik
67
68 if use banlists; then
69 insinto /opt/rejik
70 doins -r "${WORKDIR}/banlists"
71 fi
72 }
73
74 pkg_postinst() {
75 einfo ""
76 einfo "Copy /opt/rejik/redirector.conf.dist to /opt/rejik/redirector.conf and add line"
77 einfo "for squid 3.*"
78 einfo "url_rewrite_program /opt/rejik/redirector /opt/rejik/redirector.conf "
79 einfo "for squid 2.*"
80 einfo "redirect_program /opt/rejik/redirector /opt/rejik/redirector.conf"
81 einfo "to /etc/squid/squid.conf"
82 einfo ""
83 einfo "Dont forget to edit /opt/rejik/redirector.conf"
84 einfo "Be sure redirector.conf has right permissions"
85 }

  ViewVC Help
Powered by ViewVC 1.1.20