aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dab2b10
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+NAME = gemini
+BIN = $(NAME).filter.dpi
+DILLO_DIR = ~/.dillo
+DPI_DIR = $(DILLO_DIR)/dpi/$(NAME)
+DPIDRC = $(DILLO_DIR)/dpidrc
+
+all:
+ @echo "Use 'make install' to install"
+ @echo "Use 'make uninstall' to uninstall"
+
+$(DPIDRC):
+ cp /etc/dillo/dpidrc $@
+
+install-proto: $(DPIDRC)
+ grep -q '^proto.$(NAME)=$(NAME)' $< || echo 'proto.$(NAME)=$(NAME)/$(BIN)' >> $<
+ dpidc stop || true
+
+link: $(BIN) install-proto
+ mkdir -p $(DPI_DIR)
+ ln -frs $(BIN) $(DPI_DIR)
+
+install: $(BIN) install-proto
+ mkdir -p $(DPI_DIR)
+ cp -f $(BIN) $(DPI_DIR)
+
+uninstall: $(BIN)
+ rm -f $(DPI_DIR)/$(BIN)
+
+.PHONY:
+ all install install-proto uninstall