summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Teibes2014-09-04 03:26:47 +0200
committerCarsten Teibes2014-09-04 03:26:47 +0200
commit50d47f5a32e27fc4ee07fb27f3a1e1ec32cb9c18 (patch)
treeeed559f642f6229e8b174fe853749515e4be4ea5
downloadaur-50d47f5a32e27fc4ee07fb27f3a1e1ec32cb9c18.tar.gz
[add] python-xmlformatter 0.1.1
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD46
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b2d57496d7d1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = python-xmlformatter
+ pkgdesc = Provides formatting of XML documents
+ pkgver = 0.1.1
+ pkgrel = 1
+ url = http://pamoller.com/xmlformatter.html
+ arch = any
+ license = custom: MIT
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ source = https://pypi.python.org/packages/source/x/xmlformatter/xmlformatter-0.1.1.tar.gz
+ sha256sums = 1897b8c7868860d4b02c450d2f208391cb6f18bf60102ab0d89703b3088280e2
+
+pkgname = python-xmlformatter
+ pkgdesc = Provides formatting of XML documents (python3 version)
+ depends = python
+
+pkgname = python2-xmlformatter
+ pkgdesc = Provides formatting of XML documents (python2 version)
+ depends = python2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aa38d3d2f2a2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG
+
+pkgbase=python-xmlformatter
+pkgname=(python-xmlformatter python2-xmlformatter)
+pkgver=0.1.1
+pkgrel=1
+pkgdesc="Provides formatting of XML documents"
+arch=('any')
+url="http://pamoller.com/xmlformatter.html"
+license=('custom: MIT')
+makedepends=('python-setuptools'
+ 'python2-setuptools')
+source=("https://pypi.python.org/packages/source/x/xmlformatter/xmlformatter-$pkgver.tar.gz")
+sha256sums=('1897b8c7868860d4b02c450d2f208391cb6f18bf60102ab0d89703b3088280e2')
+
+prepare() {
+ # copy folder, so we can cleanly build for both python versions
+ cp -rup xmlformatter-$pkgver xmlformatter-$pkgver-py2
+}
+
+# package for python 3
+package_python-xmlformatter() {
+ depends=('python')
+ pkgdesc+=" (python3 version)"
+
+ cd xmlformatter-$pkgver
+
+ python setup.py install --root="$pkgdir/" --optimize=1
+ install -Dm644 README.rst "$pkgdir"/usr/share/doc/$pkgname/README.rst
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}
+
+# package for python 2
+package_python2-xmlformatter() {
+ depends=('python2')
+ pkgdesc+=" (python2 version)"
+
+ cd xmlformatter-$pkgver-py2
+
+ python2 setup.py install --root="$pkgdir/" --optimize=1
+ install -Dm644 README.rst "$pkgdir"/usr/share/doc/$pkgname/README.rst
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+
+ # non-conflicting executable name
+ mv "$pkgdir"/usr/bin/xmlformat "$pkgdir"/usr/bin/xmlformat-py2
+}