aboutsummaryrefslogtreecommitdiffstats
path: root/main/varnish/APKBUILD
blob: 8e000a3d2a55988e61bbdc5499c423f4ca03f48a (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=varnish
pkgver=3.0.4
pkgrel=1
pkgdesc="High-performance HTTP accelerator"
url="http://www.varnish-cache.org/"
arch="all"
license="BSD"
depends="gcc libc-dev"
depends_dev=
makedepends="$depends_dev pcre-dev ncurses-dev readline-dev"
install="varnish.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
pkgusers="varnish"
pkggroups="varnish"
source="http://repo.varnish-cache.org/source/varnish-$pkgver.tar.gz
	varnishd.initd
	varnishd.confd
	varnishd.logrotate
	varnish-3.0.3-pthread-uclibc.patch"

_builddir="$srcdir"/varnish-$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"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var/lib \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	install -Dm755 "$srcdir"/varnishd.initd "$pkgdir"/etc/init.d/varnishd \
		|| return 1
	install -Dm644 "$srcdir"/varnishd.confd "$pkgdir"/etc/conf.d/varnishd \
		|| return 1
	install -Dm644 "$srcdir"/varnishd.logrotate \
		"$pkgdir"/etc/logrotate.d/varnishd || return 1
	install -d -o varnish -g varnish \
		"$pkgdir"/var/cache/varnish \
		"$pkgdir"/var/log/varnish \
		"$pkgdir"/var/lib/varnish \
		|| return 1
	find "$pkgdir" -name *.la -print | xargs rm
}

libs() {
	pkgdesc="Libraries for varnish"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib/
}

md5sums="a130ce9c3504b9603a46542635e18701  varnish-3.0.4.tar.gz
5aa262fc6da61ded082393fe10dbad2a  varnishd.initd
0482f094e6d8ca59adb5b031d6c56b08  varnishd.confd
a6cb8a43c9465699cf956dc992998225  varnishd.logrotate
8c5532869bea7f668e2ce5d4585359f8  varnish-3.0.3-pthread-uclibc.patch"
sha256sums="4e044ccb5c76222bddf89c808f13ea8f66977972675aecb48a920f6800ad0f79  varnish-3.0.4.tar.gz
8e75973cc20a462988171adab5550a2b9dfa4ec2887312074aaf2a411846f7cd  varnishd.initd
f3bc8ba994085d459b83422101d3966d13212e96aba02df0c9bbb2118819090c  varnishd.confd
017173cb42bb60f853063b7fbc843120c547e501233ce2299e1066b5d81e4d5e  varnishd.logrotate
3e39323ff4d741a9a0337e84eee7ce9f8b5419722a3b905f09ccf2486a9ff24f  varnish-3.0.3-pthread-uclibc.patch"
sha512sums="d6fa8d320050f659f341af20b24c4401609ffd77207a7889b98e5378c507db04eda310e2b953b5144d748a0b3c08884e87d5c36962f0a38f03014708ff7c78d0  varnish-3.0.4.tar.gz
b48897b24e452a6e36fac25ebdd1ac272cb0a7f9c5b6ab895daa77777e8be6f8f4ed7555a06046daa4dc149e85f8129758367bf630cbb0b8c73f98629d8e07a8  varnishd.initd
ba17b04682fc30ebf736647d248ce4db11dc53434c93344a74c605f516799c5d7ad01a9a358cc707fdf5be17f5e96fd4a91f68641f24f2edb82f40b9675b11a1  varnishd.confd
8fb1cba86ede5eff28a494f6b1da1a651d66383cdeb63922104407f28903dea0c643155b6d7ac8353b8c63d480a6c5b43a70c7252bc51ee73317c33a1844c52c  varnishd.logrotate
c06cd005ba04725ec69a9b5cb138fe2487bbd0b0e0aa4c6a39314b6473b160874d0c8452fca466e4efa907a998752e65940288a65a33b88cc4f206f1180b68d8  varnish-3.0.3-pthread-uclibc.patch"