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 machine-independent environment configuration.
master
1 parent
87de146
commit
3a7835d29f90a84bbd6774de70e43ad7c6a0fc2e
nstanger
authored
on 12 Dec 2005
Patch
Showing
2 changed files
Repositories/otago_eprints/Makefile
Repositories/otago_eprints/otago_eprints_src.xml
Ignore Space
Show notes
View
Repositories/otago_eprints/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 variable: # # Used in Makefile # EPRINTS_ROOT: /path/to/eprints/installation # # Used in ARCHIVE.xml configuration file # EPRINTS_HOST: eprints host name # EPRINTS_PORT: appropriate HTTP port # EPRINTS_ADMIN_EMAIL: administrator email address (quote "@" with \) # EPRINTS_ARCHIVE_NAME: full archive name as it appears in web pages # # Used in apachevhost.conf # EPRINTS_ALLOWED_DOMAINS: domains that web registration is allowed from # include environment_config.make SUBSTITUTIONS:=EPRINTS_HOST EPRINTS_PORT EPRINTS_ADMIN_EMAIL EPRINTS_ARCHIVE_NAME ARCHIVE_NAME:=otago_eprints BINDIR:=$(EPRINTS_ROOT)/bin ARCHIVE_ROOT:=$(EPRINTS_ROOT)/archives/$(ARCHIVE_NAME) ARCHIVE_CONFIG:=$(EPRINTS_ROOT)/archives/$(ARCHIVE_NAME).xml .PHONY: deploy generate_apacheconf import_subjects generate_static \ generate_abstracts generate_views restart_apache index stats deploy: $(ARCHIVE_NAME).xml $(ARCHIVE_NAME)/cfg/apachevhost.conf @announce "Copying files..." @sudo rsync --verbose --cvs-exclude --exclude=Makefile \ --exclude='*.make' --exclude='*_src.*' \ --recursive --times . $(EPRINTS_ROOT)/archives > .del-rsync-output @-grep $(ARCHIVE_NAME) .del-rsync-output @announce "Correcting ownership..." sudo chown -R www:www $(ARCHIVE_CONFIG) $(ARCHIVE_ROOT) @-grep --quiet "$(ARCHIVE_NAME)\\.xml" .del-rsync-output && $(MAKE) generate_apacheconf @-grep --quiet "$(ARCHIVE_NAME)/cfg/subjects" .del-rsync-output && $(MAKE) import_subjects @-grep --quiet "\\(otago_eprints/cfg/static/\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) generate_static @-grep --quiet "\\(\\.pm\\)\\|\\(\\.xml\\)\|\($(ARCHIVE_NAME)/cfg/subjects\)" .del-rsync-output && $(MAKE) generate_views @-grep --quiet "\\($(ARCHIVE_NAME)/cfg/ArchiveRenderConfig.pm\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) generate_abstracts @-grep --quiet "\\(\\.conf\\)\\|\\(\\.pm\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) restart_apache @rm -f .del-rsync-output $(ARCHIVE_NAME).xml: $(ARCHIVE_NAME)_src.xml @announce "Creating $@" perl -p $(foreach SUB,$(SUBSTITUTIONS),-e "s/##$(SUB)##/$($(SUB))/;") $< > $@ $(ARCHIVE_NAME)/cfg/apachevhost.conf: $(ARCHIVE_NAME)/cfg/apachevhost_src.conf @announce "Creating $@" perl -p -e "s|##EPRINTS_ALLOWED_DOMAINS##|$(EPRINTS_ALLOWED_DOMAINS)|;" $< > $@ generate_apacheconf: @announce "generate_apacheconf" @sudo -u www touch -r $(ARCHIVE_NAME).xml $(ARCHIVE_CONFIG) @sudo -u www $(BINDIR)/$@ import_subjects generate_static generate_abstracts generate_views: @announce "$@ $(ARCHIVE_NAME)" @sudo -u www $(BINDIR)/$@ $(ARCHIVE_NAME) restart_apache: @announce "Waiting for Apache to shut down..." @sudo /sw/sbin/apachectl stop @sudo -u www touch -r $(ARCHIVE_NAME)/cfg/apachevhost.conf $(ARCHIVE_ROOT)/cfg/apachevhost.conf @sleep 10 @announce "Waiting for Apache to start up..." @sudo /sw/sbin/apachectl start @while [ ! -f /sw/var/apache2/logs/httpd.pid ]; do echo > /dev/null; done index: @announce "Rebuilding indexes..." @sudo -u www $(BINDIR)/indexer start --once --notdaemon stats: @announce "Generating statistics..." @sudo -u www php $(EPRINTS_ROOT)/ePrintsStats/scripts/eprints-usage.php # @sudo -u www perl $(EPRINTS_ROOT)/ePrintsStats/scripts/add_country.pl debug: @echo "ARCHIVE_NAME = [$(ARCHIVE_NAME)]" @echo "EPRINTS = [$(EPRINTS)]" @echo "ARCHIVE_ROOT = [$(ARCHIVE_ROOT)]" @echo "ARCHIVE_CONFIG = [$(ARCHIVE_CONFIG)]"
SHELL=/bin/sh ARCHIVE_NAME:=otago_eprints EPRINTS:=/usr/local/eprints BINDIR:=$(EPRINTS)/bin ARCHIVE_ROOT:=$(EPRINTS)/archives/$(ARCHIVE_NAME) ARCHIVE_CONFIG:=$(EPRINTS)/archives/$(ARCHIVE_NAME).xml .PHONY: deploy generate_apacheconf import_subjects generate_static \ generate_abstracts generate_views restart_apache index stats deploy: @announce "Copying files..." @sudo rsync --verbose --cvs-exclude --exclude=Makefile \ --recursive --times . $(EPRINTS)/archives > .del-rsync-output @-grep $(ARCHIVE_NAME) .del-rsync-output @announce "Correcting ownership..." sudo chown -R www:www $(ARCHIVE_CONFIG) $(ARCHIVE_ROOT) @-grep --quiet "$(ARCHIVE_NAME)\\.xml" .del-rsync-output && $(MAKE) generate_apacheconf @-grep --quiet "$(ARCHIVE_NAME)/cfg/subjects" .del-rsync-output && $(MAKE) import_subjects @-grep --quiet "\\(otago_eprints/cfg/static/\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) generate_static @-grep --quiet "\\(\\.pm\\)\\|\\(\\.xml\\)\|\($(ARCHIVE_NAME)/cfg/subjects\)" .del-rsync-output && $(MAKE) generate_views @-grep --quiet "\\($(ARCHIVE_NAME)/cfg/ArchiveRenderConfig.pm\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) generate_abstracts @-grep --quiet "\\(\\.conf\\)\\|\\(\\.pm\\)\\|\\(\\.xml\\)" .del-rsync-output && $(MAKE) restart_apache @rm -f .del-rsync-output generate_apacheconf: @announce "generate_apacheconf" @sudo -u www $(BINDIR)/$@ import_subjects generate_static generate_abstracts generate_views: @announce "$@ $(ARCHIVE_NAME)" @sudo -u www $(BINDIR)/$@ $(ARCHIVE_NAME) restart_apache: @announce "Waiting for Apache to shut down..." # @sudo /usr/sbin/apachectl stop # @while [ -f /var/run/httpd.pid ]; do echo > /dev/null; done @sudo /sw/sbin/apachectl stop @sleep 7 @announce "Waiting for Apache to start up..." # @sudo /usr/sbin/apachectl start # @while [ ! -f /var/run/httpd.pid ]; do echo > /dev/null; done @sudo /sw/sbin/apachectl start @while [ ! -f /sw/var/apache2/logs/httpd.pid ]; do echo > /dev/null; done index: @announce "Rebuilding indexes..." @sudo -u www $(BINDIR)/indexer start --once --notdaemon stats: @announce "Generating statistics..." @sudo -u www php $(EPRINTS)/ePrintsStats/scripts/eprints-usage.php @sudo -u www perl $(EPRINTS)/ePrintsStats/scripts/add_country.pl debug: @echo "ARCHIVE_NAME = [$(ARCHIVE_NAME)]" @echo "EPRINTS = [$(EPRINTS)]" @echo "ARCHIVE_ROOT = [$(ARCHIVE_ROOT)]" @echo "ARCHIVE_CONFIG = [$(ARCHIVE_CONFIG)]"
Ignore Space
Show notes
View
Repositories/otago_eprints/otago_eprints_src.xml
<archive id="otago_eprints"> <host>##EPRINTS_HOST##</host> <language>en</language> <port>##EPRINTS_PORT##</port> <urlpath>/</urlpath> <archiveroot>archives/otago_eprints</archiveroot> <configmodule>cfg/ArchiveConfig.pm</configmodule> <dbname>otago_eprints</dbname> <dbhost>localhost</dbhost> <dbport></dbport> <dbsock></dbsock> <dbuser>otago_eprints</dbuser> <dbpass>DrSyntaxRidesAgain</dbpass> <defaultlanguage>en</defaultlanguage> <adminemail>##EPRINTS_ADMIN_EMAIL##</adminemail> <securehost></securehost> <securepath></securepath> <archivename language="en">##EPRINTS_ARCHIVE_NAME##</archivename> </archive>
<archive id="otago_eprints"> <host>eprints.otago.ac.nz</host> <language>en</language> <port>80</port> <urlpath>/</urlpath> <archiveroot>archives/otago_eprints</archiveroot> <configmodule>cfg/ArchiveConfig.pm</configmodule> <dbname>otago_eprints</dbname> <dbhost>localhost</dbhost> <dbport></dbport> <dbsock></dbsock> <dbuser>otago_eprints</dbuser> <dbpass>DrSyntaxRidesAgain</dbpass> <defaultlanguage>en</defaultlanguage> <adminemail>nstanger@infoscience.otago.ac.nz</adminemail> <securehost></securehost> <securepath></securepath> <archivename language="en">University of Otago School of Business Pilot Repository</archivename> </archive>
Show line notes below