diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9779a16b8866 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = python2-oauth2-git + pkgdesc = A fully tested, abstract interface to creating OAuth clients and servers. + pkgver = 20120313 + pkgrel = 1 + url = https://github.com/simplegeo/python-oauth2 + arch = i686 + arch = x86_64 + license = MIT + makedepends = git + depends = python2 + provides = python2-oauth2 + conflicts = python-oauth2 + replaces = python-oauth2 + +pkgname = python2-oauth2-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4501f02b8738 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: Bruno Galeotti <bravox87 at gmail.com> +pkgname='python2-oauth2-git' +pkgver=20120313 +pkgrel=1 +pkgdesc='A fully tested, abstract interface to creating OAuth clients and servers.' +url='https://github.com/simplegeo/python-oauth2' +license='MIT' +arch=('i686' 'x86_64') +depends=('python2') +makedepends=('git') +conflicts=('python-oauth2') +replaces=('python-oauth2') +provides=('python2-oauth2') +_gitroot='https://github.com/simplegeo/python-oauth2.git' +_gitname='python-oauth2' +source=() +md5sums=() + +build() { + cd ${srcdir} + + msg 'Connecting to GIT server....' + + if [ -d '${srcdir}/${_gitname}' ] ; then + cd ${_gitname} && git pull --rebase + else + git clone ${_gitroot} + fi + + msg 'GIT checkout done or server timeout' + + if [ -d $_gitname-build ]; then + msg 'Removing old build directory' + rm -rf $_gitname-build + fi + + msg 'Copying repository to another build directory' + cp -r $srcdir/$_gitname $srcdir/$_gitname-build + + msg 'Starting build' + cd $srcdir/$_gitname-build + + msg 'Running setup.py' + python2 setup.py build || return 1 + python2 setup.py install --root=$pkgdir || return 1 +} |