1 # Makefile for userv-git-daemon
3 # This was written by Tony Finch <dot@dotat.at> and subsequently
4 # heavily modified by Ian Jackson <ijackson@chiark.greenend.org.uk>
5 # You may do anything with it, at your own risk.
6 # http://creativecommons.org/publicdomain/zero/1.0/
8 include ../settings.make
11 varloggit= $(varlog)/git
13 TARGETS= git-upload-pack inetd.conf git-daemon git-service logrotate
15 SUBSTVARS= libuserv etcuserv varloggit gituser
17 CONFIGS= $(services)/git-upload-pack \
18 $(etcuserv)/git-urlmap \
19 $(etcdir)/logrotate.d/userv-git-daemon
23 sedscript: Makefile read-urlmap
24 echo >$@.new '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )'
25 echo >>$@.new '/@@READ_URLMAP@@/c\'
26 perl >>$@.new -pe 's/\\/\\\\/g; s/$$/\\/' <read-urlmap
31 sed -f sedscript <$< >$@.new; \
32 if test -x $<; then chmod +x $@.new; fi; \
36 mkdir -p $(libuserv) $(etcuserv) $(services) \
38 install -d -o $(gituser) -g adm $(varloggit)
39 cp git-daemon git-service $(libuserv)
40 cp git-upload-pack $(services)/git-upload-pack:new
41 cp git-urlmap $(etcuserv)/git-urlmap:new
42 cp logrotate $(etcdir)/logrotate.d/userv-git-daemon:new
43 set -e; for f in $(CONFIGS); do \
44 if test -f $$f; then continue; fi; \
49 mkdir -p $(docdir)/userv-git-daemon
51 install-docs: mkdocdir
52 cp README $(docdir)/userv-git-daemon/README
54 install-examples: all mkdocdir
55 cp inetd.conf $(docdir)/userv-git-daemon/inetd.conf