aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-urwid/APKBUILD
blob: 6fb342198b816fef29facb3306ce4cdf2cea2145 (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
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py-urwid
_pkgname=urwid
pkgver=1.0.1
pkgrel=0
pkgdesc="Urwid is a console user interface library for Python"
url="http://excess.org/urwid/"
arch="all"
license="LGPL2+"
depends=""
makedepends="python-dev py-setuptools py-templayer"
install=""
subpackages="$pkgname-doc"
source="http://excess.org/$_pkgname/$_pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	cd "$_builddir"
	# apply patches here
}

build() {
	cd "$_builddir"
	python setup.py build || return 1
}

package() {
	cd "$_builddir"
	python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

doc() {
	cd "$_builddir"

	# generate tutorial examples, and copy documentation
	python docgen_tutorial.py -s
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/tutorial_examples
	cp -a example*.py "$subpkgdir"/usr/share/doc/$pkgname/tutorial_examples/

	for doc in CHANGELOG reference.html tutorial.html; do
		install -Dm644 $doc "$subpkgdir"/usr/share/doc/$pkgname/$doc
	done

	# Fix subdir perms
	find "$subpkgdir"/usr/share/doc/$pkgname/ -type d -exec chmod 755 '{}' \;
}

md5sums="828f7144b94920205e755c249d2e297f  urwid-1.0.1.tar.gz"