X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=finger%2FMakefile;fp=finger%2FMakefile;h=f818c7e6f9c6525d2ee6ac0d3936df31776132cb;hb=5f9b76752f5213b26c47be57a6733ead09cfdff3;hp=0000000000000000000000000000000000000000;hpb=e1e9b27fa939d2a3fa5ac7567bb0bf70085e04c8;p=userv-utils.git diff --git a/finger/Makefile b/finger/Makefile new file mode 100644 index 0000000..f818c7e --- /dev/null +++ b/finger/Makefile @@ -0,0 +1,64 @@ +# Copyright (C) 2000 Ian Jackson +# +# This is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with userv-utils; if not, write to the Free Software +# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# $Id$ + +etcdir= /etc +var= /var +varlib= $(var)/lib +prefix= /usr/local +bindir= $(prefix)/bin +sbindir= $(prefix)/sbin + +libdir= $(prefix)/lib +libuserv= $(libdir)/userv +libfinger= $(libuserv)/finger + +varuserv= $(varlib)/userv +varfinger= $(varuserv)/finger + +etcuserv= $(etcdir)/userv +etcfinger= $(etcuserv)/finger +uservicesd= $(etcuserv)/services.d + +user= daemon + +ROOTMKDIRS= $(etcfinger) $(uservicesd) $(libfinger) $(varuserv) +USERVICES= finger-notmyself finger-finger finger-getprefs finger-setprefs +FINGERCONFS= config services +TARGETS= $(FINGERCONFS) $(USERVICES) + +SUBSTVARS= user etcfinger varfinger libfinger +SEDSCRIPT= '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )' + +all: $(TARGETS) + +%: %.in + sed -e $(SEDSCRIPT) <$< >$@.new && mv -f $@.new $@ + +install: all + install -d -m 755 -o root $(ROOTMKDIRS) + install -d -m 700 -o $(user) $(varfinger) + install -m 755 in.fingerd $(sbindir) + install -m 755 setprefs $(libfinger) + ./install-confs $(etcfinger) $(FINGERCONFS) + ./install-confs $(uservicesd) $(USERVICES) + +fresh-install: erase-configs install + +erase-configs: + cd $(etcfinger); rm -f $(FINGERCONFS) + cd $(uservicesd); rm -f $(USERVICES)