~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to config/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Makefile.am for config/
 
2
 
 
3
SUFFIXES = .tmpl .
 
4
 
 
5
GENFILES = afpd.conf
 
6
TMPLFILES = $(foreach file,$(GENFILES),$(file).tmpl)
 
7
CONFFILES = AppleVolumes.default AppleVolumes.system \
 
8
        atalkd.conf netatalk.conf papd.conf
 
9
PAMFILES = netatalk.pamd
 
10
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
 
11
 
 
12
EXTRA_DIST = $(CONFFILES) $(TMPLFILES) $(PAMFILES)
 
13
 
 
14
CLEANFILES = $(GENFILES)
 
15
 
 
16
pkgconfdir = @PKGCONFDIR@
 
17
nlsdir = @NLSDIR@
 
18
 
 
19
#
 
20
# rule to parse template files
 
21
#
 
22
 
 
23
.tmpl:
 
24
        sed -e s@:UAMS_PATH:@${UAMS_PATH}@ \
 
25
            -e s@:NLS_PATH:@${nlsdir}@ \
 
26
            -e s@:ETCDIR:@${pkgconfdir}@ \
 
27
            <$< >$@
 
28
 
 
29
#
 
30
# install configuration files
 
31
#
 
32
 
 
33
install-config-files: $(CONFFILES) $(GENFILES)
 
34
        $(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
 
35
        for f in $(CONFFILES) $(GENFILES); do \
 
36
                if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
 
37
                        echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
 
38
                        $(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \
 
39
                else \
 
40
                        echo "not overwriting $$f"; \
 
41
                fi; \
 
42
        done
 
43
 
 
44
#
 
45
# pluggable authentication modules support
 
46
#
 
47
 
 
48
if USE_PAM
 
49
 
 
50
pamdir = @PAMDIR@/etc/pam.d
 
51
 
 
52
install-data-local: install-config-files $(PAMFILES)
 
53
        $(mkinstalldirs) $(DESTDIR)$(pamdir)
 
54
        if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
 
55
                echo "$(INSTALL_DATA) netatalk.pamd $(DESTDIR)$(pamdir)/netatalk"; \
 
56
                $(INSTALL_DATA) netatalk.pamd $(DESTDIR)$(pamdir)/netatalk || \
 
57
                echo "WARNING: Can't install PAM file";            \
 
58
        else \
 
59
                echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
 
60
        fi;
 
61
 
 
62
else
 
63
 
 
64
install-data-local: install-config-files
 
65
 
 
66
endif