Similar to https://github.com/Alexpux/MINGW-packages/pull/2878 this adjusts the pkgbase names of all packages to match the directory name the PKGBUILD is in. The motivation for this is to provide links to PKGBUILD sources and git history from the web interface. The "dwz" directory is deleted as it just contains an older copy of the elfutils PKGBUILD (elfutils isn't in the repo)
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=setuptools-scm
|
|
pkgbase="python-${_realname}"
|
|
pkgname=("python3-${_realname}" "python2-${_realname}")
|
|
pkgver=1.15.6
|
|
pkgrel=1
|
|
pkgdesc="Handles managing your python package versions in scm metadata"
|
|
arch=('any')
|
|
license=('MIT')
|
|
url='https://github.com/pypa/setuptools_scm'
|
|
makedepends=('python3-setuptools' 'python2-setuptools')
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz")
|
|
sha256sums=('49ab4685589986a42da85706b3311a2f74f1af567d39fee6cb1e088d7a75fb5f')
|
|
|
|
prepare() {
|
|
cd ${srcdir}
|
|
|
|
for pver in {2,3}; do
|
|
rm -rf python${pver}-build-${CARCH} | true
|
|
cp -r "${_realname/-/_}-${pkgver}" "python${pver}-build-${CARCH}"
|
|
done
|
|
}
|
|
|
|
package_python3-setuptools-scm() {
|
|
depends=('python3')
|
|
|
|
cd "${srcdir}"/python3-build-${CARCH}
|
|
python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
|
|
|
|
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/python3-${_realname}/LICENSE"
|
|
}
|
|
|
|
package_python2-setuptools-scm() {
|
|
depends=('python2')
|
|
|
|
cd "${srcdir}"/python2-build-${CARCH}
|
|
python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
|
|
|
|
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/python2-${_realname}/LICENSE"
|
|
}
|