From c131e51d9f0482ac6ec4858822b80709f715056e Mon Sep 17 00:00:00 2001 From: Bruno Ribas Date: Fri, 16 Sep 2016 14:39:41 -0300 Subject: 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 --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3