From 77ef8261c7abefe0b1102b21b3c4fbebc81585d9 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 17 Oct 2000 02:43:57 +0000 Subject: [PATCH] final tweaking of the makefile install --- Makefile | 41 +++++++++++++++++++++++++++++++---------- config.mk | 29 ++++++++++++++++------------- spong.mk | 5 +++-- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 416cd17..c9e0ece 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.2 2000/10/09 04:45:59 sljohnson Exp $ +# $Id: Makefile,v 1.3 2000/10/17 02:43:57 sljohnson Exp $ # # Makefile for Spong (Version 2.6f and up). # @@ -39,7 +39,7 @@ help: # server part below ... We'd need to redefine the lists above. # -server: beroot bindir etcdir libdir webdir cgidir tmpdir dbdir +server: beroot bindir etcdir libdir webdir cgidir tmpdir vardir beroot: @[ `whoami` = root ] || false @@ -55,10 +55,11 @@ $(SYSTEM)-test: $(SYSTEM)-client: $(SYSTEM)-test clientdir clientlib clientetc clientbin find $(SYSTEM)-client -name CVS -exec rm -rf '{}' \; -clientdir: $(SYSTEM)-client/lib/Spong - mkdir -p ./$(SYSTEM)-client/lib/Spong - mkdir ./$(SYSTEM)-client/etc - mkdir ./$(SYSTEM)-client/bin +clientdir: $(SYSTEM)-client/lib/Spong + [ -d ./$(SYSTEM)-client/lib/Spong ] || \ + mkdir -p ./$(SYSTEM)-client/lib/Spong + [ -d ./$(SYSTEM)-client/etc ] || mkdir ./$(SYSTEM)-client/etc + [ -d ./$(SYSTEM)-client/bin ] || mkdir ./$(SYSTEM)-client/bin clientlib: mkdir -p ./$(SYSTEM)-client/lib/Spong @@ -80,11 +81,14 @@ $(SYSTEM)-client/bin/%: ./src/%.pl chmod +x ./$(SYSTEM)-client/bin/* chown $(ADMUSER):$(ADMGROUP) ./$(SYSTEM)-client/bin/* -clientetc: +clientetc: ./config/spong.conf for f in $(CCONFIGS) ; do cp ./config/$$f $(SYSTEM)-client/etc; done cat ./config/spong.conf.$(SYSTEM) >> ./$(SYSTEM)-client/etc/spong.conf chown -R $(ADMUSER):$(ADMGROUP) ./$(SYSTEM)-client/etc +client-install: + + # Server [ much nicer :) ] cvsclean: @@ -136,6 +140,11 @@ $(ETCDIR)/%: ./config/% [ -f $@ ] || mv $@.dist $@ touch $@ +./config/spong.conf: ./config/spong.conf.in + ./utils/mkTarg $< > ./spong.conf.mk + make -f ./spong.conf.mk + rm -f ./spong.conf.mk + # --- library --- libdir: $(LIBDIR) library @@ -200,16 +209,28 @@ $(CGIDIR)/%: ./src/%.pl $< > $@ chown $(WEBUSER):$(WEBGROUP) $(CGIDIR)/* +# --- misc install directories --- + tmpdir: $(TMPDIR) $(TMPDIR): [ -d $@ ] || mkdir -p $@ chmod ugo+rwX,go-w $@ - chown $(WEBUSER):$(WEBGROUP) $@ + chown $(ADMUSER):$(ADMGROUP) $@ -dbdir: $(DBDIR) +vardir: $(VARDIR) $(VARDIR)/archives $(DBDIR) + +$(VARDIR): + [ -d $@ ] || mkdir -p $@ + chmod ugo+rwX,go-w $@ + chown $(ADMUSER):$(ADMGROUP) $@ $(DBDIR): [ -d $@ ] || mkdir -p $@ chmod ugo+rwX,go-w $@ - chown $(WEBUSER):$(WEBGROUP) $@ + chown $(ADMUSER):$(ADMGROUP) $@ + +$(VARDIR)/archives: + [ -d $@ ] || mkdir -p $@ + chmod ugo+rwX,go-w $@ + chown $(ADMUSER):$(ADMGROUP) $@ diff --git a/config.mk b/config.mk index ccc0dba..65ff3d2 100644 --- a/config.mk +++ b/config.mk @@ -1,4 +1,4 @@ -# $Id: config.mk,v 1.1 2000/09/29 04:30:30 sljohnson Exp $ +# $Id: config.mk,v 1.2 2000/10/17 02:43:57 sljohnson Exp $ # # Test include for ./Makefile # Rename this "config.mk" for testing. @@ -8,31 +8,34 @@ SYSTEM=solaris #---- Modifiable Variables from Build Script ------------------ -PERL=/usr/local/bin/perl +PERL=/usr/in/perl -PREFIX=/export/data/staff/guy/Apache/spong +PREFIX=/usr/local/spong-test BINDIR=$(PREFIX)/bin ETCDIR=$(PREFIX)/etc LIBDIR=$(PREFIX)/lib +TMPDIR=$(PREFIX)/tmp +VARDIR=$(PREFIX)/var + +DBDIR=$(VARDIR)/database + +SPONGSERVER=spong-server.example.com #WEBDIR=./WEBDIR WEBDIR=$(PREFIX) WWWDIR=$(WEBDIR)/www CGIDIR=$(WEBDIR)/cgi-bin -TMPDIR=$(WEBDIR)/tmp -DBDIR=$(WEBDIR)/database - # Apache configuration -DOMAIN=bioinfo.sickkids.on.ca -SERVER=kyle.$(DOMAIN) -VSERVER=spong-27s.$(DOMAIN) -ALIASES=spong-27s -ADMIN=guy@$(DOMAIN) +DOMAIN=example.com +SERVER=www.$(DOMAIN) +VSERVER=spong.$(DOMAIN) +ALIASES=spong +ADMIN=admin@$(DOMAIN) #DOCROOT=/www WEBUSER=nobody WEBGROUP=nobody -ADMUSER=guy -ADMGROUP=jamie +ADMUSER=spong +ADMGROUP=spong diff --git a/spong.mk b/spong.mk index 1f6e915..a751cc9 100644 --- a/spong.mk +++ b/spong.mk @@ -1,4 +1,4 @@ -# $Id: spong.mk,v 1.1 2000/09/29 04:30:30 sljohnson Exp $ +# $Id: spong.mk,v 1.2 2000/10/17 02:43:57 sljohnson Exp $ # #---- Operating system list [ should match ./config/spong.conf.$OS ] @@ -17,7 +17,7 @@ LIBLIST= \ Ack AckList History HistoryList Host HostList Info Service \ ServiceList -CGILIST= www-spong www-spong-ack +CGILIST= www-spong www-spong-ack wap-spong #---- New "Arrays" @@ -83,4 +83,5 @@ WEBPAGES = \ CGISCRIPTS= \ $(CGIDIR)/www-spong \ $(CGIDIR)/www-spong-ack + $(CGIDIR)/wap-spong -- 2.30.2