GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Digital_Repository
Browse code
- Switched to slightly more streamlined sudo method to make life easier on
the deployment machine.
master
1 parent
3f66360
commit
a978b28d7272494d812e7b066f6a61f48b61b63c
nstanger
authored
on 13 Dec 2005
Patch
Showing
1 changed file
Repositories/statistics/Makefile
Ignore Space
Show notes
View
Repositories/statistics/Makefile
SHELL=/bin/sh # Load in machine-specific environment settings from environment_config.make. # This include file MUST be created and MUST define the following variables: # # EPRINTSSTATS: /path/to/eprintsstats/installation # EPRINTS_USER: the user that owns the EPrints directory # EPRINTS_GROUP: the group that owns the EPrints directory # # EPRINTS_HOST: eprints host name # EPRINTS_PORT: appropriate HTTP port # EPRINTS_ADMIN_EMAIL: administrator email address (quote "@" with \) # # GEOIP_DATABASE:=/usr/local/share/GeoIP/GeoIP.dat # # APACHE_LOG_LOCATION:=/sw/var/apache2/logs/ # APACHE_LOG_NAME:=access_log # # PHP_LIB:=/sw/lib/php4 # include environment_config.make BINDIR:=$(EPRINTSSTATS)/scripts GENERATED_FILES:=config/inc.vars.es.php scripts/eprints-usage.php \ scripts/fix-countries.php vhost/apache.conf CONFIG_SUBS:=EPRINTSSTATS EPRINTS_HOST EPRINTS_PORT EPRINTS_ADMIN_EMAIL USAGE_SUBS:=GEOIP_DATABASE APACHE_LOG_LOCATION APACHE_LOG_NAME FIX_SUBS:=GEOIP_DATABASE VHOST_SUBS:=EPRINTSSTATS PHP_LIB .PHONY: deploy stats deploy: $(GENERATED_FILES) @announce "Copying files..." @sudo -u $(EPRINTS_USER) rsync --verbose --cvs-exclude --exclude=Makefile \ --exclude='*.make' --exclude='*_src.*' \ --recursive --times . $(EPRINTSSTATS) config/inc.vars.es.php: config/inc.vars.es_src.php @announce "Generating $@" perl -p $(foreach SUB,$(CONFIG_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ scripts/eprints-usage.php: scripts/eprints-usage_src.php @announce "Generating $@" perl -p $(foreach SUB,$(USAGE_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ scripts/fix-countries.php: scripts/fix-countries_src.php @announce "Generating $@" perl -p $(foreach SUB,$(FIX_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ vhost/apache.conf: vhost/apache_src.conf @announce "Generating $@" perl -p $(foreach SUB,$(VHOST_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ stats: @announce "Generating statistics..." @php $(BINDIR)/eprints-usage.php debug: @echo "EPRINTSSTATS = [$(EPRINTSSTATS)]" @echo "BINDIR = [$(BINDIR)]"
SHELL=/bin/sh # Load in machine-specific environment settings from environment_config.make. # This include file MUST be created and MUST define the following variables: # # EPRINTSSTATS: /path/to/eprintsstats/installation # EPRINTS_USER: the user that owns the EPrints directory # EPRINTS_GROUP: the group that owns the EPrints directory # # EPRINTS_HOST: eprints host name # EPRINTS_PORT: appropriate HTTP port # EPRINTS_ADMIN_EMAIL: administrator email address (quote "@" with \) # # GEOIP_DATABASE:=/usr/local/share/GeoIP/GeoIP.dat # # APACHE_LOG_LOCATION:=/sw/var/apache2/logs/ # APACHE_LOG_NAME:=access_log # # PHP_LIB:=/sw/lib/php4 # include environment_config.make BINDIR:=$(EPRINTSSTATS)/scripts GENERATED_FILES:=config/inc.vars.es.php scripts/eprints-usage.php \ scripts/fix-countries.php vhost/apache.conf CONFIG_SUBS:=EPRINTSSTATS EPRINTS_HOST EPRINTS_PORT EPRINTS_ADMIN_EMAIL USAGE_SUBS:=GEOIP_DATABASE APACHE_LOG_LOCATION APACHE_LOG_NAME FIX_SUBS:=GEOIP_DATABASE VHOST_SUBS:=EPRINTSSTATS PHP_LIB .PHONY: deploy stats deploy: $(GENERATED_FILES) @announce "Copying files..." @sudo rsync --verbose --cvs-exclude --exclude=Makefile \ --exclude='*.make' --exclude='*_src.*' \ --recursive --times . $(EPRINTSSTATS) @announce "Correcting ownership..." sudo chown -R $(EPRINTS_USER):$(EPRINTS_GROUP) $(EPRINTSSTATS) config/inc.vars.es.php: config/inc.vars.es_src.php @announce "Generating $@" perl -p $(foreach SUB,$(CONFIG_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ scripts/eprints-usage.php: scripts/eprints-usage_src.php @announce "Generating $@" perl -p $(foreach SUB,$(USAGE_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ scripts/fix-countries.php: scripts/fix-countries_src.php @announce "Generating $@" perl -p $(foreach SUB,$(FIX_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ vhost/apache.conf: vhost/apache_src.conf @announce "Generating $@" perl -p $(foreach SUB,$(VHOST_SUBS),-e "s|##$(SUB)##|$($(SUB))|g;") $< > $@ stats: @announce "Generating statistics..." @sudo -u $(EPRINTS_USER) php $(BINDIR)/eprints-usage.php # @sudo -u $(EPRINTS_USER) perl $(BINDIR)/add_country.pl debug: @echo "EPRINTSSTATS = [$(EPRINTSSTATS)]" @echo "BINDIR = [$(BINDIR)]"
Show line notes below