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