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