desktop/django/PKGBUILD

36 lines
1.1 KiB
Bash
Raw Normal View History

2012-08-06 16:22:51 +08:00
pkgname=django
_pkgname=Django
2015-10-11 04:25:43 +08:00
pkgver=1.8.5
2015-05-03 22:36:29 +08:00
_pkgver=1.8
2012-08-06 16:22:51 +08:00
pkgrel=1
pkgdesc="A high-level Python Web framework."
2014-04-01 19:08:37 +08:00
arch=('x86_64')
2012-08-06 16:22:51 +08:00
license=('BSD')
url="http://www.djangoproject.com/"
depends=('python2')
makedepends=('python-distribute')
optdepends=('mysql-python: for MySQL backend'
'python2-psycopg2: for PostgreSQL backend')
2014-04-01 19:08:37 +08:00
source=("https://www.djangoproject.com/m/releases/$_pkgver/$_pkgname-$pkgver.tar.gz")
2015-10-11 04:25:43 +08:00
sha512sums=('91a8788ec6a9f3592615da55948d080719425a2135e241e7b5014c6b9c354daa53c2caeadd9ac3d991730c8ef8fba579a0aa4f3094a1e83b0600811e9a3bd20b')
2012-08-06 16:22:51 +08:00
build() {
cd "$srcdir/$_pkgname-$pkgver"
python2 setup.py build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 extras/django_bash_completion \
"$pkgdir"/usr/share/bash-completion/completions/django-admin.py
ln -s django-admin.py \
"$pkgdir"/usr/share/bash-completion/completions/manage.py
find "$pkgdir"/usr/lib/python2.7/site-packages/django/ -name '*.py' | \
xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}