]> arthur.barton.de Git - netatalk.git/blob - config/Makefile.am
Merge branch-2-1
[netatalk.git] / config / Makefile.am
1 ## Makefile.am for config/
2
3 SUBDIRS = pam
4 SUFFIXES = .tmpl .
5
6 GENFILES = afpd.conf AppleVolumes.default
7 TMPLFILES = afpd.conf.tmpl AppleVolumes.default.tmpl
8 CONFFILES = AppleVolumes.system netatalk.conf
9
10 if HAVE_ACLS
11 CONFFILES += afp_ldap.conf
12 endif
13
14 if USE_APPLETALK
15 CONFFILES += atalkd.conf papd.conf
16 endif
17
18 OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
19 EXTRA_DIST = $(CONFFILES) $(TMPLFILES) afp_ldap.conf
20 CLEANFILES = $(GENFILES)
21
22 pkgconfdir = @PKGCONFDIR@
23 webminpath = @WEBMIN_PATH@
24 webminuser = @WEBMIN_USER@
25 webminversion = @WEBMIN_VERSION@
26 webminpass = @WEBMIN_PASS@
27 webminport = @WEBMIN_PORT@
28
29 #
30 # rule to parse template files
31 #
32
33 .tmpl:
34         sed -e s@:UAMS_PATH:@${UAMS_PATH}@ \
35             -e s@:ETCDIR:@${pkgconfdir}@ \
36             -e s@:COMPILED_BACKENDS:@"$(compiled_backends)"@ \
37             -e s@:DEFAULT_CNID_SCHEME:@$(DEFAULT_CNID_SCHEME)@ \
38             <$< >$@
39
40 #
41 # install configuration files
42 #
43
44 install-data-local: install-config-files install-webmin
45
46 uninstall-local:
47         for f in $(CONFFILES) $(GENFILES); do \
48                 echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
49                 rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
50         done
51
52
53 install-config-files: $(CONFFILES) $(GENFILES)
54         $(mkinstalldirs) $(DESTDIR)$(pkgconfdir)
55         for f in $(CONFFILES) $(GENFILES); do \
56                 if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pkgconfdir)/$$f; then \
57                         echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir)"; \
58                         $(INSTALL_DATA) $$f $(DESTDIR)$(pkgconfdir); \
59                 else \
60                         echo "not overwriting $$f"; \
61                 fi; \
62         done
63
64 install-webmin:
65         if test "x$(webminpath)" != "x"; then \
66                 if ! test -d "x$(webminpath)"; then \
67                         mkdir -p "$(webminpath)"; \
68                 fi; \
69                 cd "$(webminpath)"; \
70                 wget http://prdownloads.sourceforge.net/webadmin/webmin-$(webminversion).tar.gz ; \
71                 tar xzf webmin-$(webminversion).tar.gz; \
72                 rm webmin-$(webminversion).tar.gz; \
73                 /etc/init.d/webmin stop; \
74                 rm -r webmin; \
75                 mv webmin-$(webminversion) webmin; \
76                 cd webmin; \
77                 rm -r adsl-client apache at backup-config bacula-backup bandwidth bind8 bsdexports burner \
78                         cfengine cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin \
79                         cluster-usermin cluster-webmin custom \
80                         cron dfsadmin dhcpd dnsadmin dovecot exim exports \
81                         fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports \
82                         htaccess-htpasswd idmapd inetd inittab ipfilter ipfw ipsec jabber \
83                         ldap-server lilo logrotate lpadmin lvm \
84                         mailboxes mailcap majordomo man mon mscstyle3 mysql \
85                         net nis openslp pap phpini postfix postgresql ppp-client pptp-client pptp-server \
86                         procmail proftpd pserver qmailadmin raid rbac \
87                         samba sarg sendmail sentry sgiexports shell \
88                         shorewall smart-status smf software spam squid sshd \
89                         status stunnel tcpwrappers telnet time tunnel \
90                         updown usermin vgetty webalizer wuftpd xinetd zones; \
91                 wget https://sourceforge.net/projects/netatalk/files/Netatalk%20Webmin%20Module/0.9-beta2/netatalk.wbm.gz/download ; \
92                 tar xzf netatalk.wbm.gz; \
93                 rm netatalk.wbm.gz; \
94                 cd netatalk; \
95                 rm config; \
96                 echo "applevolumedefault_c=$(sysconfdir)/netatalk/AppleVolumes.default" >> config; \
97                 echo "applevolumesystem_c=$(sysconfdir)/netatalk/AppleVolumes.system" >> config; \
98                 echo "afpd_c=$(sysconfdir)/netatalk/afpd.conf" >> config; \
99                 echo "atalk_c=$(sysconfdir)/netatalk/atalk.conf" >> config; \
100                 echo "papd_c=$(sysconfdir)/netatalk/papd.conf" >> config; \
101                 echo "afpd_d=$(sbindir)/afpd" >> config; \
102                 echo "atalkd_d=$(sbindir)/atalkd" >> config; \
103                 echo "papd_d=$(sbindir)/papd" >> config; \
104                 echo "netatalk_c=@PAMDIR@/etc/pam.d" >> config; \
105                 echo "atalk_start=$(sysconfdir)/init.d/atalk" >> config; \
106                 echo "select_minUsers=" >> config; \
107                 echo "select_maxUsers=" >> config; \
108                 echo "atalk_nls=" >> config; \
109                 cd ..; \
110                 config_dir="$(sysconfdir)/netatalk/webmin-config" \
111                         var_dir="$(prefix)/var" \
112                         perl="`which perl`" \
113                         port="$(webminport)" \
114                         login="$(webminuser)" \
115                         password="$(webminpass)" \
116                         ssl=1 \
117                         atboot=1 \
118                         bootscript=netamin \
119                         ./setup.sh > /dev/null; \
120         fi