summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/python-uritools-git/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/pcr/python-uritools-git/PKGBUILD b/pcr/python-uritools-git/PKGBUILD
new file mode 100644
index 000000000..fba15a278
--- /dev/null
+++ b/pcr/python-uritools-git/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer (Arch): Frederik "Freso" S. Olesen <freso.dk@gmail.com>
+
+_pkgname=uritools
+pkgname=("python-${_pkgname}-git" "python2-${_pkgname}-git")
+pkgver=2.0.0.r3.gc871941
+pkgrel=1
+pkgdesc='RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse'
+arch=('any')
+url="https://github.com/tkem/${_pkgname}"
+license=('MIT')
+depends=('python')
+makedepends=('git' 'python-pip' 'python2-pip')
+provides=("python-${_pkgname}")
+conflicts=("$provides")
+source=("git+${url}.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+check() {
+ cd "$srcdir/$_pkgname"
+ python setup.py test
+}
+
+package_python-uritools-git() {
+ cd "$srcdir/$_pkgname"
+ python setup.py install --root="$pkgdir/" --optimize=1
+ install -d "$pkgdir/usr/share/doc/python-${_pkgname}/"
+ install -pm644 CHANGES.rst README.rst "$pkgdir/usr/share/doc/python-${_pkgname}/"
+ install -Dpm644 LICENSE "$pkgdir/usr/share/licenses/python-${_pkgname}/LICENSE"
+}
+
+package_python2-uritools-git() {
+ depends=('python2' 'python2-ipaddress')
+ provides=("python2-${_pkgname}")
+ conflicts=("$provides")
+
+ cd "$srcdir/$_pkgname"
+ python2 setup.py install --root="$pkgdir/" --optimize=1
+ install -d "$pkgdir/usr/share/doc/python2-${_pkgname}/"
+ install -pm644 CHANGES.rst README.rst "$pkgdir/usr/share/doc/python2-${_pkgname}/"
+ install -Dpm644 LICENSE "$pkgdir/usr/share/licenses/python2-${_pkgname}/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et: