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