summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD42
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0c894a06e60d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = python2-jsonrpclib-git
+ pkgdesc = Python JSON-RPC over HTTP that mirrors xmlrpclib syntax
+ pkgver = 20131025
+ pkgrel = 1
+ url = https://github.com/joshmarshall/jsonrpclib
+ arch = any
+ license = Apache
+ makedepends = git
+ makedepends = python2-setuptools
+ depends = python2
+ provides = python2-jsonrpclib
+ conflicts = python2-jsonrpclib
+ source = python2-jsonrpclib::git+https://github.com/joshmarshall/jsonrpclib
+ sha256sums = SKIP
+
+pkgname = python2-jsonrpclib-git
+
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
+}