"Fossies" - the Fresh Open Source Software Archive

Member "ganglia-web-3.7.2/Makefile" (12 Oct 2015, 2748 Bytes) of package /linux/www/ganglia-web-3.7.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile": 3.7.1_vs_3.7.2.

    1 ##########################################################
    2 # User configurables:
    3 ##########################################################
    4 # Location where gweb should be installed to (excluding conf, dwoo dirs).
    5 GDESTDIR = /usr/share/ganglia-webfrontend
    6 
    7 # Location where default apache configuration should be installed to.
    8 GCONFDIR = /etc/ganglia-web
    9 
   10 # Gweb statedir (where conf dir and Dwoo templates dir are stored)
   11 GWEB_STATEDIR = /var/lib/ganglia-web
   12 
   13 # Gmetad rootdir (parent location of rrd folder)
   14 GMETAD_ROOTDIR = /var/lib/ganglia
   15 
   16 APACHE_USER = www-data
   17 ##########################################################
   18 
   19 # Gweb version
   20 GWEB_VERSION = 3.7.2
   21 
   22 DIST_NAME = ganglia-web
   23 DIST_DIR = $(DIST_NAME)-$(GWEB_VERSION)
   24 DIST_TARBALL = $(DIST_DIR).tar.gz
   25 
   26 TARGETS = conf_default.php ganglia-web.spec version.php apache.conf
   27 
   28 all: default
   29 
   30 default:	$(TARGETS)
   31 
   32 clean:
   33 	rm -rf $(TARGETS) $(DIST_DIR) $(DIST_TARBALL) rpmbuild
   34 
   35 conf_default.php:	conf_default.php.in
   36 	sed -e "s|@vargmetadir@|$(GMETAD_ROOTDIR)|" -e "s|@vargwebstatedir@|$(GWEB_STATEDIR)|g" conf_default.php.in > conf_default.php
   37 
   38 ganglia-web.spec:	ganglia-web.spec.in
   39 	sed -e s/@GWEB_VERSION@/$(GWEB_VERSION)/ -e "s|@vargwebdir@|$(GWEB_STATEDIR)|" -e "s|@varapacheuser@|$(APACHE_USER)|g" -e "s|@etcdir@|$(GCONFDIR)|g" ganglia-web.spec.in > ganglia-web.spec
   40 
   41 version.php:	version.php.in
   42 	sed -e s/@GWEB_VERSION@/$(GWEB_VERSION)/ version.php.in > version.php
   43 
   44 apache.conf:	apache.conf.in
   45 	sed -e "s|@GDESTDIR@|$(GDESTDIR)|g" apache.conf.in > apache.conf
   46 
   47 dist-dir:	default
   48 	rsync --exclude "rpmbuild" --exclude "*.gz" --exclude "Makefile" --exclude "*debian*" --exclude "$(DIST_DIR)" --exclude ".git*" --exclude "*.in" --exclude "*~" --exclude "#*#" --exclude "ganglia-web.spec" --exclude "apache.conf" -a . $(DIST_DIR)
   49 
   50 install:	dist-dir
   51 	mkdir -p $(DESTDIR)/$(GWEB_STATEDIR)/dwoo/compiled && \
   52 	mkdir -p $(DESTDIR)/$(GWEB_STATEDIR)/dwoo/cache && \
   53 	mkdir -p $(DESTDIR)/$(GWEB_STATEDIR) && \
   54 	rsync -a $(DIST_DIR)/conf $(DESTDIR)/$(GWEB_STATEDIR) && \
   55 	mkdir -p $(DESTDIR)/$(GDESTDIR) && \
   56 	rsync --exclude "conf" -a $(DIST_DIR)/* $(DESTDIR)/$(GDESTDIR) && \
   57 	chown -R $(APACHE_USER):$(APACHE_USER) $(DESTDIR)/$(GWEB_STATEDIR)
   58 
   59 dist-gzip:	dist-dir
   60 	if [ -f $(DIST_TARBALL) ]; then \
   61 	rm -rf $(DIST_TARBALL) ;\
   62 	fi ;\
   63 	tar -czf $(DIST_TARBALL) $(DIST_DIR)/*
   64 
   65 rpm: dist-gzip ganglia-web.spec apache.conf
   66 	rm -rf rpmbuild
   67 	mkdir rpmbuild
   68 	mkdir rpmbuild/SOURCES 
   69 	mkdir rpmbuild/BUILD 
   70 	mkdir rpmbuild/RPMS 
   71 	mkdir rpmbuild/SRPMS
   72 	cp $(DIST_TARBALL) rpmbuild/SOURCES
   73 	cp apache.conf rpmbuild/SOURCES
   74 	rpmbuild --define '_topdir $(PWD)/rpmbuild' --define 'custom_web_prefixdir $(GDESTDIR)' -bb ganglia-web.spec
   75 
   76 uninstall:
   77 	rm -rf $(DESTDIR)/$(GDESTDIR)  $(DESTDIR)/$(GWEB_STATEDIR)
   78