]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - debian/rules
Merge branch 'maint' into next
[thirdparty/e2fsprogs.git] / debian / rules
1 #! /usr/bin/make -f
2 # -*- makefile -*-
3 #
4 # Invoke each target with `./debian/rules <target>'. All targets should be
5 # invoked with the package root as the current directory.
6 #
7 # The `binary' target must be run as root, as it needs to install files with
8 # specific ownerships.
9
10 -include debian/rules.custom
11
12 export DEB_BUILD_MAINT_OPTIONS ?= hardening=+all
13
14 # be paranoid
15 export LC_ALL ?= C
16
17 # These are used for cross-compiling and for saving the configure script
18 # from having to guess our platform (since we know it already)
19 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
20 DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
21 DEB_HOST_OS ?= $(shell dpkg-architecture -qDEB_HOST_OS)
22 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
23 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
24 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
25 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
26
27 # Allow distro-specific behaviour
28 DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian)
29
30 ifeq ($(DEB_HOST_ARCH_OS), hurd)
31 SKIP_FUSE2FS=yes
32 endif
33
34 DH_VERSION := $(shell dpkg-query -W -f '$${Version}' debhelper)
35
36 # USE_DBGSYM :=
37 USE_DBGSYM ?= $(shell if dpkg --compare-versions $(DH_VERSION) ">=" 9.20160114 ; then echo yes ; fi)
38
39 ifeq ($(USE_DBGSYM),yes)
40 dh_strip_args = -p$(1) --dbgsym-migration='$(1)-dbg (<= 1.43-1)'
41 dh_strip_args2 = -p$(1) --dbgsym-migration='$(2)-dbg (<= 1.43-1)'
42 else
43 dh_strip_args = -p$(1) --dbg-package=$(1)-dbg
44 dh_strip_args2 = -p$(1) --dbg-package=$(2)-dbg
45 endif
46 # find the version for the main package, from changelog file
47 MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
48 # find versions for libraries going into their own packages, from their Makefile.in's,
49 # and sonames for all libs
50 COMERR_VERSION ?= $(shell grep ELF_VERSION lib/et/Makefile.in | cut '-d ' -f3)
51 COMERR_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/et/Makefile.in | cut '-d ' -f3)
52 SS_VERSION ?= $(shell grep ELF_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
53 SS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ss/Makefile.in | cut '-d ' -f3)
54
55 EXT2FS_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/ext2fs/Makefile.in | cut '-d ' -f3)
56 E2P_SOVERSION ?= $(shell grep ELF_SO_VERSION lib/e2p/Makefile.in | cut '-d ' -f3)
57
58 package ?= e2fsprogs
59
60 topdir ?= $(shell pwd)
61 debdir ?= ${topdir}/debian
62 tmpdir ?= ${debdir}/tmp
63 udebdir ?= ${debdir}/e2fsprogs-udeb
64 libcomerrdir ?= ${debdir}/libcomerr${COMERR_SOVERSION}
65 comerrdevdir ?= ${debdir}/comerr-dev
66 libcomerrdbgdir ?= ${debdir}/libcomerr2-dbg
67 libssdir ?= ${debdir}/libss${SS_SOVERSION}
68 ssdevdir ?= ${debdir}/ss-dev
69 libssdbgdir ?= ${debdir}/libss2-dbg
70 libext2dir ?= ${debdir}/e2fslibs
71 libext2devdir ?= ${debdir}/e2fslibs-dev
72 libext2dbgdir ?= ${debdir}/e2fslibs-dbg
73 maindir ?= ${debdir}/e2fsprogs
74 e2fsckstaticdir ?= ${debdir}/e2fsck-static
75 debugdir ?= ${debdir}/e2fsprogs-dbg
76 stdbuilddir ?= ${debdir}/BUILD-STD
77 # docdir ?= ${maindir}/usr/share/doc/${package}
78 MANDIR ?= /usr/share/man
79 mandir ?= ${tmpdir}${MANDIR}
80
81 UDEB_NAME ?= $(package)-udeb_$(MAIN_VERSION)_$(DEB_HOST_ARCH).udeb
82 UDEB_PRIORITY ?= $(shell grep '^Package: e2fsprogs-udeb' debian/control.in -A 10 | grep ^Priority: | cut -d ' ' -f 2)
83
84 STAMPSDIR ?= debian/stampdir
85 CFGSTDSTAMP ?= ${STAMPSDIR}/configure-std-stamp
86 CFGBFSTAMP ?= ${STAMPSDIR}/configure-bf-stamp
87 BUILDSTDSTAMP ?= ${STAMPSDIR}/build-std-stamp
88 BUILDBFSTAMP ?= ${STAMPSDIR}/build-bf-stamp
89
90 INSTALL ?= install
91 INSTALL_PROGRAM ?= $(INSTALL) -p -o root -g root -m 0755
92
93 #ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
94 #INSTALL_PROGRAM += -s
95 #endif
96
97 ifneq (,$(findstring update-symbols,$(DEB_BUILD_OPTIONS)))
98 SYMBOL_LIBS := e2fslibs libcomerr2 libss2
99 endif
100
101 DEFAULT_CFLAGS ?= -g -O2
102 DEFAULT_LDFLAGS ?= -Wl,-Bsymbolic-functions
103
104 CFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
105 DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \
106 dpkg-buildflags --get CFLAGS; else echo $(DEFAULT_CFLAGS) ; fi)
107 LDFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
108 DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \
109 dpkg-buildflags --get LDFLAGS; else echo $(DEFAULT_LDFLAGS) ; fi)
110 CPPFLAGS ?= $(shell if dpkg-buildflags > /dev/null 2>&1 ; then \
111 DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) \
112 dpkg-buildflags --get CPPFLAGS; fi)
113
114 ifeq (${DEB_HOST_ARCH},alpha)
115 CFLAGS += -DHAVE_NETINET_IN_H
116 else
117 CFLAGS += -D__NO_STRING_INLINES
118 endif
119
120 E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
121
122 CFLAGS_SHLIB = $(CFLAGS)
123 CFLAGS_STLIB = $(CFLAGS)
124 LDFLAGS_SHLIB = $(LDFLAGS)
125 LDFLAGS_STATIC = $(filter-out -fPIE -fpie -pie,$(LDFLAGS))
126
127 ifneq ($(SKIP_UDEB),)
128 SKIP_BF ?= yes
129 endif
130
131 ifeq ($(SKIP_BF),yes)
132 BUILD_BF =
133 bfbuilddir ?= ${stdbuilddir}
134 else
135 BUILD_BF = build-bf
136 bfbuilddir ?= ${debdir}/BUILD-BF
137 endif
138
139 BF_CFLAGS = -Os -fomit-frame-pointer
140
141 UTIL_CONF_FLAGS ?= --disable-fsck --disable-libblkid \
142 --disable-libuuid --disable-uuidd
143
144 ifneq ($(SKIP_FUSE2FS),)
145 UTIL_CONF_FLAGS += --disable-fuse2fs
146 endif
147
148 BACKTRACE_CONF_FLAGS ?= $(shell if ${debdir}/scripts/test-backtrace ; then echo --disable-backtrace ; fi)
149
150 COMMON_CONF_FLAGS = --disable-e2initrd-helper \
151 --infodir=/usr/share/info --enable-symlink-install \
152 --with-multiarch=$(DEB_HOST_MULTIARCH) \
153 $(BACKTRACE_CONF_FLAGS) $(UTIL_CONF_FLAGS)
154
155 STD_CONF_FLAGS ?= --enable-elf-shlibs
156
157 BF_CONF_FLAGS ?= --enable-elf-shlibs --disable-nls --disable-imager \
158 --disable-testio-debug --disable-uuidd --disable-tls \
159 --disable-tdb --disable-debugfs
160
161 M4_ARGS=
162 DBG_PACKAGES=
163
164 ifeq ($(USE_DBGSYM),yes)
165 M4_ARGS+=-DUSE_DBGSYM
166 else
167 DBG_PACKAGES += -pe2fsprogs-dbg -pe2fslibs-dbg -plibcomerr2-dbg -plibss2-dbg
168 M4_ARGS+=-UUSE_DBGSYM
169 endif
170
171 ifneq ($(BUILD_E2FSCK_STATIC),no)
172 M4_ARGS+=-DE2FSCK_STATIC
173 else
174 M4_ARGS+=-UE2FSCK_STATIC
175 endif
176
177 ifeq ($(SKIP_UDEB),)
178 INSTALL_UDEB = install-udeb
179 M4_ARGS+=-DUDEB_PKGS
180 else
181 M4_ARGS+=-UUDEB_PKGS
182 endif
183
184 debian-files: debian/control
185
186 mrproper: clean
187 rm debian/control
188
189 debian/control: debian/control.in debian/rules
190 m4 $(M4_ARGS) < debian/control.in | grep -v ^REMOVE_ME$$ > $@
191
192 ${CFGSTDSTAMP}:
193 dh_testdir
194 if which dh_update_autotools_config > /dev/null 2>&1 ; then \
195 dh_update_autotools_config ;\
196 fi
197
198 # Make sure we don't try to rebuild the configure scripts
199 find . -name configure | xargs touch
200
201 mkdir -p ${stdbuilddir}
202 ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
203 cd ${stdbuilddir} && AWK=/usr/bin/awk \
204 ../../configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
205 ${EXTRA_CONF_FLAGS} CFLAGS="${CFLAGS}" CPPFLAGS="$(CPPFLAGS)" \
206 LDFLAGS="$(LDFLAGS)" CFLAGS_SHLIB="$(CFLAGS_SHLIB)" \
207 CFLAGS_STLIB="$(CFLAGS_STLIB)" \
208 LDFLAGS_SHLIB="$(LDFLAGS_SHLIB)" \
209 LDFLAGS_STATIC="$(LDFLAGS_STATIC)"
210 else
211 cd ${stdbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
212 ../../configure ${COMMON_CONF_FLAGS} ${STD_CONF_FLAGS} \
213 ${EXTRA_CONF_FLAGS} --build=$(DEB_BUILD_GNU_TYPE) \
214 --host=$(DEB_HOST_GNU_TYPE) CFLAGS="${CFLAGS}" \
215 CPPFLAGS="$(CPPFLAGS)" CFLAGS_SHLIB="$(CFLAGS_SHLIB)" \
216 CFLAGS_STLIB="$(CFLAGS_STLIB)" \
217 LDFLAGS="$(LDFLAGS)" \
218 LDFLAGS_SHLIB="$(LDFLAGS_SHLIB)" \
219 LDFLAGS_STATIC="$(LDFLAGS_STATIC)"
220 endif
221
222 mkdir -p ${STAMPSDIR}
223 touch ${CFGSTDSTAMP}
224
225 ${CFGBFSTAMP}:
226 dh_testdir
227 if which dh_update_autotools_config > /dev/null 2>&1 ; then \
228 dh_update_autotools_config ;\
229 fi
230 rm -f config.cache
231
232 mkdir -p ${bfbuilddir}
233 ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
234 cd ${bfbuilddir} && AWK=/usr/bin/awk \
235 ../../configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
236 ${EXTRA_CONF_FLAGS} CFLAGS="${CFLAGS} ${BF_CFLAGS}" \
237 CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
238 CFLAGS_SHLIB="$(CFLAGS_SHLIB)" \
239 CFLAGS_STLIB="$(CFLAGS_STLIB)" \
240 LDFLAGS_SHLIB="$(LDFLAGS_SHLIB)" \
241 LDFLAGS_STATIC="$(LDFLAGS_STATIC)"
242 else
243 cd ${bfbuilddir} && AWK=/usr/bin/awk CC="${DEB_HOST_GNU_TYPE}-gcc" \
244 ../../configure ${COMMON_CONF_FLAGS} ${BF_CONF_FLAGS} \
245 ${EXTRA_CONF_FLAGS} --build=$(DEB_BUILD_GNU_TYPE) \
246 --host=$(DEB_HOST_GNU_TYPE) CFLAGS="${CFLAGS}" \
247 CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
248 CFLAGS_SHLIB="$(CFLAGS_SHLIB)" \
249 CFLAGS_STLIB="$(CFLAGS_STLIB)" \
250 LDFLAGS_SHLIB="$(LDFLAGS_SHLIB)" \
251 LDFLAGS_STATIC="$(LDFLAGS_STATIC)"
252 endif
253 mkdir -p ${STAMPSDIR}
254 touch ${CFGBFSTAMP}
255
256 build-arch: build
257 build-indep: build
258 build: build-std $(BUILD_BF)
259
260 build-std: ${BUILDSTDSTAMP}
261 ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
262 dh_testdir
263 $(MAKE) -C ${stdbuilddir} V=1 all
264 ifneq ($(BUILD_E2FSCK_STATIC),no)
265 $(MAKE) -C ${stdbuilddir}/e2fsck V=1 e2fsck.static
266 endif
267 if ! test -d debian/orig-gmo ; then \
268 mkdir debian/orig-gmo ; \
269 mv po/*.gmo po/*.po debian/orig-gmo ; \
270 cp debian/orig-gmo/*.po po ; \
271 fi
272 $(MAKE) -C ${stdbuilddir}/po V=1 update-gmo
273
274 ( cd ${stdbuilddir}/doc && $(MAKE) V=1 libext2fs.html )
275 ( cd ${stdbuilddir}/lib/et && $(MAKE) V=1 com_err.info com_err.html )
276
277 touch ${BUILDSTDSTAMP}
278
279 build-bf: ${BUILDBFSTAMP}
280 ${BUILDBFSTAMP}: ${CFGBFSTAMP}
281 dh_testdir
282 $(MAKE) -C ${bfbuilddir} V=1 libs
283 $(MAKE) -C ${bfbuilddir}/e2fsck V=1 all
284 $(MAKE) -C ${bfbuilddir}/misc V=1 all
285 $(MAKE) -C ${bfbuilddir}/resize V=1 all
286 touch ${BUILDBFSTAMP}
287
288 clean:
289 dh_testdir
290 if test -d debian/orig-gmo ; then \
291 rm -f po/*.gmo po/*.po ; \
292 mv debian/orig-gmo/* po ; \
293 rmdir debian/orig-gmo ; \
294 fi
295 rm -rf ${STAMPSDIR}
296 [ ! -f ${stdbuilddir}/Makefile ] || $(MAKE) -C ${stdbuilddir} V=1 distclean
297 [ ! -f ${bfbuilddir}/Makefile ] || $(MAKE) -C ${bfbuilddir} V=1 distclean
298 [ ! -f ${staticbuilddir}/Makefile ] || $(MAKE) -C ${staticbuilddir} V=1 distclean
299 rm -rf ${stdbuilddir} ${bfbuilddir} ${staticbuilddir}
300 rm -f debian/*.substvars
301 dh_clean
302
303 install: cleanup install-std
304
305 # This rule allows to factorize the dh_clean between the 2 install rules
306 # This must be launched before install-* (if launching them by hand, for
307 # example) or results are unpredictable
308 cleanup:
309 dh_testdir
310 dh_testroot
311 dh_prep
312
313 install-std: DH_OPTIONS=
314 install-std: build
315 dh_testdir
316 dh_testroot
317 dh_installdirs
318
319 mkdir -p ${tmpdir}/sbin
320 $(MAKE) -C ${stdbuilddir} V=1 install DESTDIR=${tmpdir} \
321 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
322 # static libs and .h files
323 $(MAKE) -C ${stdbuilddir} V=1 install-libs DESTDIR=${tmpdir} LDCONFIG=true
324
325 ifneq ($(BUILD_E2FSCK_STATIC),no)
326 # statically-linked fsck
327 ${INSTALL_PROGRAM} $(E2FSCK_STATIC) ${tmpdir}/sbin
328 cp ${mandir}/man8/e2fsck.8 ${mandir}/man8/e2fsck.static.8
329 endif
330
331 ifeq ($(DEB_HOST_ARCH_OS), hurd)
332 ${INSTALL} -m 0644 misc/mke2fs-hurd.conf ${tmpdir}/etc/mke2fs.conf
333 endif
334
335 dh_movefiles
336 test -z "`find ${tmpdir} -type f`"
337
338 install-udeb: DH_OPTIONS=
339 install-udeb: build
340 dh_testdir
341 dh_testroot
342
343 $(MAKE) -C ${bfbuilddir} V=1 install-shlibs-libs-recursive DESTDIR=${udebdir} \
344 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
345 $(MAKE) -C ${bfbuilddir}/e2fsck V=1 install DESTDIR=${udebdir} \
346 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
347 $(MAKE) -C ${bfbuilddir}/misc V=1 install DESTDIR=${udebdir} \
348 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
349 $(MAKE) -C ${bfbuilddir}/resize V=1 install DESTDIR=${udebdir} \
350 INSTALL_PROGRAM="${INSTALL_PROGRAM}" LDCONFIG=true
351
352 rm -rf ${udebdir}/usr
353 find ${udebdir}/sbin -type f -a ! -name e2fsck \
354 -a ! -name mke2fs -a ! -name tune2fs \
355 -a ! -name resize2fs -a ! -name badblocks -print | xargs rm
356
357 (cd ${udebdir}/sbin; ln -sf e2fsck fsck.ext2 ; \
358 ln -sf e2fsck fsck.ext3 ; ln -sf e2fsck fsck.ext4 ; \
359 ln -sf mke2fs mkfs.ext2 ; ln -sf mke2fs mkfs.ext3 ; \
360 ln -sf mke2fs mkfs.ext4)
361
362 binary-indep: install
363 dh_testdir
364 dh_testroot
365 dh_lintian -i
366 dh_installchangelogs -i
367 dh_fixperms -i
368 dh_compress -i
369 dh_installdeb -i
370 dh_gencontrol -i
371 dh_md5sums -i
372 dh_builddeb -i
373
374 # binary-arch builds a superset of binary-indep. This is because
375 # building e2fsprogs-l10n.deb unnecessarily takes less time than
376 # running the install recipe twice. At some point when we rototill
377 # the rules file we can clean this up in a better way.
378 binary-arch: install $(INSTALL_UDEB)
379 dh_testdir
380 dh_testroot
381
382 dh_lintian
383
384 # symlinks to prepare dh_installdocs run
385
386 mkdir -p ${debdir}/libss${SS_SOVERSION}/usr/share/doc/libss${SS_SOVERSION}
387 mkdir -p ${debdir}/ss-dev/usr/share/doc
388 ln -sf libss${SS_SOVERSION} ${debdir}/ss-dev/usr/share/doc/ss-dev
389
390 mkdir -p ${debdir}/libcomerr${COMERR_SOVERSION}/usr/share/doc/libcomerr${COMERR_SOVERSION}
391 mkdir -p ${debdir}/comerr-dev/usr/share/doc
392 ln -sf libcomerr${COMERR_SOVERSION} ${debdir}/comerr-dev/usr/share/doc/comerr-dev
393
394 mkdir -p ${debdir}/e2fslibs/usr/share/doc/e2fslibs
395 mkdir -p ${debdir}/e2fslibs-dev/usr/share/doc
396 ln -sf e2fslibs ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs-dev
397
398 dh_installdocs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
399
400 # HTML docs
401 $(INSTALL) -d ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
402 $(INSTALL) -p -m 0644 ${stdbuilddir}/doc/*.html \
403 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/html-info/
404 $(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
405 $(INSTALL) -p -m 0644 ${stdbuilddir}/lib/et/*.html \
406 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/html-info/
407
408 # texinfo docs
409 mkdir -p ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}
410 $(INSTALL) -p -m 0644 ${topdir}/doc/libext2fs.texinfo \
411 ${debdir}/e2fslibs-dev/usr/share/doc/e2fslibs/libext2fs.texi
412 $(INSTALL) -p -m 0644 ${topdir}/lib/et/com_err.texinfo \
413 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/com_err.texi
414
415 $(INSTALL) -d ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
416 $(INSTALL) -p -m 0644 lib/ss/ss_err.et \
417 ${stdbuilddir}/lib/ext2fs/ext2_err.et \
418 ${debdir}/comerr-dev/usr/share/doc/libcomerr${COMERR_SOVERSION}/examples
419 $(INSTALL) -d ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
420 $(INSTALL) -p -m 0644 debugfs/debug_cmds.ct \
421 ${debdir}/ss-dev/usr/share/doc/libss${SS_SOVERSION}/examples
422
423 dh_installinfo -pcomerr-dev ${stdbuilddir}/lib/et/com_err.info
424 dh_installinfo -pe2fslibs-dev ${stdbuilddir}/doc/libext2fs.info
425
426 dh_installchangelogs
427 dh_fixperms
428 dh_strip $(call dh_strip_args,e2fsprogs)
429 ifneq ($(BUILD_E2FSCK_STATIC),no)
430 dh_strip $(call dh_strip_args2,e2fsck-static,e2fsprogs)
431 endif
432 dh_strip $(call dh_strip_args,e2fslibs)
433 dh_strip $(call dh_strip_args,libss${SS_SOVERSION})
434 dh_strip $(call dh_strip_args,libcomerr${COMERR_SOVERSION})
435 dh_strip
436
437 # dpkg symbol handling
438 for i in $(SYMBOL_LIBS); \
439 do \
440 echo "Generating symbols for $$i..."; \
441 dpkg-gensymbols -p$$i -Pdebian/$$i > debian/$$i.tmp-patch; \
442 cat debian/$$i.tmp-patch; \
443 patch debian/$$i.symbols < debian/$$i.tmp-patch; \
444 /bin/rm debian/$$i.tmp-patch; \
445 done
446
447 dh_compress
448
449 dh_makeshlibs --add-udeb=e2fsprogs-udeb
450
451 dh_installdeb
452 dh_shlibdeps -l${stdbuilddir}/lib
453 dh_shlibdeps -pe2fsprogs -l${stdbuilddir}/lib \
454 -u"-Ldebian/e2fsprogs.shlibs.local"
455 ifeq ($(SKIP_UDEB),)
456 dh_shlibdeps -pe2fsprogs-udeb -l${stdbuilddir}/lib \
457 -u"-Ldebian/e2fsprogs-udeb.shlibs.local"
458 endif
459 ifeq ($(SKIP_FUSE2FS),)
460 dh_shlibdeps -pfuse2fs -l${stdbuilddir}/lib \
461 -u"-Ldebian/e2fsprogs.shlibs.local"
462 endif
463
464 dh_gencontrol -Ncomerr-dev -Nss-dev -Nuuid-dev \
465 -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
466 DH_OPTIONS= dh_gencontrol -pcomerr-dev \
467 -u '-v${COMERR_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
468 DH_OPTIONS= dh_gencontrol -pss-dev \
469 -u '-v${SS_VERSION}-${MAIN_VERSION} -VmainBinary=${MAIN_VERSION}'
470 ifeq ($(SKIP_UDEB),)
471 dh_gencontrol -pe2fsprogs-udeb -- -fdebian/files~
472 endif
473
474 ifeq ($(SKIP_UDEB),)
475 dpkg-distaddfile $(UDEB_NAME) debian-installer $(UDEB_PRIORITY)
476 endif
477 dh_md5sums
478 dh_builddeb
479
480 # binary-arch builds a superset of binary-indep. See the comment
481 # before the binary-arch rule for more details.
482 binary: binary-arch
483
484 .PHONY: binary binary-arch binary-indep clean checkroot mrproper \
485 debug_flags debian-files
486
487 debug_flags:
488 @echo CFLAGS is $(CFLAGS)
489 @echo LDFLAGS is $(LDFLAGS)
490 @echo CPPFLAGS is $(CPPFLAGS)