APKBUILD 3.56 KB
Newer Older
1
# Contributor: Michael Mason <ms13sp@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3
pkgname=dansguardian
4
pkgver=2.12.0.3
5
pkgrel=4
6 7
pkgdesc="Web content filter"
url="http://dansguardian.org"
8
arch="all"
9
license="GPL"
10
depends="logrotate"
11
makedepends="zlib-dev pcre-dev"
12
install="$pkgname.pre-install"
13
subpackages="$pkgname-doc"
14 15
pkgusers="dansguar"
pkggroups="dansguar"
16
source="https://downloads.sourceforge.net/project/dansguardian/dansguardian-$pkgver.tar.bz2
17
	dansguardian.initd
18
	dansguardian.logrotate
19
	ftp-credential.patch
20
	dansguardian-2.10.1.1-pcre830.patch
21
	fix-includes.patch
22
	"
23

24 25 26
_builddir="$srcdir"/dansguardian-$pkgver
prepare() {
	cd "$_builddir"
27
	update_config_sub || return 1
28 29 30 31 32
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
33
	# do not block "microsoft...clustimg=..." and similar
34 35
	sed -i -e 's:\.\*:.{1,10}:g' configs/lists/bannedregexpurllist \
		|| return 1
36

37 38 39
	# bind to 127.0.0.1 by default
	sed -i -e 's:^filterip =.*:filterip = 127.0.0.1:' \
		configs/dansguardian.conf.in || return 1
40
}
41

42 43
build() {
	cd "$_builddir"
44 45 46 47
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
48 49 50 51 52 53
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--with-proxyuser=dansguar \
		--with-proxygroup=dansguar \
		--with-logdir=/var/log/dansguardian \
54
		--with-piddir=/var/run/ \
55 56
		--enable-ntlm \
		|| return 1
57
	make || return 1
58
}
59

60 61 62 63 64 65 66 67
package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -D -m 755 "$srcdir"/dansguardian.initd \
		"$pkgdir"/etc/init.d/dansguardian || return 1
	install -D -m 644 "$srcdir"/dansguardian.logrotate \
		"$pkgdir"/etc/logrotate.d/dansguardian || return 1
	install -d -o dansguar -g dansguar "$pkgdir"/var/log/dansguardian
68 69
}

70
md5sums="2a88d0392cd28eaec02b7ee727b2e253  dansguardian-2.12.0.3.tar.bz2
71
ea0361d7cc469de4bb5dc3e9bdfebc33  dansguardian.initd
72
85b6de01c9508e8ceff5ebb55752f8d3  dansguardian.logrotate
73
475c46026e8553181d293d5a4feaf6d9  ftp-credential.patch
74 75
594ca48a3753684151c2012ee371d15b  dansguardian-2.10.1.1-pcre830.patch
bc4f07c17bf50aeb4c54164708f4d436  fix-includes.patch"
76
sha256sums="c74e9a32b97f9a9a056fced3da23fe48fca2bc6aa9af670afe9a53dc819414f5  dansguardian-2.12.0.3.tar.bz2
77
bb54f7eadd171c372164dabd537deadfa8ab67a7ff84a288b8efd5a012b0d06a  dansguardian.initd
78 79
d105f5084dcd6ef87ec7bc7c1bc94cb875cdc9c0405bba5f6e2585c300e43b0c  dansguardian.logrotate
1eba74871d5ffbb574d49eb0857cb9d43b292c1a27578736e0e883d58b2a7bb4  ftp-credential.patch
80 81
8686b5d845642ff74f4706559c770f027de38dd12982dd0a6573d946bb85aa87  dansguardian-2.10.1.1-pcre830.patch
e7d29663bf41a16b93f22351917872a1e98ea4181c6baab8e797df22ff450bd9  fix-includes.patch"
82
sha512sums="37155ef4f1a6dd6bdd87f79c7199b77de49746e4bff0631c239a569c21bf26240cbc9eae5a2436653bfc3d170a664710af9d80c4cfac3082a0620caeaac6740b  dansguardian-2.12.0.3.tar.bz2
83
b4e7d052171ae2ff85aebcdba093f4abb244df5046bb8787b3f2f6771ced506be4038fb12d35bb8db64b9248a4148f437a519b01f99cf8cde7144dec0038db00  dansguardian.initd
84 85
cc23178755365a3cceff08d9eb5c26dd440648b22af15377a30d2032f71cf0bd8ed3ab59c8a671f2cc3f4cdcaebff5d6c9e412f2271b00ac6ce1be5178a32087  dansguardian.logrotate
07b62441363534f39a1400389c702bbd5a53317526a18b3fc929f00bd854706c56b891d7fecb4151e200448f8ba012729e712e9cfdbbd683a3d2634fdc095bd1  ftp-credential.patch
86 87
d3d9af038ff5a91d1f9dc6cf4175b0da2a791386ca624f4a639338ed189a274eba720e9771986e7ded517e2623185e8b61ef3689414197c47a6ae3220be99d57  dansguardian-2.10.1.1-pcre830.patch
2eb17ef01a0b7d626f50197e0ddd160ae4ed17a813af00ceb9f6c54610d84b03b5c819bc2d8799f683e68dc16a65cbac5a8e36f0c43737d8ea82c7354e852d78  fix-includes.patch"