aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Ribas <brunoribas@gmail.com>2016-09-16 17:39:41 +0000
committerBruno Ribas <brunoribas@gmail.com>2016-09-16 17:39:41 +0000
commitc131e51d9f0482ac6ec4858822b80709f715056e (patch)
treebf73c8be0a5e5ef22a0817c655f56c79490426c1
parent8a24150618cbecbb1c5556a6a5bec7d321c5aee5 (diff)
downloadboca-c131e51d9f0482ac6ec4858822b80709f715056e.tar.gz
boca-c131e51d9f0482ac6ec4858822b80709f715056e.zip
Added Makefile
This Makefile is used to generate the debian package. It only contains the build command to safeexec and install commands to place files at the correct places to run boca Signed-off-by: Bruno Ribas <brunoribas@gmail.com>
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7d067bd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+
+tools/safeexec: tools/safeexec.c
+ gcc tools/safeexec.c -o tools/safeexec
+
+install-bocawww:
+ mkdir -p $(DESTDIR)/var/www/boca/
+ cp -r src $(DESTDIR)/var/www/boca/
+ cp -r doc $(DESTDIR)/var/www/boca/
+
+install-bocaapache: install-bocawww
+ mkdir -p $(DESTDIR)/etc/apache2/sites-enabled/
+ cp tools/etc/apache2/conf.d/boca $(DESTDIR)/etc/apache2/sites-enabled/000-boca.conf
+
+install-scripts:
+ mkdir -p $(DESTDIR)/usr/sbin/
+ install tools/dump.sh $(DESTDIR)/usr/sbin/boca-dump
+ install tools/etc/icpc/createbocajail.sh $(DESTDIR)/usr/sbin/boca-createjail
+ install tools/boca-createdb.sh $(DESTDIR)/usr/sbin/boca-createdb
+ install tools/boca-autojudge.sh $(DESTDIR)/usr/sbin/boca-autojudge
+ install tools/boca-config-dbhost.sh $(DESTDIR)/usr/sbin/boca-config-dbhost
+
+install: install-bocawww install-bocaapache install-scripts tools/safeexec
+ mkdir -p $(DESTDIR)/usr/bin/
+ mkdir -p $(DESTDIR)/etc/
+ cp tools/boca.conf $(DESTDIR)/etc/
+ install tools/safeexec $(DESTDIR)/usr/bin/safeexec
+ chmod 4555 $(DESTDIR)/usr/bin/safeexec