summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcell Meszaros2022-06-18 21:08:23 +0200
committerMarcell Meszaros2022-06-18 21:39:18 +0200
commitb1f87b9f23f68f6bb6266b5aeabfb4d77148507a (patch)
tree492d7e3fe5c132893e558182a579c942c2d46596
parenta613700c3a89b7f350d83da493ac63855c06cf24 (diff)
downloadaur-b1f87b9f23f68f6bb6266b5aeabfb4d77148507a.tar.gz
0.5.4-2: remove wrong provides; fix hashbangs and bin names; run tests, add license
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD24
3 files changed, 32 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 714f77dff2e5..2609ae19f771 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,13 @@
pkgbase = python2-pystache
pkgdesc = The mustache template engine written in python
pkgver = 0.5.4
- pkgrel = 1
+ pkgrel = 2
url = http://github.com/defunkt/pystache
arch = any
license = MIT
- depends = python2
- depends = python2-setuptools
- provides = python-pystache
- conflicts = python-pystache
+ makedepends = python2-setuptools
+ depends = python2>=2.7
source = https://pypi.python.org/packages/source/p/pystache/pystache-0.5.4.tar.gz
md5sums = 485885e67a0f6411d5252e69b20a35ca
pkgname = python2-pystache
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e498c77e1047
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!*.diff
+!*.hook
+!*.install
+!*.patch
+!*.txt
diff --git a/PKGBUILD b/PKGBUILD
index 62f55c0830da..f5f7f91636bc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,37 @@
+# Contributor: Marcell Meszaros < marcell.meszaros AT runbox.eu >
# Contributor: Florian Klink <flokli at flokli dot de>
_python=python2
_distname=pystache
pkgname=$_python-$_distname
pkgver=0.5.4
-pkgrel=1
+pkgrel=2
pkgdesc="The mustache template engine written in python"
arch=(any)
url="http://github.com/defunkt/pystache"
license=('MIT')
-depends=('python2' 'python2-setuptools')
-provides=('python-pystache')
-conflicts=('python-pystache')
+depends=('python2>=2.7')
+makedepends=('python2-setuptools')
source=( "https://pypi.python.org/packages/source/${_distname:0:1}/$_distname/$_distname-$pkgver.tar.gz")
md5sums=('485885e67a0f6411d5252e69b20a35ca')
+prepare() {
+ echo 'Changing hashbangs in *.py files to refer to python2'
+ sed -e 's|#![ ]*/usr/bin/python[^2]\?|#!/usr/bin/python2|' \
+ -e 's|#![ ]*/usr/bin/env python[^2]\?|#!/usr/bin/env python2|' \
+ -e 's|#![ ]*/bin/env python[^2]\?|#!/usr/bin/env python2|' \
+ -i $(find . -name '*.py')
+}
+
+check() {
+ cd "$srcdir/$_distname-$pkgver"
+ LC_ALL='C.UTF-8' python2 test_pystache.py
+}
+
package() {
cd "$srcdir/$_distname-$pkgver"
$_python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 || exit 1
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ mv -v "${pkgdir}/usr/bin/pystache"{,2}
+ mv -v "${pkgdir}/usr/bin/pystache"{,2}-test
}