ojudge

A self-hosted competitive programming site written in OCaml
git clone git://git.laack.co/ojudge.git
Log | Files | Refs | README

Makefile (901B)


      1 ocaml:
      2 	rm -rf cgi/*
      3 	cd ojudge && dune build
      4 	cp ./ojudge/_build/install/default/bin/home cgi/
      5 	cp ./ojudge/_build/install/default/bin/problem cgi/
      6 	cp ./ojudge/_build/install/default/bin/executor cgi/
      7 	cp ./ojudge/_build/install/default/bin/submit cgi/
      8 
      9 ensure-config:
     10 	id http # required for lighttpd
     11 ensure-deps:
     12 	lighttpd -h
     13 	dune --version
     14 	opam --version
     15 	echo "All dependencies were already installed"
     16 run-server: ocaml
     17 	sudo rm -rf /srv/http/ojudge
     18 	sudo mkdir -p /srv/http/ojudge
     19 	sudo mkdir -p /var/lib/ojudge/problems/
     20 	sudo mkdir -p /var/lib/ojudge/submissions/
     21 	sudo chown -R http:http /var/lib/ojudge/submissions/ # allow cgi scripts to create submissions
     22 	sudo cp -r assets/problems /var/lib/ojudge/
     23 	sudo cp -r cgi /srv/http/ojudge/
     24 	sudo cp config/lighttpd.conf /etc/lighttpd/lighttpd.conf
     25 	sudo systemctl stop lighttpd
     26 	sudo systemctl start lighttpd
     27 	sudo systemctl enable lighttpd