python-Django: use alternatives

This commit is contained in:
Alessio Sergi 2016-05-01 01:17:17 +02:00
parent 4740256807
commit e76318ddea
1 changed files with 7 additions and 9 deletions

View File

@ -1,38 +1,36 @@
# Template file for 'python-Django' # Template file for 'python-Django'
pkgname=python-Django pkgname=python-Django
version=1.8.12 version=1.8.12
revision=1 revision=2
noarch=yes noarch=yes
wrksrc="Django-${version}" wrksrc="Django-${version}"
build_style=python-module build_style=python-module
python_versions="2.7 3.4" python_versions="2.7 3.4"
pycompile_module="django" pycompile_module="django"
hostmakedepends="python-setuptools python3.4-setuptools" hostmakedepends="python-setuptools python3.4-setuptools"
depends="python" depends="python-setuptools"
short_desc="High-level Python2 Web framework" short_desc="High-level Python2 Web framework"
maintainer="Eivind Uggedal <eivind@uggedal.com>" maintainer="Eivind Uggedal <eivind@uggedal.com>"
license="3-clause-BSD" license="3-clause-BSD"
homepage="http://www.djangoproject.com/" homepage="http://www.djangoproject.com/"
distfiles="${PYPI_SITE}/D/Django/Django-${version}.tar.gz" distfiles="${PYPI_SITE}/D/Django/Django-${version}.tar.gz"
checksum=b68fa73d537f8362d73fec1aa2b7a1e8572349b12942ac756ec1041b6b0e7113 checksum=b68fa73d537f8362d73fec1aa2b7a1e8572349b12942ac756ec1041b6b0e7113
alternatives="django:django-admin:/usr/bin/django-admin2.7"
post_install() { post_install() {
vlicense LICENSE vlicense LICENSE
rm -f ${DESTDIR}/usr/bin/django-admin* rm -f ${DESTDIR}/usr/bin/django-admin.py*
vbin build-2.7/scripts-2.7/django-admin.py
ln -s django-admin.py ${DESTDIR}/usr/bin/django-admin
vbin build-3.4/scripts-3.4/django-admin.py django-admin3.py
ln -s django-admin3.py ${DESTDIR}/usr/bin/django-admin3
} }
python3.4-Django_package() { python3.4-Django_package() {
noarch=yes noarch=yes
depends="python3.4"
pycompile_version="3.4" pycompile_version="3.4"
pycompile_module="django" pycompile_module="django"
depends="python3.4-setuptools"
short_desc="${short_desc/Python2/Python3.4}" short_desc="${short_desc/Python2/Python3.4}"
alternatives="django:django-admin:/usr/bin/django-admin3.4"
pkg_install() { pkg_install() {
vmove usr/bin/django-admin3* vmove usr/bin/*3.4
vmove usr/lib/python3.4 vmove usr/lib/python3.4
vlicense LICENSE vlicense LICENSE
} }