35
ifeq ($(DEB_HOST_ARCH), alpha)
38
ifeq ($(DEB_HOST_ARCH), ia64)
33
PATCH_STAMP=debian/stamp-patched
36
dh_testdir debian/patches/series \
37
debian/startpar/patches/series
38
QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push -a || test $$? = 2
39
cd debian/startpar && \
40
QUILT_PATCHES=patches quilt --quiltrc /dev/null push -a || test $$? = 2
44
QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null pop -a -R || test $$? = 2
45
cd debian/startpar && \
46
QUILT_PATCHES=patches quilt --quiltrc /dev/null pop -a -R || test $$? = 2
47
rm -rf .pc debian/startpar/.pc $(PATCH_STAMP)
47
51
# Builds the binary package.
49
53
ifeq ($(DEB_HOST_ARCH_OS),linux)
50
54
$(MAKE) -C src $(CROSS) DISTRO=Debian WITH_SELINUX="yes"
54
58
$(MAKE) $(CROSS) -C debian/startpar
55
59
$(CC) -W -Wall -s -o debian/readlink debian/readlink.c
58
62
# Make a binary package (.deb file)
59
binary-arch: build checkroot
64
69
install -d -o root -g root -m 755 $(tmp)
65
install -d -o root -g root -m 755 $(tmp)/{DEBIAN,etc}
70
install -d -o root -g root -m 755 $(tmp)/DEBIAN
71
install -d -o root -g root -m 755 $(tmp)/etc
66
72
install -d -o root -g root -m 755 $(tmp)/usr/share/sysvinit
67
73
install -d -o root -g root -m 755 $(tmp)/usr/include
68
74
install -d -o root -g root -m 755 $(tmp)$(doc)/sysvinit
91
97
install -o root -g root -m 755 debian/share/update-rc.d \
92
98
$(tmp)/usr/share/sysvinit
93
install -d -o root -g root -m 755 $(tmp)/{bin,sbin,usr}
99
install -d -o root -g root -m 755 $(tmp)/bin
100
install -d -o root -g root -m 755 $(tmp)/sbin
101
install -d -o root -g root -m 755 $(tmp)/usr
94
102
install -d -o root -g root -m 755 $(tmp)/usr/bin
95
103
install -d -o root -g root -m 755 $(tmp)/usr/sbin
96
104
install -d -o root -g root -m 755 $(tmp)/usr/share/man
97
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man{1,5,8}
105
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man1
106
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man5
107
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man8
98
108
$(MAKE) -C src $(CROSS) ROOT=$(tmp) DISTRO=Debian install
99
$(MAKE) $(CROSS) -C debian/startpar DESTDIR=$(tmp) install
100
strip -s -R comment -R .comment $(tmp)/sbin/startpar
101
109
ifeq ($(DEB_HOST_ARCH), hurd-i386)
102
110
# The Hurd has its own halt and reboot commands.
103
111
rm -f $(tmp)/usr/share/man/man8/halt.8
115
125
rm -f $(tmp)/usr/share/man/man1/mountpoint.1
116
126
rm -f $(tmp)/sbin/killall5
117
127
rm -f $(tmp)/sbin/sulogin
128
rm -f $(tmp)/sbin/fstab-decode
129
rm -f $(tmp)/sbin/bootlogd
118
130
rm -f $(tmp)/usr/bin/last
119
131
rm -f $(tmp)/usr/bin/lastb
120
132
rm -f $(tmp)/usr/bin/mesg
121
rm -f $(tmp)/usr/bin/service
133
rm -f $(tmp)/usr/sbin/service
122
134
rm -f $(tmp)/bin/pidof
123
135
rm -f $(tmp)/bin/mountpoint
124
136
rmdir $(tmp)/usr/share/man/man1
126
138
rmdir $(tmp)/usr/bin
128
140
gzip -9f $(tmp)/usr/share/man/man*/*.[0-9]
141
install -d -o root -g root -m 755 $(tmp)/usr/share/lintian/overrides
142
install -o root -g root -m 644 \
143
debian/sysvinit.lintian.overrides \
144
$(tmp)/usr/share/lintian/overrides/sysvinit
129
145
install -o root -g root -m 644 debian/copyright \
130
146
$(tmp)$(doc)/sysvinit/copyright
131
147
cat COPYRIGHT >> $(tmp)$(doc)/sysvinit/copyright
132
148
install -o root -g root -m 755 debian/postinst $(tmp)/DEBIAN/postinst
133
dpkg-shlibdeps src/init debian/startpar/startpar
149
dpkg-shlibdeps src/init
134
150
dpkg-gencontrol -psysvinit -P$(tmp) -isp
151
dh_md5sums -Ninitscripts -Nsysv-rc
135
152
dpkg --build $(tmp) ..
146
163
install -o root -g root -m 644 debian/changelog \
147
164
$(tmp)$(doc)/sysvinit-utils/changelog.Debian
148
165
gzip -9f $(tmp)$(doc)/sysvinit-utils/changelog*
149
install -d -o root -g root -m 755 $(tmp)/{bin,sbin,usr}
166
install -d -o root -g root -m 755 $(tmp)/bin
167
install -d -o root -g root -m 755 $(tmp)/sbin
168
install -d -o root -g root -m 755 $(tmp)/usr
150
169
install -d -o root -g root -m 755 $(tmp)/usr/bin
170
install -d -o root -g root -m 755 $(tmp)/usr/sbin
151
171
install -d -o root -g root -m 755 $(tmp)/usr/share/man
152
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man{1,8}
172
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man1
173
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man8
153
174
install -o root -g root -m 755 src/killall5 $(tmp)/sbin
154
175
install -o root -g root -m 755 src/sulogin $(tmp)/sbin
176
install -o root -g root -m 755 src/fstab-decode $(tmp)/sbin
177
install -o root -g root -m 755 src/bootlogd $(tmp)/sbin
155
178
install -o root -g root -m 755 src/last $(tmp)/usr/bin
156
179
install -o root -g root -m 755 src/mesg $(tmp)/usr/bin
157
install -o root -g root -m 755 src/service $(tmp)/usr/bin
180
$(MAKE) $(CROSS) -C debian/startpar DESTDIR=$(tmp) install
181
strip -s -R comment -R .comment $(tmp)/sbin/startpar
182
install -o root -g root -m 755 debian/service/service $(tmp)/usr/sbin
183
ln -sf /usr/sbin/service $(tmp)/usr/bin
158
184
strip -s -R .comment $(tmp)/sbin/killall5
159
185
strip -s -R .comment $(tmp)/sbin/sulogin
160
186
strip -s -R .comment $(tmp)/usr/bin/last
161
187
strip -s -R .comment $(tmp)/usr/bin/mesg
162
ln -sf ../sbin/killall5 $(tmp)/bin/pidof
188
ln -sf /sbin/killall5 $(tmp)/bin/pidof
163
189
ln -sf last $(tmp)/usr/bin/lastb
164
190
install -o root -g root -m 644 man/killall5.8 $(tmp)/usr/share/man/man8
165
191
install -o root -g root -m 644 man/sulogin.8 $(tmp)/usr/share/man/man8
192
install -o root -g root -m 644 man/bootlogd.8 $(tmp)/usr/share/man/man8
166
193
install -o root -g root -m 644 man/last.1 $(tmp)/usr/share/man/man1
167
194
install -o root -g root -m 644 man/lastb.1 $(tmp)/usr/share/man/man1
168
195
install -o root -g root -m 644 man/mesg.1 $(tmp)/usr/share/man/man1
169
install -o root -g root -m 644 man/service.8 $(tmp)/usr/share/man/man8
196
install -o root -g root -m 644 debian/service/service.8 $(tmp)/usr/share/man/man8
170
197
install -o root -g root -m 644 man/pidof.8 $(tmp)/usr/share/man/man8
198
install -o root -g root -m 644 man/fstab-decode.8 $(tmp)/usr/share/man/man8
171
199
gzip -9f $(tmp)/usr/share/man/man*/*.[0-9]
172
200
install -o root -g root -m 644 debian/copyright \
173
201
$(tmp)$(doc)/sysvinit-utils/copyright
174
202
cat COPYRIGHT >> $(tmp)$(doc)/sysvinit-utils/copyright
175
dpkg-shlibdeps src/init
203
dpkg-shlibdeps src/init debian/startpar/startpar
176
204
dpkg-gencontrol -psysvinit-utils -P$(tmp) -isp
205
dh_md5sums -Ninitscripts -Nsysv-rc
177
206
dpkg --build $(tmp) ..
183
212
install -d -o root -g root -m 755 $(tmp)
184
install -d -o root -g root -m 755 $(tmp)/{DEBIAN,sbin,lib,etc}
185
ifeq ($(DEB_HOST_ARCH_OS),linux)
213
install -d -o root -g root -m 755 $(tmp)/DEBIAN
214
install -d -o root -g root -m 755 $(tmp)/sbin
215
install -d -o root -g root -m 755 $(tmp)/lib
216
install -d -o root -g root -m 755 $(tmp)/etc
217
ifneq (,$(findstring $(DEB_HOST_ARCH_OS),linux kfreebsd))
186
218
install -d -o root -g root -m 755 $(tmp)/sys
188
220
install -d -o root -g root -m 755 $(tmp)/lib/init
227
259
gzip -9f $(tmp)/usr/share/man/man*/*.[0-9]
228
260
install -d -o root -g root -m 755 $(tmp)/usr/share/lintian/overrides
229
261
install -o root -g root -m 644 \
230
debian/initscripts/lintian.overrides \
262
debian/initscripts.lintian.overrides \
231
263
$(tmp)/usr/share/lintian/overrides/initscripts
232
install -o root -g root -m 644 debian/initscripts/copyright \
264
install -o root -g root -m 644 debian/initscripts.copyright \
233
265
$(tmp)$(doc)/initscripts/copyright
234
install -o root -g root -m 755 debian/initscripts/preinst $(tmp)/DEBIAN
235
install -o root -g root -m 755 debian/initscripts/postinst $(tmp)/DEBIAN
236
install -o root -g root -m 755 debian/initscripts/postrm $(tmp)/DEBIAN
237
install -o root -g root -m 644 debian/initscripts/conffiles \
266
install -o root -g root -m 755 debian/initscripts.preinst $(tmp)/DEBIAN/preinst
267
install -o root -g root -m 755 debian/initscripts.postinst $(tmp)/DEBIAN/postinst
268
install -o root -g root -m 755 debian/initscripts.postrm $(tmp)/DEBIAN/postrm
269
install -o root -g root -m 644 debian/initscripts.conffiles \
238
270
$(tmp)/DEBIAN/conffiles
239
271
dpkg-shlibdeps debian/readlink
240
272
sh debian/deps-mount >> debian/substvars
241
273
sh debian/deps-glibc >> debian/substvars
242
274
dpkg-gencontrol -pinitscripts -P$(tmp) -isp
275
dh_md5sums -Ninitscripts -Nsysv-rc
243
276
dpkg --build $(tmp) ..
247
279
# Architecture independant files.
248
binary-indep: build checkroot
250
282
# sysv-rc package
253
install -d -o root -g root -m 755 $(tmp)/{DEBIAN,etc}
285
install -d -o root -g root -m 755 $(tmp)/DEBIAN
286
install -d -o root -g root -m 755 $(tmp)/etc
254
287
install -d -o root -g root -m 755 $(tmp)/usr/share
255
288
install -d -o root -g root -m 755 $(tmp)$(doc)/sysv-rc
289
install -d -o root -g root -m 755 $(tmp)/usr/share/sysv-rc
290
install -d -o root -g root -m 755 $(tmp)/var/lib/insserv
291
install -d -o root -g root -m 755 $(tmp)/var/lib/update-rc.d
256
292
install -o root -g root -m 644 debian/sysv-rc/doc/* $(tmp)$(doc)/sysv-rc
257
293
sed -ne '/sysvinit (2.84-3)/q' -e p < debian/changelog \
258
294
> $(tmp)$(doc)/sysv-rc/changelog.Debian
259
295
chmod 644 $(tmp)$(doc)/sysv-rc/changelog.Debian
260
296
gzip -9f $(tmp)$(doc)/sysv-rc/*
261
install -d -o root -g root -m 755 $(tmp)/etc/rc{2,3,4,5}.d
262
297
cp -af debian/sysv-rc/etc/* $(tmp)/etc
263
298
for N in 2 3 4 5 ; do \
299
install -d -o root -g root -m 755 $(tmp)/etc/rc$${N}.d ; \
264
300
install -o root -g root -m 644 debian/sysv-rc/rc2-5.d-README \
265
301
$(tmp)/etc/rc$${N}.d/README ; \
270
306
chown -R root:root $(tmp)/etc
271
307
install -d -o root -g root -m 755 $(tmp)/usr/sbin
272
308
install -d -o root -g root -m 755 $(tmp)/usr/share/man/man8
273
install -d -o root -g root -m 755 $(tmp)/usr/share/man/ja/man8
274
install -d -o root -g root -m 755 $(tmp)/usr/share/man/fr/man8
275
install -d -o root -g root -m 755 $(tmp)/usr/share/man/es/man8
309
# install -d -o root -g root -m 755 $(tmp)/usr/share/man/ja/man8
310
# install -d -o root -g root -m 755 $(tmp)/usr/share/man/fr.UTF-8/man8
311
# install -d -o root -g root -m 755 $(tmp)/usr/share/man/es/man8
276
312
install -o root -g root -m 644 debian/sysv-rc/man8/*.8 \
277
313
$(tmp)/usr/share/man/man8
278
install -o root -g root -m 644 debian/sysv-rc/man8/ja/*.8 \
279
$(tmp)/usr/share/man/ja/man8
280
install -o root -g root -m 644 debian/sysv-rc/man8/fr/*.8 \
281
$(tmp)/usr/share/man/fr/man8
282
install -o root -g root -m 644 debian/sysv-rc/man8/es/*.8 \
283
$(tmp)/usr/share/man/es/man8
314
# install -o root -g root -m 644 debian/sysv-rc/man8/ja/*.8 \
315
# $(tmp)/usr/share/man/ja/man8
316
# install -o root -g root -m 644 debian/sysv-rc/man8/fr.UTF-8/*.8 \
317
# $(tmp)/usr/share/man/fr.UTF-8/man8
318
# install -o root -g root -m 644 debian/sysv-rc/man8/es/*.8 \
319
# $(tmp)/usr/share/man/es/man8
284
320
install -o root -g root -m 755 debian/sysv-rc/sbin/invoke-rc.d $(tmp)/usr/sbin
285
321
install -o root -g root -m 755 debian/sysv-rc/sbin/update-rc.d $(tmp)/usr/sbin
286
gzip -9f $(tmp)/usr/share/man/man*/*.[0-9] \
287
$(tmp)/usr/share/man/??/man*/*.[0-9]
322
gzip -9f $(tmp)/usr/share/man/man*/*.[0-9]
323
# gzip -9f $(tmp)/usr/share/man/??/man*/*.[0-9]
324
# gzip -9f $(tmp)/usr/share/man/??.*/man*/*.[0-9]
288
325
install -d -o root -g root -m 755 $(tmp)/usr/share/lintian/overrides
289
326
install -o root -g root -m 644 \
290
debian/sysv-rc/lintian.overrides \
327
debian/sysv-rc.lintian.overrides \
291
328
$(tmp)/usr/share/lintian/overrides/sysv-rc
292
install -o root -g root -m 644 debian/sysv-rc/copyright \
329
install -o root -g root -m 644 debian/sysv-rc.copyright \
293
330
$(tmp)$(doc)/sysv-rc/copyright
294
install -o root -g root -m 755 debian/sysv-rc/postrm $(tmp)/DEBIAN/postrm
331
po2debconf debian/sysv-rc.templates > $(tmp)/DEBIAN/templates
332
for f in preinst postinst prerm postrm ; do \
333
install -o root -g root -m 755 debian/sysv-rc.$$f $(tmp)/DEBIAN/$$f ; \
335
install -o root -g root -m 755 debian/sysv-rc/saveconfig \
336
$(tmp)/usr/share/sysv-rc/saveconfig
295
337
dpkg-gencontrol -psysv-rc -P$(tmp) -isp
338
dh_md5sums -Ninitscripts -Nsysv-rc
296
339
dpkg --build $(tmp) ..
299
342
# sysvutils transitional package
343
# keep until after next LTS
300
344
install -d $(tmp)/DEBIAN
301
345
dpkg-gencontrol -psysvutils -P$(tmp) -isp
302
346
dpkg --build $(tmp) ..
305
clean: checkroot unpatch
306
351
$(MAKE) -C src clobber
307
352
$(MAKE) -C debian/startpar clean
308
rm -f build debian/files debian/substvars debian/readlink
310
find . -name '*.bak' -o -name '*~' | xargs -r rm -f --
353
$(MAKE) -f debian/rules unpatch
354
dh_clean -Xdebian/initscripts -Xdebian/sysv-rc \
355
build-stamp debian/readlink
312
357
binary: binary-arch binary-indep
316
test root = "`whoami`"
319
version=`dpkg-parsechangelog | grep Version: | awk '{print $$2}'`; \
320
rm -rf ../sysvinit-$$version; \
321
svn export . ../sysvinit-$$version; \
322
cp debian/changelog ../sysvinit-$$version/debian/changelog; \
323
chmod -R a-s ../sysvinit-$$version; \
324
(cd ../sysvinit-$$version && debuild $(DEBUILDFLAGS))
326
.PHONY: binary binary-arch binary-indep clean checkroot
328
include /usr/share/dpatch/dpatch.make
359
.PHONY: binary binary-arch binary-indep clean