aboutsummaryrefslogtreecommitdiffstats
path: root/main/libevhtp/APKBUILD
blob: 5379c13db87f2ab95e88ac8ef4445e7e419e6162 (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
# Contributor: <xmingske@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libevhtp
pkgver=1.2.9
pkgrel=0
pkgdesc="Flexible replacement for libevent's httpd API"
url="https://github.com/ellzey/libevhtp/"
arch="all"
license="BSD"
makedepends="cmake libevent-dev openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/ellzey/libevhtp/archive/${pkgver}.tar.gz"
subpackages="$pkgname-dev"

_builddir="${srcdir}/${pkgname}-${pkgver}"

prepare() {
	local pf
	cd "${_builddir}"
	for pf in $source; do
		case $pf in
		*.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;;
		esac
	done
}

build() {
	cd "${_builddir}"
	cmake -DCUSTOM_BINDIR=/usr/bin \
                -DCMAKE_INSTALL_PREFIX=/usr \
                -DCUSTOM_DOCDIR="/usr/share/doc/${pkgname}" \
                -DCUSTOM_SHAREDIR="/usr/share/${pkgname}" \
		-DEVHTP_BUILD_SHARED=ON \

	.
	make || return 1
}

package() {
	cd "${_builddir}"
	make DESTDIR="${pkgdir}" install || return 1
}

md5sums="428a8d179fcc0cadedd914ed6456e08f  libevhtp-1.2.9.tar.gz"
sha256sums="6a45125dab5211be5e0b6098b6d100f4aebe84dc6b80a9ce7211885fb3c4a97c  libevhtp-1.2.9.tar.gz"
sha512sums="fe9254c5302631a06d509eeb1614f0a28e84a0bf2149f9881f9c6b6ddcc57dbd57b5d3a80d20d8a0fd5499c7efeca68d7f13ab67daf6a6175f0424f39a5f6b83  libevhtp-1.2.9.tar.gz"