summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dewender2013-03-12 12:01:28 +0100
committerJohannes Dewender2013-03-12 12:01:28 +0100
commit1c80e4549bfa613b8e547cd54a03ee1d02c35793 (patch)
tree5c4f798a0c38dc8b2d5a083b65b43ea1b5970624
parent0fefcaef8f73b046571dfa0679a56d429d4f8390 (diff)
downloadaur-1c80e4549bfa613b8e547cd54a03ee1d02c35793.tar.gz
python2-musicbrainz-git: make it a git version
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD57
2 files changed, 51 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 969bf62ffbd..321ba6b109b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,15 @@
-pkgbase = python2-musicbrainzngs
+pkgbase = python2-musicbrainzngs-git
pkgdesc = bindings for the MusicBrainz NGS service
- pkgver = 0.3
+ pkgver = 20130312
pkgrel = 1
url = https://github.com/alastair/python-musicbrainz-ngs
arch = any
license = BSD
makedepends = python2-distribute
+ makedepends = git
depends = python2
- source = http://pypi.python.org/packages/source/m/musicbrainzngs/musicbrainzngs-0.3.tar.gz
- md5sums = 2969c2c6e5c2bb244d7847c3f48d66dc
+ provides = python2-musicbrainzngs=0.3
+ conflicts = python2-musicbrainzngs
-pkgname = python2-musicbrainzngs
+pkgname = python2-musicbrainzngs-git
diff --git a/PKGBUILD b/PKGBUILD
index 5ae4996eb62..3b1a70361ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,55 @@
-# Maintainer: Adrian Sampson <adrian@radbox.org>
+# Contributor: Johannes Dewemdern arch at JonnyJD dot net
+# Contributor: Adrian Sampson <adrian@radbox.org>
-python=python2
-name=musicbrainzngs
+_python=python2
+_name=musicbrainzngs
-pkgname=$python-$name
-pkgver=0.3
+pkgname=$_python-$_name-git
+pkgver=20130312
pkgrel=1
pkgdesc="bindings for the MusicBrainz NGS service"
-depends=('python2')
-makedepends=('python2-distribute')
+depends=("$_python")
+makedepends=("$_python-distribute" 'git')
+provides=("$_python-musicbrainzngs=0.3")
+conflicts=("$_python-musicbrainzngs")
arch=('any')
-source=(http://pypi.python.org/packages/source/m/$name/$name-$pkgver.tar.gz)
-md5sums=(2969c2c6e5c2bb244d7847c3f48d66dc)
+source=()
+md5sums=()
url="https://github.com/alastair/python-musicbrainz-ngs"
license="BSD"
+_gitroot=https://github.com/alastair/python-musicbrainz-ngs.git
+_gitname=python-musicbrainz-ngs
+
build() {
- cd $srcdir/$name-$pkgver
- $python setup.py build || return 1
- $python setup.py install --root=$pkgdir
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [[ -d "$_gitname" ]]; then
+ cd "$_gitname" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "$_gitroot" "$_gitname"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ $_python setup.py build || return 1
}
+
+check() {
+ cd "$srcdir/$_gitname-build"
+ $_python setup.py test
+}
+
+package() {
+ cd "$srcdir/$_gitname-build"
+ $_python setup.py install --root=$pkgdir
+}
+
+# vim:set ts=2 sw=2 et: