system/graphite-web: Updated for version 0.9.15.

Signed-off-by: Mario Preksavec <mario@slackware.hr>
This commit is contained in:
Mario Preksavec 2016-07-24 19:18:50 +02:00 committed by Willy Sudiarto Raharjo
parent 1b52fb5544
commit 7b3a2e1464
No known key found for this signature in database
GPG key ID: 887B8374D7333381
5 changed files with 60 additions and 42 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,6 @@
--- 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-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' :
@ -11,3 +11,4 @@
+ data_files=webapp_content.items() + conf_files,
**setup_kwargs
)
finally: