diff options
author | Quentin Bourgeois | 2017-01-24 23:52:26 +0100 |
---|---|---|
committer | Kyle Manna | 2017-01-26 22:07:24 -0800 |
commit | 55431f193139c367b5652e814a258ca7aae819a8 (patch) | |
tree | 4d1702903e7184eec712d46792eb8df0537123e8 /PKGBUILD | |
parent | c7fdcfc43ef1cb6b4b6eadc48a3e3b69df0a6f89 (diff) | |
download | aur-55431f193139c367b5652e814a258ca7aae819a8.tar.gz |
PKGBUILD: Fix makedepends
The main goal of this patch is to fix the makedepends that does not
include python{,2}-setuptools (thus won't build on some systems).
It also includes:
* Add of LICENSE file into generated packages
* Unique name for the downloaded archive file
* A check() function that benefit of unittest
* Proposal for switching to braces-enclosed variablesx
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -2,26 +2,37 @@ __pkgname='intelhex' pkgname=('python-intelhex' 'python2-intelhex') pkgver=2.1 -pkgrel=3 +pkgrel=4 pkgdesc="Python IntelHex library" url="https://github.com/bialix/intelhex" optdepends=() license=('BSD') arch=('any') -source=("https://github.com/bialix/${__pkgname}/archive/${pkgver}.tar.gz") +source=("${__pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz") sha512sums=('af5ee3cb7424d15cf259861dcedf6ca68ecfae0819cb9f5c3437a1c8ff8c2f03486dd9f12b93564a5e2f4b7bab4c055a44c6dbe2a86007165412336bd2a4554f') +makedepends=('python-setuptools' + 'python2-setuptools') + +check() { + cd "${srcdir}/${__pkgname}-${pkgver}" + + msg "Running unittests" + python setup.py test -q +} package_python-intelhex() { depends=('python' 'python-setuptools') - cd "$srcdir/$__pkgname-$pkgver" - python setup.py install --root="$pkgdir" --optimize=1 + cd "${srcdir}/${__pkgname}-${pkgver}" + python setup.py install --root="${pkgdir}" --optimize=1 rm -rf ${pkgdir}/usr/lib/python*/site-packages/tests/ + + install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_python2-intelhex() { depends=('python2' 'python2-setuptools') - cd "$srcdir/$__pkgname-$pkgver" - python2 setup.py install --root="$pkgdir" --optimize=1 + cd "${srcdir}/${__pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}" --optimize=1 rm -rf ${pkgdir}/usr/lib/python*/site-packages/tests/ # Only install command line tools with python-intelhex version |