]> arthur.barton.de Git - netatalk.git/blob - distrib/initscripts/Makefile.am
add rc-update for Gentoo
[netatalk.git] / distrib / initscripts / Makefile.am
1 ## Makefile for distrib/initscripts/
2
3 SUFFIXES = .tmpl .
4
5 pkgconfdir = @PKGCONFDIR@
6
7 #
8 # Template Generation
9 #
10
11 .tmpl:
12         sed -e s@:BINDIR:@${bindir}@ \
13             -e s@:SBINDIR:@${sbindir}@ \
14             -e s@:ETCDIR:@${pkgconfdir}@ \
15             <$< >$@
16
17 GENERATED_FILES = \
18         rc.afpd.netbsd          \
19         rc.atalk.redhat         \
20         rc.atalk.tru64          \
21         rc.atalk.bsd            \
22         rc.atalkd.netbsd        \
23         rc.atalk.suse           \
24         rc.cnid_metad.netbsd    \
25         rc.papd.netbsd          \
26         rc.timelord.netbsd      \
27         rc.atalk.sysv           \
28         rc.atalk.gentoo
29
30 TEMPLATES = \
31         rc.afpd.netbsd.tmpl             \
32         rc.atalk.redhat.tmpl            \
33         rc.atalk.tru64.tmpl             \
34         rc.atalk.bsd.tmpl               \
35         rc.atalkd.netbsd.tmpl           \
36         rc.atalk.suse.tmpl              \
37         rc.cnid_metad.netbsd.tmpl       \
38         rc.papd.netbsd.tmpl             \
39         rc.timelord.netbsd.tmpl         \
40         rc.atalk.sysv.tmpl              \
41         rc.atalk.gentoo.tmpl
42
43 CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd papd timelord
44 EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt
45
46
47 #
48 # checking for "redhat" style sysv scripts:
49 #
50
51 if USE_REDHAT
52
53 sysvdir = /etc/rc.d/init.d
54 sysv_SCRIPTS = atalk
55
56 atalk: rc.atalk.redhat
57         cp -f rc.atalk.redhat atalk
58         chmod a+x atalk
59
60 install-data-hook:
61         -chkconfig --add atalk
62
63 uninstall:
64         -chkconfig --del atalk
65         rm -f /etc/rc.d/init.d/atalk
66
67 endif
68
69 #
70 # checking for "SuSE" style sysv scripts:
71 #
72
73 if USE_SUSE
74
75 sysvdir = /etc/init.d
76 sysv_SCRIPTS = atalk
77
78 atalk: rc.atalk.suse
79         cp -f rc.atalk.suse atalk
80         chmod a+x atalk
81
82 install-data-hook:
83         -insserv atalk
84
85 uninstall:
86         -insserv -d atalk
87         rm -f /etc/init.d/atalk
88
89 endif
90
91 #
92 #
93 # checking for "cobalt" style sysv scripts:
94 #
95
96 if USE_COBALT
97
98 sysvdir = /etc/rc.d/init.d
99 sysv_SCRIPTS = atalk
100
101 atalk: rc.atalk.cobalt
102         cp -f rc.atalk.cobalt atalk
103         chmod a+x atalk
104
105 install-data-hook:
106
107 uninstall-hook:
108
109 endif
110
111 #
112 # checking for "tru64" style sysv scripts:
113 #
114
115 if USE_TRU64
116
117 sysvdir = /sbin/init.d
118 sysv_SCRIPTS = atalk
119
120 atalk: rc.atalk.tru64
121         cp -f rc.atalk.tru64 atalk
122         chmod a+x atalk
123
124 install-data-hook:
125
126 uninstall-hook:
127
128 endif
129
130 #
131 # checking for NetBSD init scripts
132 #
133
134 if USE_NETBSD
135
136 sysvdir = /etc/rc.d
137 sysv_SCRIPTS = afpd atalkd papd timelord
138
139 afpd: rc.afpd.netbsd
140         cp -f $< $@
141
142 atalkd: rc.atalkd.netbsd
143         cp -f $< $@
144         chmod a+x $@
145
146 papd: rc.papd.netbsd
147         cp -f $< $@
148         chmod a+x $@
149
150 timelord: rc.timelord.netbsd
151         cp -f $< $@
152         chmod a+x $@
153
154 install-data-hook:
155
156 uninstall-hook:
157
158 endif
159
160 #
161 # checking for Solaris init scripts
162 #
163
164 if USE_SOLARIS
165
166 sysvdir = /etc/init.d
167 sysv_SCRIPTS = atalk
168
169 atalk: rc.atalk.sysv
170         cp -f rc.atalk.sysv $@
171         chmod a+x $@
172
173 install-data-hook:
174         rm -f /etc/rc2.d/S90atalk
175         -ln -s ../init.d/atalk /etc/rc2.d/S90atalk
176         rm -f /etc/rc0.d/K04atalk
177         -ln -s ../init.d/atalk /etc/rc0.d/K04atalk
178
179 uninstall-hook:
180         rm -f /etc/rc2.d/S90atalk /etc/rc0.d/K04atalk
181
182 endif
183
184 if USE_GENTOO
185
186 sysvdir = /etc/init.d
187 sysv_SCRIPTS = atalk
188
189 atalk: rc.atalk.gentoo
190         cp -f rc.atalk.gentoo atalk
191         chmod a+x atalk
192
193 install-data-hook:
194         -rc-update add atalk default
195
196 uninstall:
197         -rc-update del atalk default
198         rm -f /etc/init.d/atalk
199
200 endif
201
202
203 if USE_UNDEF
204
205 install-data-hook:
206
207 uninstall-hook:
208
209 endif