# Makefile for userv-git-daemon # # This was written by Tony Finch and subsequently # heavily modified by Ian Jackson # You may do anything with it, at your own risk. # http://creativecommons.org/publicdomain/zero/1.0/ include ../settings.make gituser= userv-git varloggit= $(varlog)/git TARGETS= git-upload-pack inetd.conf git-daemon git-service logrotate SUBSTVARS= libuserv etcuserv varloggit gituser CONFIGS= $(services)/git-upload-pack \ $(etcuserv)/git-urlmap \ $(etcdir)/logrotate.d/userv-git-daemon all: $(TARGETS) sedscript: Makefile read-urlmap echo >$@.new '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )' echo >>$@.new '/@@READ_URLMAP@@/c\' @#' perl >>$@.new -pe 's/\\/\\\\/g; s/$$/\\/' $@.new; \ if test -x $<; then chmod +x $@.new; fi; \ mv -f $@.new $@ install: all mkdir -p $(libuserv) $(etcuserv) $(services) \ $(etcdir)/logrotate.d install -d -o $(gituser) -g adm $(varloggit) cp git-daemon git-service $(libuserv) cp git-upload-pack $(services)/git-upload-pack:new cp git-urlmap $(etcuserv)/git-urlmap:new cp logrotate $(etcdir)/logrotate.d/userv-git-daemon:new set -e; for f in $(CONFIGS); do \ if test -f $$f; then continue; fi; \ mv $$f:new $$f; \ done mkdocdir: mkdir -p $(docdir)/userv-git-daemon install-docs: mkdocdir cp README $(docdir)/userv-git-daemon/README install-examples: all mkdocdir cp inetd.conf $(docdir)/userv-git-daemon/inetd.conf distclean clean: rm -f $(TARGETS) *~ # end