[arch-commits] Commit in django/repos (staging-any staging-any/PKGBUILD)

Felix Yan fyan at archlinux.org
Sat Sep 19 14:41:53 UTC 2015


    Date: Saturday, September 19, 2015 @ 16:41:53
  Author: fyan
Revision: 246632

archrelease: copy trunk to staging-any

Added:
  django/repos/staging-any/
  django/repos/staging-any/PKGBUILD
    (from rev 246631, django/trunk/PKGBUILD)

----------+
 PKGBUILD |   70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

Copied: django/repos/staging-any/PKGBUILD (from rev 246631, django/trunk/PKGBUILD)
===================================================================
--- staging-any/PKGBUILD	                        (rev 0)
+++ staging-any/PKGBUILD	2015-09-19 14:41:53 UTC (rev 246632)
@@ -0,0 +1,70 @@
+# $Id$
+# Maintainer: Dan McGee <dan at archlinux.org>
+# Contributor: Shahar Weiss <sweiss4 at gmx.net>
+
+pkgbase=django
+pkgname=('python-django' 'python2-django')
+pkgver=1.8.4
+pkgrel=2
+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=('8eb569a5b9d984d9f3366fda67fb0bb8')
+sha256sums=('826996c81e1cc773500124d5c19212e4a7681a55ee169fab9085f2b3015a70d8')
+
+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-django() {
+  depends=('python' 'python-setuptools')
+  optdepends=('python-psycopg2: for PostgreSQL backend')
+  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-django() {
+  depends=('python2' 'python2-setuptools')
+  optdepends=('mysql-python: for MySQL backend'
+              'python2-psycopg2: for PostgreSQL backend')
+  replaces=('django')
+  conflicts=('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
+}



More information about the arch-commits mailing list