aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1aec85a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+INDEX = index.html
+GPGKEY = praat.gpg.key
+WWWDIR = /var/www/praat
+WWWHOST = praat.cefala.org
+APACHEDIR = /etc/apache2/sites-available
+BUILD = www/$(INDEX) apache/praat.conf
+REPODATA = repo/db repo/dists repop/pool
+REPOHOST = www.cefala.org
+USER = rlaboiss
+
+.PHONY: install
+install: $(BUILD)
+ mkdir -p $(WWWDIR)
+ chown -R '$(USER):$(USER)' $(WWWDIR)
+ install --mode=644 www/$(INDEX) www/$(GPGKEY) $(WWWDIR)
+ install --mode=644 apache/praat.conf $(APACHEDIR)
+ a2ensite praat
+ service apache2 restart
+
+%: %.in
+ sed -e 's|@WWWHOST@|$(WWWHOST)|;s|@WWWDIR@|$(WWWDIR)|;s|@INDEX@|$(INDEX)|;s|@GPGKEY@|$(GPGKEY)|' $< > $@
+
+.PHONY: clean
+clean:
+ rm -f $(BUILD)
+
+.PHONY: install-repo
+install-repo:
+ scp -r r$(REPODATA) '$(USER)@$(REPOHOST):$(WWWDIR)'