]> arthur.barton.de Git - netatalk.git/blob - distrib/initscripts/Makefile.am
5c44fb9fe4aaacb18256b647990720ef4aa7dd29
[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
29 TEMPLATES = \
30         rc.afpd.netbsd.tmpl             \
31         rc.atalk.redhat.tmpl            \
32         rc.atalk.tru64.tmpl             \
33         rc.atalk.bsd.tmpl               \
34         rc.atalkd.netbsd.tmpl           \
35         rc.atalk.suse.tmpl              \
36         rc.cnid_metad.netbsd.tmpl       \
37         rc.papd.netbsd.tmpl             \
38         rc.timelord.netbsd.tmpl         \
39         rc.atalk.sysv.tmpl
40
41 CLEANFILES = $(GENERATED_FILES) atalk afpd atalkd papd timelord
42 EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt
43
44
45 #
46 # checking for "redhat" style sysv scripts:
47 #
48
49 if USE_REDHAT
50
51 sysvdir = /etc/rc.d/init.d
52 sysv_SCRIPTS = atalk
53
54 atalk: rc.atalk.redhat
55         cp -f rc.atalk.redhat atalk
56         chmod a+x atalk
57
58 install-data-hook:
59         -chkconfig --add atalk
60
61 uninstall:
62         -chkconfig --del atalk
63         rm -f /etc/rc.d/init.d/atalk
64
65 endif
66
67 #
68 # checking for "SuSE" style sysv scripts:
69 #
70
71 if USE_SUSE
72
73 sysvdir = /etc/init.d
74 sysv_SCRIPTS = atalk
75
76 atalk: rc.atalk.suse
77         cp -f rc.atalk.suse atalk
78         chmod a+x atalk
79
80 install-data-hook:
81         -insserv atalk
82
83 uninstall:
84         -insserv -d atalk
85         rm -f /etc/init.d/atalk
86
87 endif
88
89 #
90 #
91 # checking for "cobalt" style sysv scripts:
92 #
93
94 if USE_COBALT
95
96 sysvdir = /etc/rc.d/init.d
97 sysv_SCRIPTS = atalk
98
99 atalk: rc.atalk.cobalt
100         cp -f rc.atalk.cobalt atalk
101         chmod a+x atalk
102
103 endif
104
105 #
106 # checking for "tru64" style sysv scripts:
107 #
108
109 if USE_TRU64
110
111 sysvdir = /sbin/init.d
112 sysv_SCRIPTS = atalk
113
114 atalk: rc.atalk.tru64
115         cp -f rc.atalk.tru64 atalk
116         chmod a+x atalk
117
118 endif
119
120 #
121 # checking for NetBSD init scripts
122 #
123
124 if USE_NETBSD
125
126 sysvdir = /etc/rc.d
127 sysv_SCRIPTS = afpd atalkd papd timelord
128
129 afpd: rc.afpd.netbsd
130         cp -f $< $@
131
132 atalkd: rc.atalkd.netbsd
133         cp -f $< $@
134         chmod a+x $@
135
136 papd: rc.papd.netbsd
137         cp -f $< $@
138         chmod a+x $@
139
140 timelord: rc.timelord.netbsd
141         cp -f $< $@
142         chmod a+x $@
143
144 endif
145
146 #
147 # checking for Solaris init scripts
148 #
149
150 if USE_SOLARIS
151
152 sysvdir = /etc/init.d
153 sysv_SCRIPTS = atalk
154
155 atalk: rc.atalk.sysv
156         cp -f rc.atalk.sysv $@
157         chmod a+x $@
158
159 install-data-hook:
160         rm -f /etc/rc2.d/S90atalk
161         -ln -s ../init.d/atalk /etc/rc2.d/S90atalk
162         rm -f /etc/rc0.d/K04atalk
163         -ln -s ../init.d/atalk /etc/rc0.d/K04atalk
164
165 uninstall-hook:
166         rm -f /etc/rc2.d/S90atalk /etc/rc0.d/K04atalk
167
168 endif