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}@ \
37 service.systemd.tmpl \
40 CLEANFILES = $(GENERATED_FILES) $(sysv_SCRIPTS) $(service_DATA) afpd cnid_metad
41 EXTRA_DIST = $(TEMPLATES)
42 noinst_DATA = $(GENERATED_FILES)
44 # overwrite automake uninstall
45 # not beautiful, but this way we can call the OS specific init script
46 # tools, like chkconfig, insserv or rc-update
48 uninstall: uninstall-startup
51 # checking for "redhat" style sysv scripts:
56 sysvdir = /etc/rc.d/init.d
57 sysv_SCRIPTS = netatalk
59 $(sysv_SCRIPTS): rc.redhat
60 cp -f rc.redhat $(sysv_SCRIPTS)
61 chmod a+x $(sysv_SCRIPTS)
64 -chkconfig --add $(sysv_SCRIPTS)
67 -chkconfig --del $(sysv_SCRIPTS)
68 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
73 # checking for general systemd scripts:
78 servicedir = /lib/systemd/system
79 service_DATA = netatalk.service
81 netatalk.service: service.systemd
82 cp -f service.systemd netatalk.service
85 -systemctl daemon-reload
88 -systemctl disable $(service_DATA)
89 rm -f $(DESTDIR)$(servicedir)/netatalk.service
90 -systemctl daemon-reload
95 # checking for "SuSE" style sysv scripts:
100 sysvdir = /etc/init.d
101 sysv_SCRIPTS = netatalk
103 $(sysv_SCRIPTS): rc.suse
104 cp -f rc.suse $(sysv_SCRIPTS)
105 chmod a+x $(sysv_SCRIPTS)
108 -insserv $(sysv_SCRIPTS)
111 -insserv -d $(sysv_SCRIPTS)
112 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
117 # checking for NetBSD init scripts
123 sysv_SCRIPTS = netatalk
133 uninstall-startup: uninstall-am
138 # checking for Solaris init scripts
143 servicedir = /lib/svc/manifest/network/
144 service_DATA = netatalk.xml
147 svccfg import netatalk.xml
150 svccfg delete network/netatalk
155 # checking for "Gentoo" style sysv scripts:
160 sysvdir = /etc/init.d
161 sysv_SCRIPTS = netatalk
163 $(sysv_SCRIPTS): rc.gentoo
164 cp -f rc.gentoo $(sysv_SCRIPTS)
165 chmod a+x $(sysv_SCRIPTS)
168 # -rc-update add $(sysv_SCRIPTS) default
171 # -rc-update del $(sysv_SCRIPTS) default
172 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
177 # checking for "Debian" style sysv scripts:
182 sysvdir = /etc/init.d
183 sysv_SCRIPTS = netatalk
185 $(sysv_SCRIPTS): rc.debian
186 cp -f rc.debian $(sysv_SCRIPTS)
187 chmod a+x $(sysv_SCRIPTS)
190 # update-rc.d $(sysv_SCRIPTS) defaults 90 10
193 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
194 # update-rc.d netatalk remove
200 # defaults, no init scripts installed
209 uninstall-startup: uninstall-am