summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd710ebc72b438af379eff1fa64f52225d35d0bb (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
# Maintainer: Marius Orcsik <marius@habarnam.ro>
pkgname=hitch-git
pkgver=1.4.8.r9.beff3d4
pkgrel=1
pkgdesc="Hitch is a libev-based high performance SSL/TLS proxy."
arch=('x86_64' 'i686')
url="https://hitch-tls.org/"
license=('GPL')
depends=('libev' 'openssl')
makedepends=('git' 'lsof' 'python-docutils')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(
    'git+http://git.1wt.eu/git/ebtree.git/'
    'git+https://github.com/varnish/hitch.git'
)
noextract=()
md5sums=(
    'SKIP'
    'SKIP'
)

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
    test -L $srcdir/${pkgname%-git}/src/ebtree || ln -s $srcdir/ebtree/ $srcdir/${pkgname%-git}/src
    cd $srcdir/${pkgname%-git}/src/ebtree && make
	cd "$srcdir/${pkgname%-git}"
	./bootstrap
	./configure \
        --prefix=/usr \
        --sbindir=/usr/bin \
        --enable-sessioncache
    make CFLAGS=-Wno-error=discarded-qualifiers 
}

check() {
	cd "$srcdir/${pkgname%-git}"
	make -k check
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" install
    mkdir -p "$pkgdir/usr/lib/systemd/system/"
    cp ../../hitch.service "$pkgdir/usr/lib/systemd/system/"
}