python-Pillow: use alternatives

This commit is contained in:
Alessio Sergi 2016-04-25 03:03:53 +02:00
parent 9a8cad8835
commit 0125090a0a

View file

@ -1,7 +1,7 @@
# Template file for 'python-Pillow'
pkgname=python-Pillow
version=3.2.0
revision=1
revision=2
wrksrc="Pillow-${version}"
build_style=python-module
python_versions="2.7 3.4"
@ -17,17 +17,40 @@ license="PIL"
distfiles="${PYPI_SITE}/P/Pillow/Pillow-${version}.tar.gz"
checksum=64b0a057210c480aea99406c9391180cd866fc0fd8f0b53367e3af21b195784a
alternatives="
pil:createfontdatachunk:/usr/bin/createfontdatachunk.py2.7
pil:enhancer:/usr/bin/enhancer.py2.7
pil:explode:/usr/bin/explode.py2.7
pil:gifmaker:/usr/bin/gifmaker.py2.7
pil:painter:/usr/bin/painter.py2.7
pil:pilconvert:/usr/bin/pilconvert.py2.7
pil:pildriver:/usr/bin/pildriver.py2.7
pil:pilfile:/usr/bin/pilfile.py2.7
pil:pilfont:/usr/bin/pilfont.py2.7
pil:pilprint:/usr/bin/pilprint.py2.7
pil:player:/usr/bin/player.py2.7
pil:thresholder:/usr/bin/thresholder.py2.7
pil:viewer:/usr/bin/viewer.py2.7"
post_install() {
rm -f ${DESTDIR}/usr/bin/*.py
# rename bins and remove .py suffix
for f in convert driver file font print; do
vbin build-2.7/scripts-2.7/pil${f}{.py,}
vbin build-3.4/scripts-3.4/pil${f}{.py,3.4}
done
vlicense LICENSE
}
python3.4-Pillow_package() {
alternatives="
pil:createfontdatachunk:/usr/bin/createfontdatachunk.py3.4
pil:enhancer:/usr/bin/enhancer.py3.4
pil:explode:/usr/bin/explode.py3.4
pil:gifmaker:/usr/bin/gifmaker.py3.4
pil:painter:/usr/bin/painter.py3.4
pil:pilconvert:/usr/bin/pilconvert.py3.4
pil:pildriver:/usr/bin/pildriver.py3.4
pil:pilfile:/usr/bin/pilfile.py3.4
pil:pilfont:/usr/bin/pilfont.py3.4
pil:pilprint:/usr/bin/pilprint.py3.4
pil:player:/usr/bin/player.py3.4
pil:thresholder:/usr/bin/thresholder.py3.4
pil:viewer:/usr/bin/viewer.py3.4"
pycompile_version="3.4"
pycompile_module="PIL"
short_desc="${short_desc/Python2/Python3.4}"