diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2020-01-13 20:30:45 +0300 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2020-01-13 20:34:36 +0300 |
commit | 4bc402ef0b43502e8ceea658b3eb91517fde717c (patch) | |
tree | 6009110f76ae9a219d29cd7ee89a30494276fb5c /net-proxy/squidguard | |
parent | net-misc/nyx: Python 3.7 and 3.8 compatibility (diff) | |
download | gentoo-4bc402ef0b43502e8ceea658b3eb91517fde717c.tar.gz gentoo-4bc402ef0b43502e8ceea658b3eb91517fde717c.tar.bz2 gentoo-4bc402ef0b43502e8ceea658b3eb91517fde717c.zip |
net-proxy/squidguard: version bump to 1.6.0
Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
Diffstat (limited to 'net-proxy/squidguard')
-rw-r--r-- | net-proxy/squidguard/Manifest | 1 | ||||
-rw-r--r-- | net-proxy/squidguard/files/squidguard-1.6.0-gentoo.patch | 33 | ||||
-rw-r--r-- | net-proxy/squidguard/squidguard-1.6.0.ebuild | 92 |
3 files changed, 126 insertions, 0 deletions
diff --git a/net-proxy/squidguard/Manifest b/net-proxy/squidguard/Manifest index 42063dcb7950..c54a3bc2dce3 100644 --- a/net-proxy/squidguard/Manifest +++ b/net-proxy/squidguard/Manifest @@ -1 +1,2 @@ DIST squidGuard-1.5-beta.tar.gz 1983030 BLAKE2B 60405e097babb15eb099649d4ffe23a798207c6d3ac490b8c0c7da777a0136fecb867537214aa90c58ff246a86a0cf7ce59b021e29071ecc43ad002f3a0e3def SHA512 37ddc2ac82596e9d24aac6a610763f2eeb7c15b3a2d7babb85948e1da912aebb1dc85309766f7d8c3d7c22713e24a51f4cdef4520117a03d839662ef2494b6e7 +DIST squidguard-1.6.0.tar.gz 1902233 BLAKE2B 36b422fb2424c79532e0d9dc237b4a60b7817190a45de3646a50031b341c5e94540f55adea7b3e8241b8d87fdec551c5c40d1f60ea90e25347305ef9e473b5d3 SHA512 d6e934f550cd777d58abda5f4fd905ccc396afc28e1ddb0bb842a9a3364cbe43db5c30834fe1ed7d93623a361dde50362a79ac2b660382c7e81b4f067f2ac65e diff --git a/net-proxy/squidguard/files/squidguard-1.6.0-gentoo.patch b/net-proxy/squidguard/files/squidguard-1.6.0-gentoo.patch new file mode 100644 index 000000000000..1a2ca8218f41 --- /dev/null +++ b/net-proxy/squidguard/files/squidguard-1.6.0-gentoo.patch @@ -0,0 +1,33 @@ +--- squidGuard-1.6.orig/Makefile.in 2020-01-09 18:36:44.000000000 +0000 ++++ squidGuard-1.6/Makefile.in 2020-01-10 13:02:14.000000000 +0000 +@@ -43,7 +43,7 @@ + # Dependencies for installing + # + +-install: install-build install-conf ++install: install-build + + install-conf: + @echo Installing configuration file ; +--- squidGuard-1.6.orig/src/Makefile.in 2020-01-03 12:05:39.000000000 +0000 ++++ squidGuard-1.6/src/Makefile.in 2020-01-10 13:02:14.000000000 +0000 +@@ -110,6 +110,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 + # +@@ -122,8 +124,8 @@ + + install.bin:: squidGuard + @echo making $@ in `basename \`pwd\`` +- @$(MKDIR) $(bindir) $(logdir) $(cfgdir) +- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard ++ @$(MKDIR) "$(DESTDIR)"/$(bindir) "$(DESTDIR)"/$(logdir) "$(DESTDIR)"/$(cfgdir) ++ $(INSTALL_PROGRAM) squidGuard "$(DESTDIR)"/$(bindir)/squidGuard + + uninstall.bin:: + @echo making $@ in `basename \`pwd\`` diff --git a/net-proxy/squidguard/squidguard-1.6.0.ebuild b/net-proxy/squidguard/squidguard-1.6.0.ebuild new file mode 100644 index 000000000000..b826299c3770 --- /dev/null +++ b/net-proxy/squidguard/squidguard-1.6.0.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools db-use user + +DESCRIPTION="Combined filter, redirector and access controller plugin for Squid" +HOMEPAGE="http://www.squidguard.org" +SRC_URI="mirror://debian/pool/main/s/squidguard/${PN}_${PV}.orig.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" + +IUSE="ldap" + +RDEPEND="|| ( + sys-libs/db:5.3 + sys-libs/db:4.8 + ) + ldap? ( net-nds/openldap:0 )" + +DEPEND="${RDEPEND} + sys-devel/bison:0 + sys-devel/flex:0" + +suitable_db_version() { + local tested_slots="5.3 4.8" + for ver in ${tested_slots}; do + if [[ -n $(db_findver sys-libs/db:${ver}) ]]; then + echo ${ver} + return 0 + fi + done + die "No suitable BerkDB versions found, aborting" +} + +pkg_setup() { + enewgroup squid + enewuser squid -1 -1 /var/cache/squid squid +} + +src_prepare() { + eapply \ + "${FILESDIR}/${P}-gentoo.patch" + + # Link only with specific BerkDB versions + db_version="$(suitable_db_version)" + sed -i -e "/\$LIBS -ldb/s/-ldb/-l$(db_libname ${db_version})/" configure.ac || die + + eapply_user + eautoreconf + # eautomake does not work because of borked source code of squidguard buildsystem + # only needed to create install-sh and other missing stuff + automake --no-force --add-missing --copy +} + +src_configure() { + econf \ + $(use_with ldap) \ + --with-db-inc="$(db_includedir ${db_version})" \ + --with-sg-config=/etc/squidGuard/squidGuard.conf \ + --with-sg-logdir=/var/log/squidGuard +} + +src_install() { + emake prefix="/usr" DESTDIR="${D}" install + + 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 + docinto html + dodoc 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/" +} |