summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 16 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3d5aea0bdde..d7f93567919 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,13 +1,13 @@
-# Maintainer: rafaelff <rafaelff@gnome.org>
+# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
_name=pyg3t
pkgname=$_name-git
-pkgver=0.4.0.r205.196b47d
+pkgver=0.5.1.r305.2099281
pkgrel=1
-pkgdesc="Python GetText Translation Toolkit (git)"
+pkgdesc="Python GetText Translation Toolkit"
arch=(any)
url="https://github.com/pyg3t/pyg3t"
-license=('GPL3')
+license=('GPL')
depends=('python2-dateutil')
makedepends=('git')
provides=($_name)
@@ -16,18 +16,22 @@ source=(git+${url}.git)
md5sums=('SKIP')
pkgver() {
- cd pyg3t
- v=`grep version pyg3t/__init__.py | cut -d\' -f2`
- printf "%s.r%s.%s" "$v" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$srcdir/$_name"
+
+ v="$(grep version pyg3t/__init__.py | cut -d\' -f2)"
+ r="$(git rev-list --count HEAD)"
+ h="$(git rev-parse --short HEAD)"
+ printf "$v.r$r.$h"
}
package() {
- cd pyg3t
- #exit 1
- sed -i "s#!/usr/bin/env python#&2#" \
- pyg3t/gtgrep.py pyg3t/gtparse.py pyg3t/gtxml.py \
- pyg3t/poabc.py pyg3t/podiff.py pyg3t/popatch.py
+ cd "$srcdir/$_name"
+ # fix python2 calls
+ PYTHON_CALLERS="$(grep -R 'python$' --exclude-dir=build | cut -d: -f1)"
+ sed -i -e 's|env python$|env python2|' \
+ -e 's|bin/python$|bin/python2|' \
+ ${PYTHON_CALLERS}
python2 setup.py install --root="$pkgdir/" --optimize=1
}