Index: head/www/py-graphite-web/Makefile =================================================================== --- head/www/py-graphite-web/Makefile (revision 486088) +++ head/www/py-graphite-web/Makefile (revision 486089) @@ -1,58 +1,59 @@ # Created by: Evan Sarmiento # $FreeBSD$ PORTNAME= graphite-web PORTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= www python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= swills@FreeBSD.org COMMENT= Enterprise scalable realtime graphing platform LICENSE= APACHE20 RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairo>=1.8.10:graphics/py-cairo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}carbon>=${PORTVERSION}:databases/py-carbon@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}django-tagging>=0.3.1:www/py-django-tagging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}django>=1.4:www/py-django@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scandir>=0:sysutils/py-scandir@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyparsing>=0:devel/py-pyparsing@${PY_FLAVOR} \ xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype FETCH_ARGS= -o ${DISTNAME}${EXTRACT_SUFX} USES= cpe python:2.7 shebangfix USE_GITHUB= yes GH_ACCOUNT= graphite-project CPE_VENDOR= graphite_project CPE_PRODUCT= graphite USE_PYTHON= distutils SHEBANG_FILES= bin/build-index.sh SUB_FILES= pkg-message SUB_LIST+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} WWWOWN=${WWWOWN} \ WWWGRP=${WWWGRP} DATADIR=${DATADIR} PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} post-patch: @${RM} ${WRKSRC}/bin/build-index.sh.orig @${RM} ${WRKSRC}/bin/run-graphite-devel-server.py @${REINPLACE_CMD} -i '' -e 's|%%PREFIX%%|${PREFIX}|' \ -e 's|%%DATADIR%%|${DATADIR}|' \ -e 's|%%PYTHON_SITELIBDIR%%|${PYTHON_SITELIBDIR}|' \ ${WRKSRC}/bin/build-index.sh \ ${WRKSRC}/conf/graphite.wsgi.example \ ${WRKSRC}/setup.cfg \ ${WRKSRC}/setup.py \ ${WRKSRC}/webapp/graphite/local_settings.py.example post-install: @${MKDIR} ${STAGEDIR}${DATADIR}/examples @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/examples) @${MKDIR} ${STAGEDIR}${DATADIR}/content @(cd ${WRKSRC}/webapp/content && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/content) @${MKDIR} ${STAGEDIR}/var/log/graphite/webapp @${MKDIR} ${STAGEDIR}/var/db/graphite @${CP} ${STAGEDIR}${PYTHON_SITELIBDIR}/graphite/local_settings.py.example ${STAGEDIR}${PREFIX}/etc/graphite/local_settings.py.example @${LN} -s ${PREFIX}/etc/graphite/local_settings.py ${STAGEDIR}${PYTHON_SITELIBDIR}/graphite/local_settings.py .include Index: head/www/py-graphite-web/files/pkg-message.in =================================================================== --- head/www/py-graphite-web/files/pkg-message.in (revision 486088) +++ head/www/py-graphite-web/files/pkg-message.in (revision 486089) @@ -1,83 +1,84 @@ ======================================================================== Please note that this port/package overrides the default installation layout for Graphite! To setup graphite, you will need to: * Set the SECRET_KEY in %%PREFIX%%/etc/graphite/local_settings.py * Initialize the sqlite user database and create the admin user: - python2 %%PYTHON_SITELIBDIR%%/graphite/manage.py syncdb + django-admin.py migrate --settings=graphite.settings --run-syncdb + django-admin.py createsuperuser --settings=graphite.settings * Build the index: %%PREFIX%%/bin/build-index.sh * Change the ownership of the user database so the webapp can write to it: chown -R %%WWWOWN%%:%%WWWGRP%% /var/db/graphite/ /var/log/graphite/ * Setup a web server: Setup Apache by creating a vhost similar to the following: ServerName graphite DocumentRoot "%%DATADIR%%/content/" # I've found that an equal number of processes & threads tends # to show the best performance for Graphite (ymmv). WSGIDaemonProcess graphite processes=5 threads=5 inactivity-timeout=120 display-name=graphite WSGIProcessGroup graphite WSGIApplicationGroup graphite WSGIImportScript %%PREFIX%%/etc/graphite/graphite.wsgi process-group=graphite application-group=graphite # XXX You will need to create this file! There is a graphite.wsgi.example # file in this directory that you can safely use, just copy it to graphite.wgsi WSGIScriptAlias / %%PREFIX%%/etc/graphite/graphite.wsgi Alias /content/ %%DATADIR%%/content/ SetHandler None # XXX In order for the django admin site media to work you # must change @DJANGO_ROOT@ to be the path to your django # installation, which is probably something like: # /usr/lib/python2.6/site-packages/django #Alias /media/ "@DJANGO_ROOT@/contrib/admin/media/" Alias /media/ %%PYTHON_SITELIBDIR%%/django SetHandler None Alias /static/ "%%PYTHON_SITELIBDIR%%/django/contrib/admin/static/" SetHandler None Order deny,allow Allow from all Require all granted # The graphite.wsgi file has to be accessible by apache. It won't # be visible to clients because of the DocumentRoot though. Order deny,allow Allow from all Require all granted Order deny,allow Allow from all Require all granted Now you should be able to access the graphite virtual host you created in the first step. ==============================================================================