diff options
author | Matt Smith <mcs@darkregion.net> | 2010-12-14 23:31:18 -0600 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-16 10:30:52 +0000 |
commit | bf29f568b8e8d3c2049fde5ae86e94a281ba26b1 (patch) | |
tree | 0f95befc0cab526250e194799ca2d3478b619e46 | |
parent | 5e508732ea1b23ac92b8cd3735f917b697e0f0ad (diff) | |
download | alpine_aports-bf29f568b8e8d3c2049fde5ae86e94a281ba26b1.tar.bz2 alpine_aports-bf29f568b8e8d3c2049fde5ae86e94a281ba26b1.tar.xz alpine_aports-bf29f568b8e8d3c2049fde5ae86e94a281ba26b1.zip |
testing/py-pygments: new aport
-rw-r--r-- | testing/py-pygments/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/py-pygments/APKBUILD b/testing/py-pygments/APKBUILD new file mode 100644 index 0000000000..ac6da6e105 --- /dev/null +++ b/testing/py-pygments/APKBUILD | |||
@@ -0,0 +1,54 @@ | |||
1 | # Contributor: Matt Smith <mcs@darkregion.net> | ||
2 | # Maintainer: Matt Smith <mcs@darkregion.net> | ||
3 | pkgname=py-pygments | ||
4 | _pkgname=Pygments | ||
5 | pkgver=1.3.1 | ||
6 | pkgrel=0 | ||
7 | pkgdesc="Pygments is a syntax highlighting package written in Python." | ||
8 | url="http://pygments.org/" | ||
9 | arch="x86 x86_64" | ||
10 | license="BSD" | ||
11 | depends="python" | ||
12 | makedepends="python-dev py-setuptools" | ||
13 | install= | ||
14 | subpackages="$pkgname-doc" | ||
15 | source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" | ||
16 | |||
17 | _builddir="$srcdir"/$_pkgname-$pkgver | ||
18 | |||
19 | prepare() { | ||
20 | cd "$_builddir" | ||
21 | # apply patches here | ||
22 | } | ||
23 | |||
24 | build() { | ||
25 | cd "$_builddir" | ||
26 | python setup.py build || return 1 | ||
27 | } | ||
28 | |||
29 | package() { | ||
30 | cd "$_builddir" | ||
31 | python setup.py install --root "$pkgdir" | ||
32 | } | ||
33 | |||
34 | doc() { | ||
35 | cd "$_builddir" | ||
36 | |||
37 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname | ||
38 | for doc in AUTHORS CHANGES LICENSE TODO; do | ||
39 | install -Dm644 $doc "$subpkgdir"/usr/share/doc/$pkgname/$doc | ||
40 | done | ||
41 | |||
42 | install -Dm644 docs/pygmentize.1 "$subpkgdir"/usr/share/man/man1/pygmentize.1 | ||
43 | install -Dm644 docs/generate.py "$subpkgdir"/usr/share/doc/$pkgname/generate.py | ||
44 | for dir in build src; do | ||
45 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/$dir | ||
46 | cp -R ./docs/$dir/* "$subpkgdir"/usr/share/doc/$pkgname/$dir/ | ||
47 | chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/$dir/ | ||
48 | done | ||
49 | |||
50 | # Fix subdir perms | ||
51 | find "$subpkgdir"/usr/share/doc/$pkgname/ -type d -exec chmod 755 '{}' \; | ||
52 | } | ||
53 | |||
54 | md5sums="54be67c04834f13d7e255e1797d629a5 Pygments-1.3.1.tar.gz" | ||