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