reformat python2-requests-git to "new" git format
This commit is contained in:
parent
0be926c7dd
commit
a5822a68b8
1 changed files with 20 additions and 24 deletions
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue