reformat python2-requests-git to "new" git format

This commit is contained in:
Cedric Girard 2014-06-23 15:35:14 +02:00
parent 053281fe4b
commit 3de0e75d69
2 changed files with 23 additions and 25 deletions

View file

@ -1,6 +1,6 @@
pkgbase = python2-requests-git pkgbase = python2-requests-git
pkgdesc = Python HTTP for Humans. pkgdesc = Python HTTP for Humans.
pkgver = 20130206 pkgver = v2.3.0.41.gfcb735f
pkgrel = 1 pkgrel = 1
url = http://python-requests.org url = http://python-requests.org
arch = any arch = any
@ -13,7 +13,9 @@ pkgbase = python2-requests-git
optdepends = python2-simplejson optdepends = python2-simplejson
provides = python2-requests provides = python2-requests
conflicts = python2-requests conflicts = python2-requests
source = requests::git+https://github.com/kennethreitz/requests.git
source = certs.patch source = certs.patch
sha256sums = SKIP
sha256sums = 482fc40ba146d2200771a690b3bedf6eddc9c3224d6f7b5ba529124039b07246 sha256sums = 482fc40ba146d2200771a690b3bedf6eddc9c3224d6f7b5ba529124039b07246
pkgname = python2-requests-git pkgname = python2-requests-git

View file

@ -1,7 +1,7 @@
# Maintainer: Cedric Girard <girard.cedric@gmail.com> # Maintainer: Cedric Girard <girard.cedric@gmail.com>
pkgname=python2-requests-git pkgname=python2-requests-git
pkgver=20130206 pkgver=v2.3.0.41.gfcb735f
pkgrel=1 pkgrel=1
_libname=${pkgname/python2-/} _libname=${pkgname/python2-/}
pkgdesc="Python HTTP for Humans." pkgdesc="Python HTTP for Humans."
@ -16,44 +16,40 @@ provides=('python2-requests')
license=('custom: ISC') license=('custom: ISC')
arch=('any') arch=('any')
source=(certs.patch) source=('requests::git+https://github.com/kennethreitz/requests.git'
sha256sums=('482fc40ba146d2200771a690b3bedf6eddc9c3224d6f7b5ba529124039b07246') certs.patch
)
sha256sums=('SKIP'
'482fc40ba146d2200771a690b3bedf6eddc9c3224d6f7b5ba529124039b07246'
)
_gitroot=https://github.com/kennethreitz/requests.git pkgver() {
_gitname=requests cd "$srcdir"/requests
git describe --tags | sed 's|-|.|g'
}
build() { prepare() {
cd "$srcdir" cd "$srcdir"/requests
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"
patch -p0 -i "$srcdir/certs.patch" patch -p0 -i "$srcdir/certs.patch"
find -type f -exec sed -i '1 s|python$|python2|' {} + find -type f -exec sed -i '1 s|python$|python2|' {} +
sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
rm -f requests/cacert.pem rm -f requests/cacert.pem
}
build(){
cd "$srcdir"/requests
python2 setup.py build python2 setup.py build
} }
check() { check() {
cd "$srcdir/$_gitname-build" cd "$srcdir"/requests
test -f "$(python2 -m requests.certs)" test -f "$(python2 -m requests.certs)"
} }
package() { package() {
cd "$srcdir/$_gitname-build" cd "$srcdir"/requests
python2 setup.py install --root="$pkgdir" python2 setup.py install --root="$pkgdir"
install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
} }