aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-twisted/APKBUILD
blob: 24ba24e7082ec0882c911c2ef8f0d5d77a182d6e (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-twisted
_pkgname=Twisted
pkgver=17.1.0
pkgrel=0
pkgdesc="Asynchronous networking framework written in Python."
url="http://twistedmatrix.com/"
arch="all"
license="MIT"
depends="py-crypto py-zope-interface"
makedepends="python2-dev py-setuptools libtirpc-dev"
install=""
subpackages="$pkgname-doc"
source="https://twistedmatrix.com/Releases/${_pkgname}/${pkgver%.*}/${_pkgname}-${pkgver}.tar.bz2"
builddir="$srcdir"/"$_pkgname"-$pkgver

build() {
	cd "$builddir"
	CFLAGS="$CFLAGS `pkgconf --cflags libtirpc`" python2 setup.py build || return 1
}

package() {
	cd "$builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
	install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	_mans="pyhtmlizer.1 trial.1 twistd.1"
	for _man in $_mans; do
		install -m644 -D "$builddir"/docs/core/man/$_man \
			"$pkgdir"/usr/share/man/man1/$_man  || return 1
	done
}

sha512sums="e5eedc9a70b7e4d0ec18dddaa82aa9a784e96fd517db65c278d822d15e8bdc65a35307a5a0474eb68dcb73fcd5508086bec605580a9f2f767bcbe27d714b4966  Twisted-17.1.0.tar.bz2"