From d48c1ce2af934c512f808150e95a60a3ace21640 Mon Sep 17 00:00:00 2001 From: Rafael Laboissière Date: Sat, 10 Dec 2022 16:18:50 -0300 Subject: Initial commit --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6d64923 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +APACHE_DIR = /etc/apache2/sites-available + +### The rules apache-(un|)install are intended to be run on the +### www.cefala.org server. The rule cgit-install is intended to be run +### on the git.cefala.org server. + +.PHONY: apache-install +apache-install: HTTP HTTPS + install --mode=644 HTTP $(APACHE_DIR)/cgit.conf + install --mode=644 HTTPS $(APACHE_DIR)/cgit-le-ssl.conf + /usr/sbin/a2ensite cgit + /usr/sbin/a2ensite cgit-le-ssl + /usr/sbin/a2enmod proxy + /usr/sbin/a2enmod proxy_http + /bin/systemctl restart apache2.service + +HTTP HTTPS: apache + slice -o$@uUNDEF":"$@ apache + +.PHONY: apache-uninstall +apache-uninstall: + /usr/sbin/a2ensite cgit + /usr/sbin/a2ensite cgit-le-ssl + rm $(APACHE_DIR)/cgit.conf + rm $(APACHE_DIR)/cgit-le-ssl.conf + /bin/systemctl restart apache2.service + +.PHONY: cgit-install +cgit-install: + sudo cp cgitrc cgitrepos /etc + +.PHONY: clean +clean: + rm -f HTTP HTTPS -- cgit v1.2.3