summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commit90182149c1b59e0bed347638d9316a442cce1638 (patch)
tree73d7b3aa92993625a8199e98b4eed7eba6ad9d45 /PKGBUILD
downloadaur-python2-jsonrpclib-git.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c80b3a8bf70d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+
+pkgname=python2-jsonrpclib-git
+pkgver=20131025
+pkgrel=1
+pkgdesc="Python JSON-RPC over HTTP that mirrors xmlrpclib syntax"
+arch=('any')
+depends=('python2')
+makedepends=('git' 'python2-setuptools')
+url="https://github.com/joshmarshall/jsonrpclib"
+license=('Apache')
+source=(${pkgname%-git}::git+https://github.com/joshmarshall/jsonrpclib)
+sha256sums=('SKIP')
+provides=('python2-jsonrpclib')
+conflicts=('python2-jsonrpclib')
+
+pkgver() {
+ cd ${pkgname%-git}
+ git log -1 --format="%cd" --date=short | sed "s|-||g"
+}
+
+prepare() {
+ cd ${pkgname%-git}
+
+ msg 'Fixing Python version...'
+ find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/python#/usr/bin/python2#g'
+ find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/env python#/usr/bin/env python2#g'
+}
+
+build() {
+ cd ${pkgname%-git}
+
+ msg 'Building...'
+ python2 setup.py build
+}
+
+package() {
+ cd ${pkgname%-git}
+
+ msg 'Installing...'
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}