diff options
author | Mario Preksavec <mario@slackware.hr> | 2016-07-24 19:18:50 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-07-30 08:28:21 +0700 |
commit | 7b3a2e146475aea46b550d4604bc95e7eb60020e (patch) | |
tree | 3f3af525fdb3c7b0ca4e0f08bc7e6e56ab3dfa6d /system/graphite-web/graphite-web.SlackBuild | |
parent | 1b52fb554491e387778920497ff55ed2b81af2be (diff) |
system/graphite-web: Updated for version 0.9.15.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
Diffstat (limited to 'system/graphite-web/graphite-web.SlackBuild')
-rw-r--r-- | system/graphite-web/graphite-web.SlackBuild | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/system/graphite-web/graphite-web.SlackBuild b/system/graphite-web/graphite-web.SlackBuild index 640e18d5d482b..37a3c759e24fa 100644 --- a/system/graphite-web/graphite-web.SlackBuild +++ b/system/graphite-web/graphite-web.SlackBuild @@ -23,26 +23,39 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=graphite-web -VERSION=${VERSION:-0.9.13pre1} +VERSION=${VERSION:-0.9.15} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCVER=0.9.13-pre1 -ARCH=noarch +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + +PYTHON_BRANCH=$(python -V 2>&1 | cut -d" " -f2 | cut -d. -f1,2) + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$SRCVER -tar xvf $CWD/$v$SRCVER.tar.gz || tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz -cd $PRGNAM-$SRCVER +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -61,20 +74,19 @@ patch -p1 <$CWD/patches/local_settings.patch patch -p1 <$CWD/patches/settings_debian.patch patch -p1 <$CWD/patches/remove_internal_logrotate.patch -python setup.py install --root=$PKG +# Installer script needs some fixing +patch -p1 <$CWD/patches/setup.py.diff + +python setup.py install --root=$PKG --prefix=/usr # Need some dirs -mkdir -p $PKG/etc/{httpd/extra,logrotate.d} $PKG/usr/share/$PRGNAM \ +mkdir -p $PKG/etc/{httpd/extra,logrotate.d} $PKG/usr/{bin,share/$PRGNAM} \ $PKG/var/log/graphite chown graphite:graphite $PKG/var/log/graphite # Add apache config cat $CWD/$PRGNAM.conf > $PKG/etc/httpd/extra/$PRGNAM.conf.new -# Cruft removal -rm -rf $PKG/usr/{storage,examples} $PKG/usr/bin/* -find $PKG/usr -name 'local_settings.py.example' -delete - # Scripts and crontab mostly from Debian install -m0755 -oroot -groot -t $PKG/usr/bin $CWD/scripts/graphite-manage \ $CWD/scripts/graphite-build-search-index @@ -94,6 +106,14 @@ cat webapp/graphite/local_settings.py.example \ # Move webapp dir mv $PKG/usr/webapp $PKG/usr/share/$PRGNAM/static +# Python stuff +mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/python$PYTHON_BRANCH +mv $PKG/opt/graphite/webapp \ + $PKG/usr/lib$LIBDIRSUFFIX/python$PYTHON_BRANCH/site-packages + +# Cruft removal +rm -rf $PKG/opt + # Manpages also from Debian mkdir -p $PKG/usr/man/man1 cp $CWD/man1/*.1 $PKG/usr/man/man1 |