summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8c4bc265f40ecae212b23fbedec26fd2a297b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Chris Warrick <aur@chriswarrick.com>
pkgbase=python-pyroma
pkgname=('python-pyroma' 'python2-pyroma')
_pyname=pyroma
pkgver=3.1
pkgrel=1
pkgdesc="Test your project's packaging friendliness"
arch=('any')
url='https://bitbucket.org/regebro/pyroma'
license=('MIT')
makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools'
             'python-docutils' 'python2-docutils')
options=(!emptydirs)
source=("https://pypi.io/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('45ad8201da9a813b5597bb85c80bbece93af9ec89170fc2be5ad85fa9463cef1')

prepare() {
  cd "${srcdir}/${_pyname}-${pkgver}"
  cp -r "${srcdir}/${_pyname}-${pkgver}" "${srcdir}/${_pyname}-${pkgver}-py2"
}

package_python-pyroma() {
  depends=('python' 'python-setuptools' 'python-docutils')
  cd "${srcdir}/${_pyname}-${pkgver}"
  python3 setup.py install --root="${pkgdir}/" --optimize=1
  install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE"
  ln -s ${_pyname} "${pkgdir}/usr/bin/${_pyname}3"
}

package_python2-pyroma() {
  depends=('python2' 'python2-setuptools' 'python2-docutils')
  cd "${srcdir}/${_pyname}-${pkgver}-py2"
  python2 setup.py install --root="${pkgdir}/" --optimize=1
  mv "${pkgdir}/usr/bin/${_pyname}" "${pkgdir}/usr/bin/${_pyname}2"
}

# vim:set ts=2 sw=2 et: