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 | |
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')
-rw-r--r-- | system/graphite-web/graphite-web.SlackBuild | 44 | ||||
-rw-r--r-- | system/graphite-web/graphite-web.info | 6 | ||||
-rw-r--r-- | system/graphite-web/patches/graphite.wsgi.example.diff | 15 | ||||
-rw-r--r-- | system/graphite-web/patches/setup.cfg.diff | 10 | ||||
-rw-r--r-- | system/graphite-web/patches/setup.py.diff | 27 |
5 files changed, 60 insertions, 42 deletions
diff --git a/system/graphite-web/graphite-web.SlackBuild b/system/graphite-web/graphite-web.SlackBuild index 640e18d5d482..37a3c759e24f 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 diff --git a/system/graphite-web/graphite-web.info b/system/graphite-web/graphite-web.info index 997f1339dc8c..3d45767604ce 100644 --- a/system/graphite-web/graphite-web.info +++ b/system/graphite-web/graphite-web.info @@ -1,8 +1,8 @@ PRGNAM="graphite-web" -VERSION="0.9.13pre1" +VERSION="0.9.15" HOMEPAGE="https://github.com/graphite-project/" -DOWNLOAD="https://github.com/graphite-project/graphite-web/archive/0.9.13-pre1.tar.gz" -MD5SUM="527da1f89b9a60ae2af29eed06accdf3" +DOWNLOAD="https://github.com/graphite-project/graphite-web/archive/0.9.15/graphite-web-0.9.15.tar.gz" +MD5SUM="f81c50b8b57672fc15a1cfe7bbae1c52" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="graphite-carbon" diff --git a/system/graphite-web/patches/graphite.wsgi.example.diff b/system/graphite-web/patches/graphite.wsgi.example.diff index d4f436ae7a14..2584cb7e7cc6 100644 --- a/system/graphite-web/patches/graphite.wsgi.example.diff +++ b/system/graphite-web/patches/graphite.wsgi.example.diff @@ -1,9 +1,10 @@ ---- graphite-web-0.9.13-pre1/conf/graphite.wsgi.example.orig 2014-12-31 17:51:36.000000000 +0100 -+++ graphite-web-0.9.13-pre1/conf/graphite.wsgi.example 2015-02-19 18:26:43.753661979 +0100 -@@ -1,5 +1,5 @@ - import os, sys +--- graphite-web-0.9.15/conf/graphite.wsgi.example.orig 2015-11-27 19:37:16.000000000 +0100 ++++ graphite-web-0.9.15/conf/graphite.wsgi.example 2015-12-03 23:59:30.205576427 +0100 +@@ -1,6 +1,6 @@ + import os + import sys -sys.path.append('/opt/graphite/webapp') -+sys.path.append('/usr/share/graphite/static') - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') ++sys.path.append('/usr/share/graphite-web/static') - import django + try: + from importlib import import_module diff --git a/system/graphite-web/patches/setup.cfg.diff b/system/graphite-web/patches/setup.cfg.diff index f7ca20c9ba92..cf244799f1cd 100644 --- a/system/graphite-web/patches/setup.cfg.diff +++ b/system/graphite-web/patches/setup.cfg.diff @@ -1,10 +1,6 @@ ---- graphite-web-0.9.13-pre1/setup.cfg.orig 2014-12-31 17:51:36.000000000 +0100 -+++ graphite-web-0.9.13-pre1/setup.cfg 2015-02-19 16:45:23.526959108 +0100 -@@ -1,20 +0,0 @@ --[install] --prefix = /opt/graphite --install-lib = %(prefix)s/webapp -- +--- graphite-web-0.9.15/setup.cfg.orig 2015-11-27 19:37:16.000000000 +0100 ++++ graphite-web-0.9.15/setup.cfg 2015-12-04 00:24:12.045817187 +0100 +@@ -1,16 +0,0 @@ -[bdist_rpm] -requires = Django => 1.1.4 - django-tagging diff --git a/system/graphite-web/patches/setup.py.diff b/system/graphite-web/patches/setup.py.diff index f300210bb800..64c9540e85c2 100644 --- a/system/graphite-web/patches/setup.py.diff +++ b/system/graphite-web/patches/setup.py.diff @@ -1,13 +1,14 @@ ---- graphite-web-0.9.13-pre1/setup.py.orig 2014-12-31 17:51:36.000000000 +0100 -+++ graphite-web-0.9.13-pre1/setup.py 2015-02-19 18:45:25.173599991 +0100 -@@ -58,8 +58,7 @@ - 'graphite.thirdparty.pytz', - ], - package_data={'graphite' : -- ['templates/*', 'local_settings.py.example']}, -- scripts=glob('bin/*'), -- data_files=webapp_content.items() + storage_dirs + conf_files + examples, -+ ['templates/*']}, -+ data_files=webapp_content.items() + conf_files, - **setup_kwargs - ) +--- graphite-web-0.9.15/setup.py.orig 2015-11-27 19:37:16.000000000 +0100 ++++ graphite-web-0.9.15/setup.py 2015-12-04 02:50:48.311066851 +0100 +@@ -85,9 +85,8 @@ + 'graphite.thirdparty.pytz', + ], + package_data={'graphite' : +- ['templates/*', 'local_settings.py.example']}, +- scripts=glob('bin/*'), +- data_files=webapp_content.items() + storage_dirs + conf_files + examples, ++ ['templates/*']}, ++ data_files=webapp_content.items() + conf_files, + **setup_kwargs + ) + finally: |