Subversion Repositories Koakuma

Rev

Rev 17 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 nishi 1
# $Id: Makefile 41 2024-10-02 10:22:03Z nishi $
2
 
3
PREFIX = /usr/local
4
REPLACE = sed "s%@@PREFIX@@%$(PREFIX)%g"
5
 
41 nishi 6
.PHONY: default install
2 nishi 7
 
41 nishi 8
default:
9
	@echo To install, just run: make install
10
 
12 nishi 11
install: Component/* Tool/* Utility/* Static/* koakuma.cgi.in apache.conf.in
3 nishi 12
	mkdir -p $(PREFIX)/lib/koakuma/component/
13
	mkdir -p $(PREFIX)/lib/koakuma/utility/
2 nishi 14
	mkdir -p $(PREFIX)/lib/koakuma/htdocs/static/
15
	mkdir -p $(PREFIX)/etc/koakuma/
16
	mkdir -p $(PREFIX)/lib/koakuma/cgi-bin/
17
	mkdir -p $(PREFIX)/bin/
3 nishi 18
	mkdir -p $(PREFIX)/lib/koakuma/db
11 nishi 19
	mkdir -p $(PREFIX)/lib/koakuma/db/data
3 nishi 20
	if [ ! -e "$(PREFIX)/lib/koakuma/db/projects.db" ] ; then echo "<projects></projects>" > $(PREFIX)/lib/koakuma/db/projects.db ; fi
21
	cp -rf Component/* $(PREFIX)/lib/koakuma/component/
22
	cp -rf Utility/* $(PREFIX)/lib/koakuma/utility/
4 nishi 23
	$(REPLACE) Tool/create-project.in > $(PREFIX)/bin/create-project
24
	$(REPLACE) Tool/launch-job.in > $(PREFIX)/bin/launch-job
12 nishi 25
	cp -rf Static/* $(PREFIX)/lib/koakuma/htdocs/static/
2 nishi 26
	$(REPLACE) koakuma.cgi.in > $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi
17 nishi 27
	if [ ! -e "$(PREFIX)/etc/koakuma/apache.conf" ] ; then $(REPLACE) apache.conf.in > $(PREFIX)/etc/koakuma/apache.conf ; fi
28
	if [ ! -e "$(PREFIX)/etc/koakuma/cgi.conf" ] ; then cp cgi.conf $(PREFIX)/etc/koakuma/ ; fi
2 nishi 29
	chmod +x $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi
4 nishi 30
	chmod +x $(PREFIX)/bin/create-project
2 nishi 31
	chmod +x $(PREFIX)/bin/launch-job
3 nishi 32
	@echo
33
	@echo Make sure $(PREFIX)/lib/koakuma/db is writable by your HTTPd user.
11 nishi 34
	@echo Assuming your HTTPd user is www, just run: chmod -R www $(PREFIX)/lib/koakuma/db
35
	@echo
3 nishi 36
	@echo By default, Koakuma stock Apache config uses $(PREFIX)/etc/koakuma/passwd
7 nishi 37
	@echo for RPC authentication.