chiark / gitweb /
git-daemon: add Makefile and documentation.
[userv-utils.git] / git-daemon / Makefile
diff --git a/git-daemon/Makefile b/git-daemon/Makefile
new file mode 100644 (file)
index 0000000..07969cd
--- /dev/null
@@ -0,0 +1,28 @@
+# Makefile for userv-git-daemon
+#
+# This was written by Tony Finch <dot@dotat.at>
+# You may do anything with it, at your own risk.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+include ../settings.make
+
+TARGETS=       git-upload-pack inetd.conf
+
+SUBSTVARS=     libuserv etcuserv
+SEDSCRIPT=     '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )'
+
+all:           $(TARGETS)
+
+%:             %.in
+               sed $(SEDSCRIPT) <$< >$@.new && mv -f $@.new $@
+
+install:       all
+               mkdir -p $(libuserv) $(etcuserv) $(services)
+               cp git-daemon git-service $(libuserv)
+               cp git-upload-pack $(services)
+               cp git-urlmap $(etcuserv)
+
+clean:
+               rm -f $(TARGETS)
+
+# end