summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/arxiv2bib/PKGBUILD17
-rw-r--r--pcr/python-arxiv2bib/PKGBUILD25
2 files changed, 25 insertions, 17 deletions
diff --git a/pcr/arxiv2bib/PKGBUILD b/pcr/arxiv2bib/PKGBUILD
deleted file mode 100644
index 635a33fae..000000000
--- a/pcr/arxiv2bib/PKGBUILD
+++ /dev/null
@@ -1,17 +0,0 @@
-
-pkgname=arxiv2bib
-pkgver=1.0.8
-pkgrel=2
-pkgdesc="Get arXiv.org metadata in BibTeX format"
-arch=('any')
-url="https://pypi.python.org/pypi/$pkgname"
-license=('BSD3')
-makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.python.org/packages/61/7d/3ddaa77d551915ac2ce484ee3d692005da556c9d51a7f492ff6749b3b0bd/$pkgname-$pkgver.tar.gz")
-sha256sums=('137608ed8aa4da6594350152964b9b0f46c6efcb07f8a4dfd50309c968b647a8')
-
-package(){
- depends=(python)
- cd "$srcdir"/$pkgname-$pkgver
- python setup.py install --root="$pkgdir"
-}
diff --git a/pcr/python-arxiv2bib/PKGBUILD b/pcr/python-arxiv2bib/PKGBUILD
new file mode 100644
index 000000000..8fe774588
--- /dev/null
+++ b/pcr/python-arxiv2bib/PKGBUILD
@@ -0,0 +1,25 @@
+# Maintainer: Andreas Grapentin <oaken-source@parabola.nu>
+
+_pkgname=arxiv2bib
+pkgname=(python{,2}-$_pkgname)
+pkgver=1.0.8
+pkgrel=3
+pkgdesc="Get arXiv.org metadata in BibTeX format"
+arch=(any)
+url="https://pypi.python.org/pypi/$pkgname"
+license=('BSD3')
+
+_depends=()
+makedepends=(python{,2}-setuptools)
+source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('137608ed8aa4da6594350152964b9b0f46c6efcb07f8a4dfd50309c968b647a8')
+
+_package() {
+ depends=("$1" "${_depends[@]/#/$1-}")
+ cd "$srcdir"/$_pkgname-$pkgver
+ $1 setup.py install --root="$pkgdir"
+}
+
+for _pkg in "${pkgname[@]}"; do
+ eval "package_$_pkg () { _package ${_pkg%%-*}; }"
+done