summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorclintval2018-01-21 18:24:58 -0800
committerclintval2018-01-21 18:24:58 -0800
commit3afe1ff0a0bf75b1d7a4252cd180ef3d9f82fd87 (patch)
treee3a6b9ba563e3bdcb3377ff7689d735137d4945e /PKGBUILD
parent92eb7d531436fcf609a86ad8443ee56e8d4bb508 (diff)
downloadaur-python-pyvcf-git.tar.gz
python-pyvcf-git to split package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD63
1 files changed, 48 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d61b6a85f003..b05ee0596f90 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,59 @@
# Maintainer: Clint Valentine <valentine.clint@gmail.com>
-pkgname='python-pyvcf-git'
+_name=PyVCF
+pkgbase='python-pyvcf-git'
+pkgname=('python-pyvcf-git' 'python2-pyvcf-git')
pkgver=v0.5.0.r266.g476169c
-pkgrel=1
-pkgdesc="A Variant Call Format reader for Python."
+pkgrel=2
+pkgdesc="A Variant Call Format reader for Python"
arch=('any')
-url="https://github.com/jamescasbon/PyVCF"
-license=('BSD')
-depends=('python')
-makedepends=('cython' 'python-setuptools')
-provides=('python-pyvcf')
-conflicts=('python-pyvcf')
+url=https://pypi.python.org/pypi/"${_name}"
+license=('custom:population-genetics-technologies')
+makedepends=(
+ 'python' 'python-setuptools' 'cython'
+ 'python2' 'python2-setuptools' 'cython2')
options=(!emptydirs)
-source=("git+https://github.com/jamescasbon/PyVCF.git")
-md5sums=('SKIP')
+source=("${_name}"-"${pkgver}"::git+https://github.com/jamescasbon/"${_name}".git)
+sha256sums=('SKIP')
pkgver() {
- cd "PyVCF"
+ cd "${srcdir}"/"${_name}"-"${pkgver}"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
-package() {
- cd "${srcdir}/PyVCF"
- python setup.py install --root="${pkgdir}/" --optimize=1
+prepare() {
+ cp -a "${_name}"-"${pkgver}"{,-py2}
+}
+
+build(){
+ cd "${srcdir}"/"${_name}"-"${pkgver}"
+ python setup.py build
+
+ cd "${srcdir}"/"${_name}"-"${pkgver}"-py2
+ python2 setup.py build
+}
+
+package_python2-pyvcf-git() {
+ depends=('python2')
+ provides=('python2-pyvcf')
+ conflicts=('python2-pyvcf')
+
+ cd "${_name}"-"${pkgver}"-py2
+ python2 setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+
+ mv "${pkgdir}"/usr/bin/vcf_melt "${pkgdir}"/usr/bin/vcf_melt2
+ for script in "${pkgdir}"/usr/bin/*.py; do
+ mv "${script}" "${pkgdir}"/usr/bin/$(basename "${script%.py}2.py")
+ done
+}
+
+package_python-pyvcf-git() {
+ depends=('python')
+ provides=('python-pyvcf')
+ conflicts=('python-pyvcf')
+
+ cd "${_name}"-"${pkgver}"
+ python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
}