-
Notifications
You must be signed in to change notification settings - Fork 56
/
Makefile
76 lines (65 loc) · 2.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
tools/safeexec: tools/safeexec.c
gcc -g -O2 $^ -o $@
tools/boca-submit-run-root-wrapper: tools/boca-submit-run-root-wrapper.c
gcc -g -O2 $^ -o $@
install-bocawww:
mkdir -p $(DESTDIR)/usr/sbin $(DESTDIR)/etc/cron.d $(DESTDIR)/var/www/boca/
cp -r src $(DESTDIR)/var/www/boca/
cp -r doc $(DESTDIR)/var/www/boca/
install tools/boca-fixssh $(DESTDIR)/usr/sbin/
install tools/cron-boca-fixssh $(DESTDIR)/etc/cron.d/
chmod 700 $(DESTDIR)/usr/sbin/boca-fixssh
install-bocaapache:
mkdir -p $(DESTDIR)/etc/apache2/sites-available/
cp tools/000-boca.conf $(DESTDIR)/etc/apache2/sites-available/000-boca.conf
install-scripts:
mkdir -p $(DESTDIR)/usr/sbin/
install tools/dump.sh $(DESTDIR)/usr/sbin/boca-dump
chmod 700 $(DESTDIR)/usr/sbin/boca-dump
install-bocadb:
mkdir -p $(DESTDIR)/usr/sbin/
mkdir -p $(DESTDIR)/etc
cp -r tools/postgresql $(DESTDIR)/etc
install tools/boca-createdb.sh $(DESTDIR)/usr/sbin/boca-createdb
chmod 700 $(DESTDIR)/usr/sbin/boca-createdb
install-bocacommon: install-bocawww
mkdir -p $(DESTDIR)/usr/sbin/
mkdir -p $(DESTDIR)/etc/
cp tools/boca.conf $(DESTDIR)/etc/
install tools/boca-config-dbhost.sh $(DESTDIR)/usr/sbin/boca-config-dbhost
chmod 700 $(DESTDIR)/usr/sbin/boca-config-dbhost
install-bocaautojudge: tools/safeexec
mkdir -p $(DESTDIR)/usr/sbin/
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/etc/
install tools/safeexec $(DESTDIR)/usr/bin/safeexec
install tools/boca-createjail $(DESTDIR)/usr/sbin/boca-createjail
install tools/boca-autojudge.sh $(DESTDIR)/usr/sbin/boca-autojudge
chmod 4555 $(DESTDIR)/usr/bin/safeexec
chmod 700 $(DESTDIR)/usr/sbin/boca-createjail
chmod 700 $(DESTDIR)/usr/sbin/boca-autojudge
install: install-bocawww install-bocaapache install-bocadb install-bocacommon install-bocaautojudge install-scripts
clean:
$(RM) tools/safeexec
$(RM) tools/boca-submit-run-root-wrapper
install-submission-tools: tools/boca-submit-run-root-wrapper
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin $(DESTDIR)/etc/cron.d
install tools/boca-auth-runs $(DESTDIR)/usr/sbin/
install tools/boca-submit-run $(DESTDIR)/usr/bin/
install tools/boca-submit-run-cron $(DESTDIR)/usr/bin/
install tools/boca-submit-run-aux $(DESTDIR)/usr/bin/
install tools/boca-submit-run-root $(DESTDIR)/usr/bin/
install tools/boca-submit-log $(DESTDIR)/usr/sbin/
install tools/cron-boca-submit $(DESTDIR)/etc/cron.d/
install tools/cron-boca-log $(DESTDIR)/etc/cron.d/
install tools/boca-submit-run-root-wrapper $(DESTDIR)/usr/bin/
install tools/boca-outmanage $(DESTDIR)/usr/sbin/
install tools/boca-checkinternet $(DESTDIR)/usr/sbin/
install tools/boca-fixes $(DESTDIR)/usr/sbin/
install tools/cron-boca-fixes $(DESTDIR)/etc/cron.d/
chmod 700 $(DESTDIR)/usr/sbin/boca-fixes
chmod 700 $(DESTDIR)/usr/sbin/boca-auth-runs
chmod 700 $(DESTDIR)/usr/sbin/boca-outmanage
chmod 700 $(DESTDIR)/usr/sbin/boca-submit-log
chmod 700 $(DESTDIR)/usr/bin/boca-submit-run-*
chmod 4555 $(DESTDIR)/usr/bin/boca-submit-run-root-wrapper