summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRafael Fontenelle2017-04-29 14:28:54 -0300
committerRafael Fontenelle2017-04-29 14:28:54 -0300
commitf630319f181b92d8af667e9be7fc8117d41344d9 (patch)
tree8dd5fc19f42d3caa9f0ab550a14e6f8c86a44e97 /PKGBUILD
downloadaur-f630319f181b92d8af667e9be7fc8117d41344d9.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e8e3864dc882
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Rafael Fontenelle <rafaelff@gnome.org>
+
+pkgname=python2-translate-toolkit-lib
+_name=translate-toolkit
+pkgver=2.1.0
+pkgrel=1
+pkgdesc="A toolkit to convert between various different translation formats, help process and validate localisations"
+arch=('any')
+url="http://toolkit.translatehouse.org/"
+license=('GPL')
+depends=('bash' 'python2-lxml' 'python2-six' 'python2-diff-match-patch')
+makedepends=('python2-setuptools' 'python2-setuptools')
+optdepends=('python2-iniparse: for ini2po'
+ 'gaupol: for po2sub')
+source=("https://github.com/translate/translate/releases/download/$pkgver/$_name-${pkgver}.tar.bz2")
+md5sums=('302d20ad12a34da9992ef14f4ba13261')
+
+prepare() {
+ cd $_name-$pkgver
+ sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ $(find . -name '*.py')
+}
+
+build() {
+ cd $_name-$pkgver
+ python2 -s setup.py build
+}
+
+package() {
+ cd $_name-$pkgver
+ python2 -s setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
+ python2 -m compileall "$pkgdir/usr/lib/python2.7/site-packages/translate"
+ # avoid conflict with pkg translate-toolkit
+ rm -rf "$pkgdir/usr/bin"
+}