aboutsummaryrefslogtreecommitdiffstats
path: root/main/libevent/APKBUILD
blob: d3c2e2991340ce35db926a228fe1071b06d5b1f8 (plain) (blame)
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
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libevent
pkgver=2.1.12
_pkgver=$pkgver-stable
pkgrel=0
pkgdesc="An event notification library"
url="http://libevent.org/"
arch="all"
license="BSD-3-Clause"
options="!check" # regression tests failed
depends_dev="python3"
makedepends="$depends_dev openssl-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/libevent/libevent/releases/download/release-$_pkgver/libevent-$_pkgver.tar.gz"
builddir="$srcdir/$pkgname-$_pkgver"

# secfixes:
#   2.1.8-r0:
#     - CVE-2016-10195
#     - CVE-2016-10196
#     - CVE-2016-10197

prepare() {
	default_prepare

	sed -i '1s|^#!/usr/bin/env python$|#!/usr/bin/python3|' event_rpcgen.py
	# help provides tracing work out correctly
	sed -i -e "s/@VERSION@/$pkgver-r$pkgrel/" *.pc.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc
	make
}

check() {
	make -j1 check
}

package() {
	make -j1 DESTDIR=$pkgdir install
}

dev() {
	replaces="libevent"
	default_dev
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

static() {
	depends=""
	pkgdesc="$pkgdesc (static libraries)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}

sha512sums="88d8944cd75cbe78bc4e56a6741ca67c017a3686d5349100f1c74f8a68ac0b6410ce64dff160be4a4ba0696ee29540dfed59aaf3c9a02f0c164b00307fcfe84f  libevent-2.1.12-stable.tar.gz"