diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 28 |
2 files changed, 20 insertions, 16 deletions
@@ -1,12 +1,12 @@ # Generated by mksrcinfo v8 -# Wed Jul 20 02:33:26 UTC 2016 +# Sun Sep 4 21:40:49 UTC 2016 pkgbase = pyg3t-git - pkgdesc = Python GetText Translation Toolkit (git) - pkgver = 0.4.0.r205.196b47d + pkgdesc = Python GetText Translation Toolkit + pkgver = 0.5.1.r305.2099281 pkgrel = 1 url = https://github.com/pyg3t/pyg3t arch = any - license = GPL3 + license = GPL makedepends = git depends = python2-dateutil provides = pyg3t @@ -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 } |