summaryrefslogtreecommitdiff
path: root/extra/varnish/PKGBUILD
blob: 0905938e460afaeb1dcfbe1d09b21a558bfd2bda (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
# $Id: PKGBUILD 185368 2013-05-13 17:51:30Z dreisner $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Douglas Soares de Andrade
# Contributor: Roberto Alsina <ralsina@kde.org>

pkgname=varnish
pkgver=3.0.3
pkgrel=3
pkgdesc="High-performance HTTP accelerator"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.varnish-cache.org/"
license=('BSD')
depends=('gcc' 'libedit' 'pcre')
backup=('etc/varnish/default.vcl')
install=$pkgname.install
options=('!libtool')
source=("http://repo.varnish-cache.org/source/$pkgname-$pkgver.tar.gz"
        varnish-vcl-reload
        varnish.service)
md5sums=('714310c83fdbd2061d897dacd3f63d8b'
         '03196dee7fc68e75069393d52c370762'
         'a59b17d8e3066abcf3dd7755a2212dd4')

build() {
  cd "$pkgname-$pkgver"

  # disable JIT compilation, as it's crashy crashy (bug in PCRE)
  # this is flagged out and disabled by default in $nextrelease of Varnish.
  sed -i '/pcre_study/ s/PCRE_STUDY_JIT_COMPILE/0/' lib/libvarnish/vre.c

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var/lib \
    --sbindir=/usr/bin

  make
}

package() {
  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install

  install -m755 "$srcdir/varnish-vcl-reload" "$pkgdir/usr/bin"
  install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"

  # license
  install -Dm644 "$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}