summaryrefslogtreecommitdiff
path: root/libre/django17/PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-17 14:53:04 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-17 14:53:23 -0400
commit8d39ec617abb4a6d00d14e55abdf883368dee6c5 (patch)
tree6026a65c1d93c2f75a1ca500eb98a16eeb04dcb7 /libre/django17/PKGBUILD
parent5075361afc8a19799e5313510610ad413ff058e0 (diff)
downloadabslibre-8d39ec617abb4a6d00d14e55abdf883368dee6c5.tar.gz
abslibre-8d39ec617abb4a6d00d14e55abdf883368dee6c5.tar.bz2
abslibre-8d39ec617abb4a6d00d14e55abdf883368dee6c5.zip
add libre/django17
Diffstat (limited to 'libre/django17/PKGBUILD')
-rw-r--r--libre/django17/PKGBUILD73
1 files changed, 73 insertions, 0 deletions
diff --git a/libre/django17/PKGBUILD b/libre/django17/PKGBUILD
new file mode 100644
index 000000000..8311f84bb
--- /dev/null
+++ b/libre/django17/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch:django): Dan McGee <dan@archlinux.org>
+# Contributor (Arch:django): Shahar Weiss <sweiss4@gmx.net>
+
+pkgbase=django17
+pkgname=('python-django17' 'python2-django17')
+pkgver=1.7.7
+pkgrel=1
+pkgdesc="A high-level Python Web framework that encourages rapid development and clean design"
+arch=('any')
+license=('BSD')
+url="http://www.djangoproject.com/"
+makedepends=('python2' 'python2-setuptools' 'python' 'python-setuptools')
+source=("https://www.djangoproject.com/m/releases/${pkgver:0:3}/Django-$pkgver.tar.gz")
+md5sums=('a62d6598966947d150525ad2ab20fb0c')
+sha256sums=('4816f892063569ca9a77584fa23cb4995c1b3b954ef875102a8219229cbd2e33')
+
+prepare() {
+ cp -a "$srcdir/Django-$pkgver" "$srcdir/Django-$pkgver-python2"
+
+ find "$srcdir/Django-$pkgver-python2" -name '*.py' | \
+ xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
+}
+
+build() {
+ cd "$srcdir/Django-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/Django-$pkgver-python2"
+ python2 setup.py build
+}
+
+package_python-django17() {
+ depends=('python' 'python-setuptools')
+ optdepends=('python-psycopg2: for PostgreSQL backend')
+ provides=("python-django=$pkgver")
+ conflicts=('python-django')
+ cd "$srcdir/Django-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ ln -s django-admin.py "$pkgdir"/usr/bin/django-admin3.py
+ ln -s django-admin "$pkgdir"/usr/bin/django-admin3
+ 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/django-admin
+ ln -s django-admin.py \
+ "$pkgdir"/usr/share/bash-completion/completions/manage.py
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-django17() {
+ depends=('python2' 'python2-setuptools')
+ optdepends=('mysql-python: for MySQL backend'
+ 'python2-psycopg2: for PostgreSQL backend')
+ replaces=('django')
+ provides=("python2-django=$pkgver")
+ conflicts=('django' 'python2-django')
+ cd "$srcdir/Django-$pkgver-python2"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ mv "$pkgdir"/usr/bin/django-admin.py "$pkgdir"/usr/bin/django-admin2.py
+ mv "$pkgdir"/usr/bin/django-admin "$pkgdir"/usr/bin/django-admin2
+ # TODO: this probably won't work due to the `complete` command within not
+ # knowing about modified our exectuable names
+ install -Dm644 extras/django_bash_completion \
+ "$pkgdir"/usr/share/bash-completion/completions/django-admin2.py
+ ln -s django-admin2.py \
+ "$pkgdir"/usr/share/bash-completion/completions/django-admin2
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}