summaryrefslogtreecommitdiffstats
path: root/testing/squidguard/APKBUILD
blob: df2fdc8bcf17b49f08b4dd6428d2728530ef60e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=squidguard
_realname=squidGuard
pkgver=1.4
pkgrel=6
pkgdesc="Squid URL redirector"
url="http://www.squidguard.org"
arch="all"
license="GPL"
depends=
makedepends="flex bison db-dev"
install=
pkgusers="squid"
pkggroups="squid"
subpackages=""
source="http://www.squidguard.org/Downloads/$_realname-$pkgver.tar.gz
	squidguard-1.4-gentoo.patch
	squidguard-1.4-upstream-fixes.patch
	squidguard-1.4-vsnprintf.patch
	squidguard-1.4-debian-bdb-51.patch"

_builddir="$srcdir"/$_realname-$pkgver

prepare() {
	cd "$_builddir"
	patch -p1 < ../../squidguard-1.4-gentoo.patch
	patch -p1 < ../../squidguard-1.4-upstream-fixes.patch
	patch -p1 < ../../squidguard-1.4-vsnprintf.patch
	patch -p1 < ../../squidguard-1.4-debian-bdb-51.patch
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--with-sg-config=/etc/squidGuard/squidGuard.conf \
		--with-sg-logdir=/var/log/squidGuard
	make || return 1
}

package() {
	cd "$_builddir"
	make INSTDIR="$pkgdir" install
	install -D -m644 ../../squidGuard.conf.blocksites $pkgdir/etc/squidGuard/squidGuard.conf
	install -D -m644 ../../blockedsites $pkgdir/etc/squidGuard/blockedsites
	mkdir -p "$pkgdir"/var/log/squidGuard && chown squid.squid "$pkgdir"/var/log/squidGuard
}

md5sums="de834150998c1386c30feae196f16b06  squidGuard-1.4.tar.gz
ba58e934fe2f75fcb5dfbe054e045449  squidguard-1.4-gentoo.patch
4b512e930dede70ddf36d4f7c75a598f  squidguard-1.4-upstream-fixes.patch
8878c72f27e45dab99e5d0197d50caec  squidguard-1.4-vsnprintf.patch
ea2deca296c41107bc981d1a2a093846  squidguard-1.4-debian-bdb-51.patch"