From dd1adac6bbd62a4fcd709d63e8494b11ce3fc34f Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sat, 13 Apr 2013 10:15:10 +0200 Subject: [PATCH] stronger python package version parsing --- TODO.org | 2 +- d/UNUSED/go/go.SlackBuild | 17 ++++++++++++----- l/elpy/elpy.SlackBuild | 2 +- l/jedi/jedi.SlackBuild | 2 ++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/TODO.org b/TODO.org index b669715a..3fa03f0e 100644 --- a/TODO.org +++ b/TODO.org @@ -1,2 +1,2 @@ * update VERSION of python packages with this (see elpy.SlackBuild): -VERSION=$(grep -i "^version:" /usr/lib$(uname -m | grep -o 64)/python*/site-packages/$PRGNAM-*-py*.egg-info | grep -o "[0-9.]*")_$VERSION +VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "jedi-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION diff --git a/d/UNUSED/go/go.SlackBuild b/d/UNUSED/go/go.SlackBuild index 02f02b1c..73b24106 100755 --- a/d/UNUSED/go/go.SlackBuild +++ b/d/UNUSED/go/go.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh -x # variables -VERSION=go1 +VERSION=${VERSION:-$(date +%F | tr - .)} BUILD=1 TAG=cyco @@ -16,6 +16,8 @@ ARCH=$(uname -m) PREFIX=/usr +REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM + # nettoyage préalable rm -fr $PKG $TMP/$PRGNAM-$VERSION @@ -35,11 +37,16 @@ esac # mise en place cd $TMP -[ ! -e $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz ] && wget -c http://$PRGNAM.googlecode.com/files/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz -O $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz +[ ! -e $REPOSITORY ] \ + && hg clone -u release https://code.google.com/p/go $REPOSITORY \ + || (cd $REPOSITORY && hg pull -u) + +mkdir -p $PKG$PREFIX/lib$(echo $ARCH | grep -o "64") +cp -R $REPOSITORY $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/ +rm -fr $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/$PRGNAM/.hg* +cd $PKG$PREFIX/lib$(echo $ARCH | grep -o "64")/$PRGNAM/src +./all.bash -mkdir -p $PKG$PREFIX/ -cd $PKG$PREFIX/ -tar xf $CWD/$PRGNAM.$VERSION.linux-$GOARCH.tar.gz chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ diff --git a/l/elpy/elpy.SlackBuild b/l/elpy/elpy.SlackBuild index d9301ff7..39078868 100755 --- a/l/elpy/elpy.SlackBuild +++ b/l/elpy/elpy.SlackBuild @@ -36,7 +36,7 @@ cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION cd $TMP/$PRGNAM-$VERSION python setup.py install --root $PKG -VERSION=$(grep -i "^version:" /usr/lib$(uname -m | grep -o 64)/python*/site-packages/$PRGNAM-*-py*.egg-info | grep -o "[0-9.]*")_$VERSION +VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION mkdir -p $PKG/install cat < $PKG/install diff --git a/l/jedi/jedi.SlackBuild b/l/jedi/jedi.SlackBuild index 87f79e64..0a7a8fd8 100755 --- a/l/jedi/jedi.SlackBuild +++ b/l/jedi/jedi.SlackBuild @@ -36,6 +36,8 @@ cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION cd $TMP/$PRGNAM-$VERSION python setup.py install --root $PKG +VERSION=$(ls /usr/lib$(uname -m | grep -o 64)/python*/site-packages/| grep "$PRGNAM-.*-py.*\.egg-info" | grep -o "[0-9.]*" | head -n1)_$VERSION + mkdir -p $PKG/install cat < $PKG/install |-----handy-ruler------------------------------------------------------|