summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Bürger2017-09-18 09:35:14 +0200
committerNick Bürger2017-09-18 09:35:14 +0200
commitdcbbfc633b1da1b126f630e3407dbfba4f10cc3a (patch)
treeaa246c804e84be7be32aaddb8633938a4aa85b42
downloadaur-dcbbfc633b1da1b126f630e3407dbfba4f10cc3a.tar.gz
Created squidGuard package with patch for newer BerkeleyDB versions
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD39
-rw-r--r--squidguard-patch.diff11
-rw-r--r--squidguard.install4
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e286a7603959
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = squidguard
+ pkgdesc = SquidGuard is a URL redirector to use blacklists with the proxysoftware Squid
+ pkgver = 1.5
+ pkgrel = 1
+ url = http://www.squidguard.org
+ install = squidguard.install
+ arch = x86_64
+ license = GPL
+ depends = bison
+ depends = flex
+ depends = db
+ depends = squid
+ backup = etc/squidguard/squidGuard.conf
+ source = http://www.squidguard.org/Downloads/Devel/squidGuard-1.5-beta.tar.gz
+ source = squidguard-patch.diff
+ md5sums = 85216992d14acb29d6f345608f21f268
+ md5sums = c3834cd2180ac8b919f9fb36327bf43c
+
+pkgname = squidguard
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..19aa609b6fd6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Nick Bürger <nick@nickz.org>
+
+pkgname=squidguard
+pkgver=1.5
+pkgrel=1
+pkgdesc="SquidGuard is a URL redirector to use blacklists with the proxysoftware Squid"
+arch=('x86_64')
+url="http://www.squidguard.org"
+license=('GPL')
+depends=('bison' 'flex' 'db' 'squid')
+backup=('etc/squidguard/squidGuard.conf')
+install='squidguard.install'
+source=("http://www.squidguard.org/Downloads/Devel/squidGuard-$pkgver-beta.tar.gz"
+ "squidguard-patch.diff")
+md5sums=('85216992d14acb29d6f345608f21f268'
+ 'c3834cd2180ac8b919f9fb36327bf43c')
+
+prepare() {
+ cd "squidGuard-$pkgver-beta/src"
+
+ patch -i "${srcdir}/squidguard-patch.diff"
+}
+
+build() {
+ cd "squidGuard-$pkgver-beta"
+ sed -i '19,24 s/@[se]/$(DESTDIR)&/; /SQUIDUSER/d; 51d' Makefile.in
+ ./configure \
+ --prefix=/usr \
+ --with-sg-config=/etc/$pkgname/squidGuard.conf \
+ --with-sg-logdir=/var/log/$pkgname \
+ --with-sg-dbhome=/var/lib/$pkgname/db \
+
+ make
+}
+
+package() {
+ cd "squidGuard-$pkgver-beta"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/squidguard-patch.diff b/squidguard-patch.diff
new file mode 100644
index 000000000000..210ab4bbf19d
--- /dev/null
+++ b/squidguard-patch.diff
@@ -0,0 +1,11 @@
+--- sgDb.c 2010-09-09 12:35:22.000000000 +0200
++++ sgDb.c 2017-09-17 19:27:47.347261770 +0200
+@@ -112,7 +112,7 @@
+ }
+ }
+ #endif
+-#if DB_VERSION_MAJOR == 4
++#if DB_VERSION_MAJOR >= 4
+ if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){
+ flag = DB_CREATE;
+ if(createdb)
diff --git a/squidguard.install b/squidguard.install
new file mode 100644
index 000000000000..b0dc372cee87
--- /dev/null
+++ b/squidguard.install
@@ -0,0 +1,4 @@
+post_install() {
+ chown proxy:proxy /var/log/squidguard
+ chown -R proxy:proxy /var/lib/squidguard
+}