Print "still open" messages.
[userv-utils] / finger / Makefile
1 # Copyright (C) 2000 Ian Jackson
2 #
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.
7 #
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.
12 #
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.
16 #
17 # $Id$
18
19 etcdir= /etc
20 var= /var
21 varlib= $(var)/lib
22 prefix= /usr/local
23 bindir= $(prefix)/bin
24 sbindir= $(prefix)/sbin
25
26 libdir= $(prefix)/lib
27 libuserv= $(libdir)/userv
28 libfinger= $(libuserv)/finger
29
30 varuserv= $(varlib)/userv
31 varfinger= $(varuserv)/finger
32
33 etcuserv= $(etcdir)/userv
34 etcfinger= $(etcuserv)/finger
35 uservicesd= $(etcuserv)/services.d
36
37 user= daemon
38
39 ROOTMKDIRS= $(etcfinger) $(uservicesd) $(libfinger) $(varuserv)
40 USERVICES= finger-notmyself finger-finger finger-getprefs finger-setprefs
41 FINGERCONFS= config services
42 TARGETS= $(FINGERCONFS) $(USERVICES)
43
44 SUBSTVARS= user etcfinger varfinger libfinger
45 SEDSCRIPT= '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )'
46
47 all: $(TARGETS)
48
49 %: %.in
50 sed -e $(SEDSCRIPT) <$< >$@.new && mv -f $@.new $@
51
52 install: all
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)
59
60 fresh-install: erase-configs install
61
62 erase-configs:
63 cd $(etcfinger); rm -f $(FINGERCONFS)
64 cd $(uservicesd); rm -f $(USERVICES)