include ../settings.make
-TARGETS= git-upload-pack inetd.conf git-daemon git-service
+gituser= userv-git
+varloggit= $(varlog)/git
-SUBSTVARS= libuserv etcuserv varlog
+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)
mv -f $@.new $@
install: all
- mkdir -p $(libuserv) $(etcuserv) $(services)
+ 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
- set -e; cd $(services); test -f git-upload-pack \
- || mv git-upload-pack:new git-upload-pack
- set -e; cd $(etcuserv); test -f git-urlmap \
- || mv git-urlmap:new git-urlmap
+ 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
-clean:
- rm -f $(TARGETS)
+distclean clean:
+ rm -f $(TARGETS) *~
# end