diff options
author | Alin Năstac <mrness@gentoo.org> | 2008-02-17 08:05:48 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2008-02-17 08:05:48 +0000 |
commit | a91f10a5f5c1e8531aa0540a178ed1c45ecb3f23 (patch) | |
tree | 7871e13430a021f1ac93d933c01b5536f7fa2329 /net-proxy/squidguard | |
parent | fixes bug #188255 and bug #205787. (diff) | |
download | gentoo-2-a91f10a5f5c1e8531aa0540a178ed1c45ecb3f23.tar.gz gentoo-2-a91f10a5f5c1e8531aa0540a178ed1c45ecb3f23.tar.bz2 gentoo-2-a91f10a5f5c1e8531aa0540a178ed1c45ecb3f23.zip |
Version bump (#208855).
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-proxy/squidguard')
-rw-r--r-- | net-proxy/squidguard/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/squidguard/files/digest-squidguard-1.2.1-r2 | 2 | ||||
-rw-r--r-- | net-proxy/squidguard/files/digest-squidguard-1.3 | 3 | ||||
-rw-r--r-- | net-proxy/squidguard/files/squidguard-1.3-gentoo.patch | 143 | ||||
-rw-r--r-- | net-proxy/squidguard/squidguard-1.3.ebuild | 69 |
5 files changed, 225 insertions, 2 deletions
diff --git a/net-proxy/squidguard/ChangeLog b/net-proxy/squidguard/ChangeLog index 8c7d9ca53471..7ee2012d44f1 100644 --- a/net-proxy/squidguard/ChangeLog +++ b/net-proxy/squidguard/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-proxy/squidguard -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.17 2007/11/02 15:54:11 mrness Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/ChangeLog,v 1.18 2008/02/17 08:05:47 mrness Exp $ + +*squidguard-1.3 (17 Feb 2008) + + 17 Feb 2008; Alin Năstac <mrness@gentoo.org> + +files/squidguard-1.3-gentoo.patch, +squidguard-1.3.ebuild: + Version bump (#208855). 02 Nov 2007; Alin Năstac <mrness@gentoo.org> -files/squidguard-1.2.0-db4.patch, -squidguard-1.2.0-r1.ebuild: diff --git a/net-proxy/squidguard/files/digest-squidguard-1.2.1-r2 b/net-proxy/squidguard/files/digest-squidguard-1.2.1-r2 new file mode 100644 index 000000000000..472f632ee191 --- /dev/null +++ b/net-proxy/squidguard/files/digest-squidguard-1.2.1-r2 @@ -0,0 +1,2 @@ +RMD160 0b998792a3612db28adb795c9fb0ea9b70118af3 squidGuard-1.2.1.tar.gz 1947273 +SHA256 bc658e9bbadde5d5424caddc6a592c6fcd3346230269b0233092985e4b773592 squidGuard-1.2.1.tar.gz 1947273 diff --git a/net-proxy/squidguard/files/digest-squidguard-1.3 b/net-proxy/squidguard/files/digest-squidguard-1.3 new file mode 100644 index 000000000000..4fe30f6f8f0b --- /dev/null +++ b/net-proxy/squidguard/files/digest-squidguard-1.3 @@ -0,0 +1,3 @@ +MD5 d7c2c2e03a2835e4d1c3bef751ace76f squidGuard-1.3.tar.gz 1905252 +RMD160 4a6a9b5cf36d9e1d0994b3ec410f741a7b7955d3 squidGuard-1.3.tar.gz 1905252 +SHA256 be3342be74dadbf5c27ce0396db675a989c4f919a19e5c8240ce72c6b3c361a4 squidGuard-1.3.tar.gz 1905252 diff --git a/net-proxy/squidguard/files/squidguard-1.3-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.3-gentoo.patch new file mode 100644 index 000000000000..954dae601ae3 --- /dev/null +++ b/net-proxy/squidguard/files/squidguard-1.3-gentoo.patch @@ -0,0 +1,143 @@ +diff -Nru squidGuard-1.3.orig/configure.in squidGuard-1.3/configure.in +--- squidGuard-1.3.orig/configure.in 2007-05-10 18:39:44.000000000 +0300 ++++ squidGuard-1.3/configure.in 2008-02-17 09:52:03.000000000 +0200 +@@ -85,7 +85,7 @@ + AC_HEADER_STDC + AC_CHECK_HEADERS(db.h regex.h unistd.h) + +-+AC_CHECK_HEADER(db.h,,[ ++AC_CHECK_HEADER(db.h,,[ + echo + echo "** No db.h found" + echo " The Berkley DB library is required for squidGuard" +@@ -110,13 +110,24 @@ + dnl + + dnl Check ldap +-AC_CHECK_LIB(ldap,ldap_init,,[ +- echo +- echo "LDAP library not found" +- echo +- exit 1 +- ]) +-AC_RUN_IFELSE([ ++AC_ARG_WITH(ldap, ++ AC_HELP_STRING([--with-ldap], [use ldap (default=yes)])) ++if test "$with_ldap" = "no" -o "$with_ldap" = "false" ++then ++ with_ldap=no ++else ++ AC_CHECK_LIB( ldap, ldap_init, ++ [ ++ with_ldap=yes ++ LIBS="$LIBS -lldap" ++ ],[ ++ AC_MSG_WARN([Cannot find LDAP libraries. LDAP support disabled]) ++ with_ldap=no ++ ]) ++fi ++if test "$with_ldap" = "yes"; then ++ AC_DEFINE(HAVE_LIBLDAP) ++ AC_RUN_IFELSE([ + #include <ldap.h> + int main() + { +@@ -130,6 +141,7 @@ + echo + exit 1 + ],) ++fi + + dnl Check threads... ok if it fails + AC_CHECK_LIB(pthread,pthread_create,,[ +@@ -141,15 +153,7 @@ + ]) + + dnl Check DB +-AC_CHECK_LIB(db,db_version,,[ +- echo +- echo "** The Berkley DB library is required for squidGuard" +- echo " to compile. Get it from http://www.sleepycat.com" +- echo " use --with-db=DIR or --with-db-lib=DIR to specify" +- echo " its location. (default is $dbprefix/BerkeleyDB)" +- echo +- exit 1 +- ]) ++LIBS="$LIBS -ldb" + AC_RUN_IFELSE([ + #include <db.h> + int main() +diff -Nru squidGuard-1.3.orig/Makefile.in squidGuard-1.3/Makefile.in +--- squidGuard-1.3.orig/Makefile.in 2007-07-01 18:37:14.000000000 +0300 ++++ squidGuard-1.3/Makefile.in 2008-02-17 09:52:03.000000000 +0200 +@@ -43,7 +43,7 @@ + # Dependencies for installing + # + +-install: install-build install-conf ++install: install-build + + install-conf: + @echo Installing configuration file ; +@@ -80,10 +80,10 @@ + + install-build: + @echo Installing squidGuard +- @if [ ! -d $(bindir) ]; then \ +- $(MKINSTALLDIRS) $(bindir) ; \ ++ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \ ++ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \ + fi ; \ +- cp src/squidGuard $(bindir) || exit 1 ; \ ++ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \ + echo Done. ; + + clean:: +diff -Nru squidGuard-1.3.orig/src/Makefile.in squidGuard-1.3/src/Makefile.in +--- squidGuard-1.3.orig/src/Makefile.in 2007-05-10 18:39:44.000000000 +0300 ++++ squidGuard-1.3/src/Makefile.in 2008-02-17 09:52:19.000000000 +0200 +@@ -91,6 +91,8 @@ + mv -f y.tab.c y.tab.c.bison + mv -f y.tab.h y.tab.h.bison + ++sg.y sg.l: ++ + # + # Dependencies for installing + # +@@ -103,8 +105,8 @@ + + install.bin:: squidGuard + @echo making $@ in `basename \`pwd\`` +- @$(MKDIR) $(bindir) $(logdir) $(cfgdir) +- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard ++ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir) ++ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard + + uninstall.bin:: + @echo making $@ in `basename \`pwd\`` +diff -Nru squidGuard-1.3.orig/src/sgDb.c squidGuard-1.3/src/sgDb.c +--- squidGuard-1.3.orig/src/sgDb.c 2007-11-03 15:59:49.000000000 +0200 ++++ squidGuard-1.3/src/sgDb.c 2008-02-17 09:52:03.000000000 +0200 +@@ -100,13 +100,21 @@ + if(createdb) + flag = flag | DB_TRUNCATE; + if ((ret = ++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) ++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++#else + Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++#endif + (void) Db->dbp->close(Db->dbp, 0); + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } else { + if ((ret = ++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) ++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++#else + Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++#endif + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } diff --git a/net-proxy/squidguard/squidguard-1.3.ebuild b/net-proxy/squidguard/squidguard-1.3.ebuild new file mode 100644 index 000000000000..a59688aa051e --- /dev/null +++ b/net-proxy/squidguard/squidguard-1.3.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squidguard/squidguard-1.3.ebuild,v 1.1 2008/02/17 08:05:47 mrness Exp $ + +inherit eutils autotools + +DESCRIPTION="Combined filter, redirector and access controller plugin for Squid." +HOMEPAGE="http://www.squidguard.org" +SRC_URI="http://www.squidguard.org/Downloads/squidGuard-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="ldap" + +RDEPEND="net-proxy/squid + >=sys-libs/db-2 + ldap? ( net-nds/openldap )" +DEPEND="${RDEPEND} + sys-devel/bison + sys-devel/flex" + +S="${WORKDIR}/squidGuard-${PV}" + +RESTRICT="test" # tests are currently broken + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}/${P}-gentoo.patch" + eautoconf +} + +src_compile() { + econf \ + $(use_with ldap) \ + --with-sg-config=/etc/squidGuard/squidGuard.conf \ + --with-sg-logdir=/var/log/squidGuard \ + || die "configure has failed" + + emake || die "make has failed" +} + +src_install() { + emake prefix="/usr" INSTDIR="${D}" install || die "emake install has failed" + + keepdir /var/log/squidGuard + fowners squid:squid /var/log/squidGuard + + insinto /etc/squidGuard/sample + doins "${FILESDIR}"/squidGuard.conf.* + insinto /etc/squidGuard/sample/db + doins "${FILESDIR}"/blockedsites + + dodoc ANNOUNCE CHANGELOG README + dohtml doc/*.html + docinto text + dodoc doc/*.txt +} + +pkg_postinst() { + einfo "To enable squidGuard, add the following lines to /etc/squid/squid.conf:" + einfo " url_rewrite_program /usr/bin/squidGuard" + einfo " url_rewrite_children 10" + einfo "" + einfo "Remember to edit /etc/squidGuard/squidGuard.conf first!" + einfo "Examples can be found in /etc/squidGuard/sample/" +} |