Skip to content

Instantly share code, notes, and snippets.

@NicoHood
Created Sep 18, 2017
Embed
What would you like to do?
python-vincenty
# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
# Contributor: Dean Galvin <deangalvin3@gmail.com>
_pkgname=vincenty
pkgbase=python-vincenty
pkgname=('python-vincenty' 'python2-vincenty')
pkgdesc="Calculate the geographical distance between 2 points with extreme accuracy."
pkgver=0.1.4
pkgrel=1
url="https://github.com/maurycyp/vincenty"
license=('custom: Unlicense')
arch=("any")
makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/maurycyp/${_pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('d1c791c4b8e5a7f45fc9671a8e95b6aaa7eb05c1e5780fcceac48306ec302d1c6353e52fb88ea528104127255bae9fdcb061931da9e524b8723e3a8f1a863a68')
#validpgpkeys=('') # TODO https://github.com/maurycyp/vincenty/issues/3
prepare() {
# Create a copy for the python2 package
cp -r "${_pkgname}-${pkgver}" "python2-${_pkgname}-${pkgver}"
}
package_python-vincenty() {
depends=('python')
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py install --root="${pkgdir}" --optimize=1
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
package_python2-vincenty() {
depends=('python2')
cd "${srcdir}/python2-${_pkgname}-${pkgver}"
python2 setup.py install --root="${pkgdir}" --optimize=1
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment