diff options
author | jose1711 | 2016-01-01 22:33:52 +0100 |
---|---|---|
committer | jose1711 | 2016-01-01 22:33:52 +0100 |
commit | a486672c41d5166cd1ad146269f8f6fc22a3794a (patch) | |
tree | 84ca0cd92776e4c372a75755cfcf144afd617cd8 /PKGBUILD | |
download | aur-a486672c41d5166cd1ad146269f8f6fc22a3794a.tar.gz |
adopted from aur3
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..195023f23fad --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Jose Riha <jose1711 gmail com> +# Contributor: Giancarlo Bianchi <giancarlobianchi76-[remove this]-@-[and this]-gmail-[and this]-.com> +pkgname=subcli +pkgver=0.4 +pkgrel=2 +pkgdesc="CLI program to modify text based subtitles" +arch=('any') +url="https://code.google.com/p/subcli" +license=('GPL') +depends=('python2') +source=("https://subcli.googlecode.com/files/${pkgname}_v${pkgver}.tar.gz") +md5sums=('2a69e2db27f048abf2e97f957f83fb7d') + +package() { + cd "$srcdir/$pkgname" + install -d "$pkgdir/usr/share/$pkgname/modules" + + msg "Compiling and installing python modules" + cd modules + for i in *.py; do + echo "$i" + sed -i '1i#\!\/usr\/bin\/env\ python2' "$i" + python2 -c "import py_compile; py_compile.compile('$i')" + install -m 0644 "${i/.py/.pyc}" "$pkgdir/usr/share/$pkgname/modules/${i/.py/.pyc}" + done + install -m 0644 default.{ass,ssa} "$pkgdir/usr/share/$pkgname/modules" + + msg "Compiling and installing main binaries" + cd "$srcdir/$pkgname" + python2 -c "import py_compile; py_compile.compile('subcli.py')" + install -m 0755 subcli.pyc "$pkgdir/usr/share/$pkgname/subcli.pyc" + + sed -i 's!/usr/local/share/apps!exec\ python2\ /usr/share!' subcli + install -Dm 0755 subcli "$pkgdir/usr/bin/subcli" +} + +# vim:set ts=2 sw=2 et: |