1 ## Makefile for distrib/initscripts/
5 pkgconfdir = @PKGCONFDIR@
12 sed -e s@:BINDIR:@${bindir}@ \
13 -e s@:SBINDIR:@${sbindir}@ \
14 -e s@:ETCDIR:@${pkgconfdir}@ \
15 -e s@:NETATALK_VERSION:@${NETATALK_VERSION}@ \
16 -e s@:PATH_NETATALK_LOCK:@${PATH_NETATALK_LOCK}@ \
38 service.systemd.tmpl \
41 CLEANFILES = $(GENERATED_FILES) $(sysv_SCRIPTS) $(service_DATA) afpd cnid_metad
42 EXTRA_DIST = $(TEMPLATES)
43 noinst_DATA = $(GENERATED_FILES)
45 # overwrite automake uninstall
46 # not beautiful, but this way we can call the OS specific init script
47 # tools, like chkconfig, insserv or rc-update
49 uninstall: uninstall-startup
52 # checking for "redhat" style sysv scripts:
58 sysv_SCRIPTS = netatalk
60 $(sysv_SCRIPTS): rc.redhat
61 cp -f rc.redhat $(sysv_SCRIPTS)
62 chmod a+x $(sysv_SCRIPTS)
65 -chkconfig --add $(sysv_SCRIPTS)
68 -chkconfig --del $(sysv_SCRIPTS)
69 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
74 # checking for general systemd scripts:
79 servicedir = $(INIT_DIR)
80 service_DATA = netatalk.service
82 netatalk.service: service.systemd
83 cp -f service.systemd netatalk.service
86 -systemctl daemon-reload
89 -systemctl disable $(service_DATA)
90 rm -f $(DESTDIR)$(servicedir)/netatalk.service
91 -systemctl daemon-reload
96 # checking for "SuSE" style sysv scripts:
101 sysvdir = $(INIT_DIR)
102 sysv_SCRIPTS = netatalk
104 $(sysv_SCRIPTS): rc.suse
105 cp -f rc.suse $(sysv_SCRIPTS)
106 chmod a+x $(sysv_SCRIPTS)
109 -insserv $(sysv_SCRIPTS)
112 -insserv -d $(sysv_SCRIPTS)
113 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
118 # checking for NetBSD init scripts
123 sysvdir = $(INIT_DIR)
124 sysv_SCRIPTS = netatalk
134 uninstall-startup: uninstall-am
139 # checking for Solaris init scripts
144 servicedir = $(INIT_DIR)
145 service_DATA = netatalk.xml
148 svccfg import netatalk.xml
151 svccfg delete network/netatalk
156 # checking for "Gentoo" style sysv scripts:
161 sysvdir = $(INIT_DIR)
162 sysv_SCRIPTS = netatalk
164 $(sysv_SCRIPTS): rc.gentoo
165 cp -f rc.gentoo $(sysv_SCRIPTS)
166 chmod a+x $(sysv_SCRIPTS)
169 # -rc-update add $(sysv_SCRIPTS) default
172 # -rc-update del $(sysv_SCRIPTS) default
173 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
178 # checking for "Debian" style sysv scripts:
183 sysvdir = $(INIT_DIR)
184 sysv_SCRIPTS = netatalk
186 $(sysv_SCRIPTS): rc.debian
187 cp -f rc.debian $(sysv_SCRIPTS)
188 chmod a+x $(sysv_SCRIPTS)
191 # update-rc.d $(sysv_SCRIPTS) defaults 90 10
194 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
195 # update-rc.d netatalk remove
201 # defaults, no init scripts installed
210 uninstall-startup: uninstall-am