23.1.0-1
[arch-packages.git] / varnish / trunk / PKGBUILD
blobe92a5b808c6972e7228fb8eafb351bb97b3ee924
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Dave Reisner <dreisner@archlinux.org>
3 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
4 # Contributor: Douglas Soares de Andrade
5 # Contributor: Roberto Alsina <ralsina@kde.org>
7 pkgname=varnish
8 pkgver=7.3.0
9 pkgrel=1
10 pkgdesc="High-performance HTTP accelerator"
11 arch=('x86_64')
12 url="https://www.varnish-cache.org/"
13 license=('BSD')
14 depends=('gcc' 'libnsl' 'pcre2')
15 makedepends=('python-docutils' 'python-sphinx' 'git')
16 optdepends=('python: needed for vmod development')
17 backup=('etc/varnish/default.vcl')
18 install=$pkgname.install
19 source=("https://varnish-cache.org/_downloads/varnish-$pkgver.tgz"
20         "git+https://github.com/varnishcache/pkg-varnish-cache.git#commit=a5df068")
21 sha512sums=('2693ed52dccc889e0bb1035ef1e3e5e12b8060ff3be6e6b78593b83f60408035649185dc29dd92265e18d362c3bff2f82cd74b7ae0aa68b94b40013824f3c165'
22             'SKIP')
24 build() {
25   cd "varnish-$pkgver"
27   ./configure \
28     --prefix=/usr \
29     --sysconfdir=/etc \
30     --localstatedir=/var/lib \
31     --sbindir=/usr/bin
33   make
36 check() {
37   cd "varnish-$pkgver"
39   rm bin/varnishtest/tests/m00000.vtc
40   make check
43 package() {
44   cd "varnish-$pkgver"
46   make DESTDIR="$pkgdir" install
48   install -Dm644 "$srcdir/pkg-varnish-cache/systemd/varnish.service" "$pkgdir/usr/lib/systemd/system/varnish.service"
49   install -Dm644 "$srcdir/pkg-varnish-cache/systemd/varnishncsa.service" "$pkgdir/usr/lib/systemd/system/varnishncsa.service"
50   install -Dm755 "$srcdir/pkg-varnish-cache/systemd/varnishreload" "$pkgdir/usr/bin/varnishreload"
51   install -Dm755 "$srcdir/pkg-varnish-cache/systemd/varnish.logrotate" "$pkgdir/etc/logrotate.d/varnish"
52   install -Dm755 "$srcdir/pkg-varnish-cache/systemd/varnish.sysusers" "$pkgdir/usr/lib/sysusers.d/varnish.conf"
54   # config
55   install -Dm644 "etc/example.vcl" "$pkgdir/etc/varnish/default.vcl"
57   # license
58   install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"