APKBUILD 1.32 KB
Newer Older
Matt Smith's avatar
Matt Smith committed
1 2 3 4 5
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=py-docutils
_pkgname=docutils
pkgver=0.7
6
pkgrel=4
Matt Smith's avatar
Matt Smith committed
7 8
pkgdesc="Documentation Utilities for Python"
url="http://docutils.sourceforge.net/"
9
arch="noarch"
Matt Smith's avatar
Matt Smith committed
10 11
license="PublicDomain"
depends="python py-imaging py-roman"
12
makedepends="python-dev py-setuptools"
Matt Smith's avatar
Matt Smith committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
install=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$_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"
31
	python setup.py install --root "$pkgdir" || return 1
Matt Smith's avatar
Matt Smith committed
32 33 34 35 36
}

doc() {
	cd "$_builddir"

37 38 39 40 41 42 43
	for _docdir in docs licenses; do
		mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/$_docdir \
			|| return 1
		cp -R ./$_docdir/* "$subpkgdir"/usr/share/doc/$pkgname/$_docdir/ \
			|| return 1
		chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/$_docdir/ \
			|| return 1
Matt Smith's avatar
Matt Smith committed
44 45
	done

46 47 48
	for _doc in BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt THANKS.txt; do
		install -m644 -D $_doc "$subpkgdir"/usr/share/doc/$pkgname/ \
			|| return 1
Matt Smith's avatar
Matt Smith committed
49 50 51 52 53 54 55
	done

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

md5sums="9aec716baf15d06b5aa57cf8d5591c15  docutils-0.7.tar.gz"