aboutsummaryrefslogtreecommitdiffstats
path: root/main/tevent/APKBUILD
blob: a5fb4e432c47cfd85517f0b96e8cf250fa7cf1ac (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
51
52
53
54
55
56
57
58
59
60
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tevent
pkgver=0.9.37
pkgrel=1
pkgdesc="The tevent library"
url="https://tevent.samba.org"
arch="all"
license="LGPL-3.0-or-later"
makedepends="libtirpc-dev python2-dev python3-dev talloc-dev"
replaces="samba"
subpackages="$pkgname-dev py2-$pkgname:_py2 py3-$pkgname:_py3"
source="https://samba.org/ftp/tevent/tevent-$pkgver.tar.gz
	fix-public-header.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-rpath \
		--bundled-libraries=NONE \
		--without-gettext \
		--extra-python=/usr/bin/python3
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

_py2() {
	pkgdesc="Python 2 binding for the tevent library"
	provides="py-$pkgname=$pkgver-r$pkgrel"  # for backward compatibility
	replaces="py-$pkgname"  # for backward compatibility

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python2* "$subpkgdir"/usr/lib/
}

_py3() {
	pkgdesc="Python 3 binding for the tevent library"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
}

sha512sums="5d4833403e1c2f2749f00a389e4757261a4f22cd3a67c906001b36a8b622cc68a38e86d4eb475848a2121ebba054a7e7dac7f486d9f2906a401c3cc97fb447f4  tevent-0.9.37.tar.gz
ee4cce8591dfe31288975596d8464b7cc160580715f88e4fd19b5ae7e1a831650b072954731f015f52d76600597faee894f0174b9e92d18dca9629f9d056230c  fix-public-header.patch"