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)
43 # overwrite automake uninstall
44 # not beautiful, but this way we can call the OS specific init script
45 # tools, like chkconfig, insserv or rc-update
47 uninstall: uninstall-startup
50 # checking for "redhat" style sysv scripts:
55 sysvdir = /etc/rc.d/init.d
56 sysv_SCRIPTS = netatalk
58 $(sysv_SCRIPTS): rc.redhat
59 cp -f rc.redhat $(sysv_SCRIPTS)
60 chmod a+x $(sysv_SCRIPTS)
63 -chkconfig --add $(sysv_SCRIPTS)
66 -chkconfig --del $(sysv_SCRIPTS)
67 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
72 # checking for general systemd scripts:
77 servicedir = /lib/systemd/system
78 service_DATA = netatalk.service
80 netatalk.service: service.systemd
81 cp -f service.systemd netatalk.service
84 -systemctl daemon-reload
87 -systemctl disable $(service_DATA)
88 rm -f $(DESTDIR)$(servicedir)/netatalk.service
89 -systemctl daemon-reload
94 # checking for "SuSE" style sysv scripts:
100 sysv_SCRIPTS = netatalk
102 $(sysv_SCRIPTS): rc.suse
103 cp -f rc.suse $(sysv_SCRIPTS)
104 chmod a+x $(sysv_SCRIPTS)
107 -insserv $(sysv_SCRIPTS)
110 -insserv -d $(sysv_SCRIPTS)
111 rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
116 # checking for NetBSD init scripts
122 sysv_SCRIPTS = netatalk
132 uninstall-startup: uninstall-am
137 # checking for Solaris init scripts
142 servicedir = /lib/svc/manifest/network/
143 service_DATA = netatalk.xml
146 svccfg import netatalk.xml
149 svccfg delete network/netatalk
154 # checking for "Gentoo" style sysv scripts:
159 sysvdir = /etc/init.d
160 sysv_SCRIPTS = netatalk
162 $(sysv_SCRIPTS): rc.gentoo
163 cp -f rc.gentoo $(sysv_SCRIPTS)
164 chmod a+x $(sysv_SCRIPTS)
167 # -rc-update add $(sysv_SCRIPTS) default
170 # -rc-update del $(sysv_SCRIPTS) default
171 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
176 # checking for "Debian" style sysv scripts:
181 sysvdir = /etc/init.d
182 sysv_SCRIPTS = netatalk
184 $(sysv_SCRIPTS): rc.debian
185 cp -f rc.debian $(sysv_SCRIPTS)
186 chmod a+x $(sysv_SCRIPTS)
189 # update-rc.d $(sysv_SCRIPTS) defaults 90 10
192 # rm -f $(DESTDIR)$(sysvdir)/$(sysv_SCRIPTS)
193 # update-rc.d netatalk remove
199 # defaults, no init scripts installed
208 uninstall-startup: uninstall-am