aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/squidanalyzer/APKBUILD
blob: f61246ed39537b9285c9d99d7f4d87f1a0271304 (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=squidanalyzer
pkgver=5.2
pkgrel=0
pkgdesc="Squid proxy log analyzer and report generator"
url="http://squidanalyzer.darold.net/"
arch="noarch"
license="GPLv3"
depends="perl"
depends_dev=""
makedepends="$depends_dev perl-dev"
install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/squid-report/squid-report/$pkgver/squidanalyzer-$pkgver.tar.gz"

_builddir="$srcdir"/squidanalyzer-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
		INSTALLDIRS=vendor \
		BINDIR=/usr/sbin \
		MANDIR=/usr/share/man/man3 \
		HTMLDIR=/var/lib/squidanalyzer \
		LOGFILE=/var/log/squid/access.log \
		DESTDIR="$pkgdir" || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
	install -d "$pkgdir"/etc/periodic/daily
	echo -e "#!/bin/sh\nexec /usr/sbin/squid-analyzer" \
		> "$pkgdir"/etc/periodic/daily/squid-analyzer || return 1
	chmod +x "$pkgdir"/etc/periodic/daily/squid-analyzer || return 1

}

md5sums="f716bbb106bde6c8dbe568a6d6f7d0a7  squidanalyzer-5.2.tar.gz"
sha256sums="1f708e0c2baeb27e229039372bc80ea10c845495eca2bd8b3b099ce2ea2a244b  squidanalyzer-5.2.tar.gz"
sha512sums="e9b559db7333c2c8ec46a4c46b8b9182c6728f69cbeaf0378ccf2be737a35d8271b736010de23505655dd178e96fde2f8c8d1e4ef5a1dfbd1ba8e552b7f3780a  squidanalyzer-5.2.tar.gz"