summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoryardenac2013-06-02 23:34:37 -0700
committeryardenac2013-06-02 23:34:37 -0700
commit548c9b4f047721a059f840cdcfa114d7bab4de0b (patch)
treed550e4dbf28465f47baccaaf007de8da405eccd4
parent93630233facbb2fd22384f1b331f98336ba9c583 (diff)
downloadaur-548c9b4f047721a059f840cdcfa114d7bab4de0b.tar.gz
django-storages: convert to VCS PKGBUILD
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD24
2 files changed, 15 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index de72e8e849f5..307340912edc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = django-storages-hg
pkgdesc = Collection of custom storage backends for Django
- pkgver = 280
+ pkgver = 1.1.8.r296
pkgrel = 1
url = http://code.larlet.fr/django-storages/
arch = any
@@ -8,6 +8,8 @@ pkgbase = django-storages-hg
makedepends = mercurial
depends = python2-django
depends = python2-boto
+ source = hg+https://bitbucket.org/david/django-storages
+ md5sums = SKIP
pkgname = django-storages-hg
diff --git a/PKGBUILD b/PKGBUILD
index 62ac476f7e1a..cae350708f24 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,6 @@
pkgname=django-storages-hg
-pkgver=280
+_pkgname=django-storages
+pkgver=1.1.8.r296
pkgrel=1
pkgdesc="Collection of custom storage backends for Django"
arch=('any')
@@ -7,23 +8,22 @@ url="http://code.larlet.fr/django-storages/"
license=('BSD3')
depends=('python2-django' 'python2-boto')
makedepends=('mercurial')
+source=('hg+https://bitbucket.org/david/django-storages')
+md5sums=('SKIP')
-_hgroot="https://bitbucket.org/david/django-storages"
-_hgrepo="django-storages"
-_hgbranch="default"
+pkgver() {
+ cd ${srcdir}/${_pkgname}
+ _revno="$(hg identify -n)"
+ _mainver="$(hg log -r "$_revno" --template '{latesttag}' | sed -E 's/v//;s/-/./g')"
+ echo "${_mainver}.r${_revno}"
+}
build() {
- hg --cwd ${_hgrepo} update -C || \
- hg clone -b ${_hgbranch} "${_hgroot}/${_hgrepo}" ${_hgrepo}
- cd ${_hgrepo}
- if (( $(hg id -n) < $(hg id -nr ${_hgbranch}) )); then
- printf 'You are not building the latest revision!\n'
- printf "Consider updating _hgrev to $(hg id -r ${_hgbranch}).\n"
- fi
+ cd ${srcdir}/${_pkgname}
python2 setup.py build
}
package() {
- cd ${_hgrepo}
+ cd ${srcdir}/${_pkgname}
python2 setup.py install --root="$pkgdir" --optimize=1
}