aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
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