aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-pygments/APKBUILD
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-03-23 16:19:21 -0500
committerMatt Smith <mcs@darkregion.net>2011-03-23 16:19:21 -0500
commit89b0b9cfab97196b4e0cade3cd23e35ee510d3bc (patch)
tree23d7990da1fd96f48331f04f8e823a6885527893 /main/py-pygments/APKBUILD
parent65531e77b89303ae1f66e3f14a77629e19f1e071 (diff)
downloadaports-89b0b9cfab97196b4e0cade3cd23e35ee510d3bc.tar.bz2
aports-89b0b9cfab97196b4e0cade3cd23e35ee510d3bc.tar.xz
main/py-pygments: moved from testing
Diffstat (limited to 'main/py-pygments/APKBUILD')
-rw-r--r--main/py-pygments/APKBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/main/py-pygments/APKBUILD b/main/py-pygments/APKBUILD
new file mode 100644
index 0000000000..00d5867353
--- /dev/null
+++ b/main/py-pygments/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=py-pygments
+_pkgname=Pygments
+pkgver=1.4
+pkgrel=1
+pkgdesc="Pygments is a syntax highlighting package written in Python."
+url="http://pygments.org/"
+arch="noarch"
+license="BSD"
+depends="python"
+makedepends="python-dev py-setuptools"
+install=
+subpackages="$pkgname-doc"
+source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_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 --root "$pkgdir" || return 1
+}
+
+doc() {
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ for _doc in AUTHORS CHANGES LICENSE TODO; do
+ install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/$_doc \
+ || return 1
+ done
+
+ install -Dm644 docs/pygmentize.1 \
+ "$subpkgdir"/usr/share/man/man1/pygmentize.1 || return 1
+ install -Dm644 docs/generate.py \
+ "$subpkgdir"/usr/share/doc/$pkgname/generate.py || return 1
+ for _dir in build src; do
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/$_dir || return 1
+ cp -R ./docs/$_dir/* \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_dir/ || return 1
+ chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/$_dir/ \
+ || return 1
+ done
+
+ # Fix subdir perms
+ find "$subpkgdir"/usr/share/doc/$pkgname/ -type d \
+ -exec chmod 755 '{}' \; || return 1
+}
+
+md5sums="d77ac8c93a7fb27545f2522abe9cc462 Pygments-1.4.tar.gz"