Commits

Josh VanderLinden committed 25d5d4e

Initial PKGBUILD

Comments (0)

Files changed (1)

+# Maintainer: Josh VanderLinden <arch@cloudlery.com>
+pkgname=django-south
+pkgver=1145
+pkgrel=1
+pkgdesc="A Django application to provide schema and data migrations"
+arch=('any')
+url="https://bitbucket.org/andrewgodwin/south/"
+license=('Apache')
+depends=()
+makedepends=('mercurial')
+md5sums=()
+
+_hgroot=https://bitbucket.org/codekoala/south/
+_hgrepo=south
+
+build() {
+  cd "$srcdir"
+  msg "Connecting to Mercurial server...."
+
+  if [[ -d "$_hgrepo" ]]; then
+    cd "$_hgrepo"
+    hg pull -u
+    msg "The local files are updated."
+  else
+    hg clone "$_hgroot" "$_hgrepo"
+  fi
+
+  msg "Mercurial checkout done or server timeout"
+  msg "Starting build..."
+
+  rm -rf "$srcdir/$_hgrepo-build"
+  cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
+  cd "$srcdir/$_hgrepo-build"
+}
+
+package() {
+  cd "$srcdir/$_hgrepo-build"
+  2to3 -w south
+  python3 setup.py install --root="${pkgdir}/" --optimize=1
+}
+
+# vim:set ts=2 sw=2 et: