blob: 79d942f87d48b3ff1ff75826c4fd869a849fa278 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py-pygments
_pkgname=Pygments
pkgver=1.6
pkgrel=0
pkgdesc="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="a18feedf6ffd0b0cc8c8b0fbdb2027b1 Pygments-1.6.tar.gz"
sha256sums="799ed4caf77516e54440806d8d9cd82a7607dfdf4e4fb643815171a4b5c921c0 Pygments-1.6.tar.gz"
sha512sums="552d0c2a1296773a5482122bd5cbec0ce91a497cd86ee105e1c5ddf2bfa9c206fcc7de504c6da480344c6e1bee30d7b26012fd061dcb2091d8b2b21bcd163bf0 Pygments-1.6.tar.gz"
|