python-pbr: use alternatives

This commit is contained in:
Alessio Sergi 2016-04-25 02:39:57 +02:00
parent a1ab19f385
commit 48e59f3106

View file

@ -1,7 +1,7 @@
# Template file for 'python-pbr' # Template file for 'python-pbr'
pkgname=python-pbr pkgname=python-pbr
version=1.9.1 version=1.9.1
revision=1 revision=2
noarch=yes noarch=yes
wrksrc="pbr-${version}" wrksrc="pbr-${version}"
build_style=python-module build_style=python-module
@ -15,11 +15,7 @@ homepage="https://pypi.python.org/pypi/pbr"
license="Apache-2.0" license="Apache-2.0"
distfiles="${PYPI_SITE}/p/pbr/pbr-${version}.tar.gz" distfiles="${PYPI_SITE}/p/pbr/pbr-${version}.tar.gz"
checksum=3997406c90894ebf3d1371811c1e099721440a901f946ca6dc4383350403ed51 checksum=3997406c90894ebf3d1371811c1e099721440a901f946ca6dc4383350403ed51
alternatives="pbr:pbr:/usr/bin/pbr2.7"
post_install() {
cp -f ${DESTDIR}/usr/bin/pbr{,3}
replace_interpreter python ${DESTDIR}/usr/bin/pbr
}
python3.4-pbr_package() { python3.4-pbr_package() {
noarch=yes noarch=yes
@ -27,8 +23,9 @@ python3.4-pbr_package() {
pycompile_version="3.4" pycompile_version="3.4"
pycompile_module="pbr" pycompile_module="pbr"
short_desc="${short_desc/Python2/Python3.4}" short_desc="${short_desc/Python2/Python3.4}"
alternatives="pbr:pbr:/usr/bin/pbr3.4"
pkg_install() { pkg_install() {
vmove usr/bin/pbr3 vmove usr/bin/pbr3.4
vmove usr/lib/python3.4 vmove usr/lib/python3.4
} }
} }