1 # Copyright (C) 2000 Ian Jackson
3 # This is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with userv-utils; if not, write to the Free Software
15 # Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 sbindir= $(prefix)/sbin
27 libuserv= $(libdir)/userv
28 libfinger= $(libuserv)/finger
30 varuserv= $(varlib)/userv
31 varfinger= $(varuserv)/finger
33 etcuserv= $(etcdir)/userv
34 etcfinger= $(etcuserv)/finger
35 uservicesd= $(etcuserv)/services.d
39 ROOTMKDIRS= $(etcfinger) $(uservicesd) $(libfinger) $(varuserv)
40 USERVICES= finger-notmyself finger-finger finger-getprefs finger-setprefs
41 FINGERCONFS= config services
42 TARGETS= $(FINGERCONFS) $(USERVICES)
44 SUBSTVARS= user etcfinger varfinger libfinger
45 SEDSCRIPT= '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )'
50 sed -e $(SEDSCRIPT) <$< >$@.new && mv -f $@.new $@
53 install -d -m 755 -o root $(ROOTMKDIRS)
54 install -d -m 700 -o $(user) $(varfinger)
55 install -m 755 in.fingerd $(sbindir)
56 install -m 755 setprefs $(libfinger)
57 ./install-confs $(etcfinger) $(FINGERCONFS)
58 ./install-confs $(uservicesd) $(USERVICES)
60 fresh-install: erase-configs install
63 cd $(etcfinger); rm -f $(FINGERCONFS)
64 cd $(uservicesd); rm -f $(USERVICES)