aboutsummaryrefslogtreecommitdiffstats
path: root/main/varnish/APKBUILD
blob: 5018e70374c7416ac7f848d1fbee9f3bfba98a78 (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
88
89
90
91
92
93
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=varnish
pkgver=5.1.2
pkgrel=0
pkgdesc="High-performance HTTP accelerator"
url="http://www.varnish-cache.org/"
arch="all"
license="BSD"
depends="gcc libc-dev libgcc"
depends_dev=
makedepends="$depends_dev pcre-dev ncurses-dev libedit-dev py-docutils
	linux-headers libexecinfo-dev"
install="varnish.pre-install"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-libs $pkgname-geoip::noarch"
pkgusers="varnish"
pkggroups="varnish"
source="http://repo.varnish-cache.org/source/varnish-$pkgver.tar.gz
	fix-stack-overflow.patch
	musl-mode_t.patch

	varnishd.initd
	varnishd.confd
	varnishlog.initd
	varnishlog.confd
	varnishncsa.initd
	varnishncsa.confd
	varnishd.logrotate
	maxminddb.vcl
	"

builddir="$srcdir"/varnish-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var/lib \
		--without-jemalloc
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	for i in $source; do
		case $i in
		*.initd) install -Dm755 "$srcdir"/$i \
				"$pkgdir"/etc/init.d/${i%.*} ;;
		*.confd) install -Dm644 "$srcdir"/$i \
				"$pkgdir"/etc/conf.d/${i%.*} ;;
		esac
	done
	install -Dm644 "$srcdir"/varnishd.logrotate \
		"$pkgdir"/etc/logrotate.d/varnishd
	install -d -o varnish -g varnish -m750 \
		"$pkgdir"/var/cache/varnish \
		"$pkgdir"/var/log/varnish \
		"$pkgdir"/var/lib/varnish
	install -d -o root -g varnish -m750 "$pkgdir"/etc/varnish
}

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

geoip() {
	pkgdesc="Maxmind GeoIP2 lookup plugin for varnish"
	depends="libmaxminddb-dev"

	install -m755 -D "$srcdir"/maxminddb.vcl \
		"$subpkgdir"/usr/lib/varnish/plugins/maxminddb.vcl
}

sha512sums="6ee71c2678a34f7e3963547d8e79bd83e3b326ffe703ad60f0d6f8f218a3801849c870aa00e407008ef22cd2b2baf4cbe02625ce77018279afdb8208d43a743b  varnish-5.1.2.tar.gz
09c8b0dad334bfcfaa86deb918ab886a9d0279cad720a40547243cd1223349335deb476ea866cd96c740e4effeffc6582c9c09db1b0a1d31c5c960379cdae5e0  fix-stack-overflow.patch
8758bef9039a2cca23b7302668bd49f1ea07f54835512a8a9558bb9ed5de1c0fca53f2085ccd298fe0c6579fc81c3b583a85f4f6b25b6ad85f89bf3be04afb70  musl-mode_t.patch
5f9cd1da8a72e71d6317d9c9b625d4b2f4f46ff6c4f7aaf8fed5958ce141be572d7e4d2d207af51b1cf4201b19b9bc1574d3cfcf7616c043a309c04ce6ae949e  varnishd.initd
98c8901e53f3c6adb908b9eb01fd441ea53f3c54d4a79aecb1fb1eddfa2fc93de3d0de403a4464a9baff15873b3a20623837e3a37cb225e924a329e32b9e37d6  varnishd.confd
31758d5b328700d31cf078efce64421ab7b6f00961733b990367efa8ce9aa406e72b46be1cf21fe2f8e11e3cc1803dc9158930ae7803131a88d71f7193d2d270  varnishlog.initd
88fe9b545a2b25d6e6e45f1cfecbeca5f503bc1fbe95856386e568edee41b487b162cddceba8cb152b0a37d8d96635a76c0715fc69d87d6c667ac403ebae0bb7  varnishlog.confd
d620dd5ad8b81c561ff395fcf0307df9d4b49ef34b5d4322f461e570ffce58fea687365017b27cb6fde8c41b554750bb913fd1337764fdc16f1513429ee3d9fb  varnishncsa.initd
a5426ff66b89d2afb6273f05e4117b3eec5ce0162a624d52c92b418960f72e58bd01224165613221af76ec241bd98e1eb985b2ef7b83a5b615e9ece67234dcc8  varnishncsa.confd
51cc6d46ff7439de93977ab87dfb0af399458c1e446475696f73342ae7a0c1a8ca8fc6e79e593659f1af30716a5f8a1ee5e3b1f5e7b35df40b45d47e7b0f2ffd  varnishd.logrotate
69f088819cff6d4441813be284f4117f232d08908515bd15d96bd5bb9d41ba7100657a52fd408d44c396d004366062ae22fbf08e2a983cd8023b554539ccf596  maxminddb.vcl"