Section: admin
Priority: required
Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
-Build-Depends: gettext, texinfo, pkg-config, gcc-multilib [mips mipsel], libfuse-dev, libattr1-dev, debhelper (>= 7.0), UTIL_LINUX_NG_DEFINES m4
+Build-Depends: gettext, texinfo, pkg-config, gcc-multilib [mips mipsel], libfuse-dev, libattr1-dev, debhelper (>= 9.0), UTIL_LINUX_NG_DEFINES m4
Standards-Version: 3.9.8
Homepage: http://e2fsprogs.sourceforge.net
This package contains programs for creating, checking, and maintaining
ext2/3/4-based file systems. It also includes the "badblocks" program,
which can be used to scan for bad blocks on a disk or other storage device.
-
+ifdef(`USE_DBGSYM',,``
Package: e2fsprogs-dbg
Section: debug
Priority: extra
This package includes the debug information useful for debugging e2fsprogs
and its libraries, contained in the e2fsprogs and e2fsck-static packages.
The debug information is used for execution tracing and core
- dump analysis.
-ifdef(`UTIL_LINUX_NG',,``
+ dump analysis.
+'')
+ifdef(`USE_DBGSYM',,ifdef(`UTIL_LINUX_NG',,``
Package: uuid-runtime-dbg
Section: debug
Priority: extra
uuid runtime programs, contained in the uuid-runtime package.
The debugging information is used for execution tracing and core
dump analysis.
-'')dnl
-
+''))dnl
+ifdef(`USE_DBGSYM',,``
Package: e2fslibs-dbg
Section: debug
Priority: extra
This package includes the debug information useful for debugging the
ss library, contained in the libss2 package. The debug information
is used for execution tracing and core dump analysis.
-ifdef(`UTIL_LINUX_NG',,``
+'')dnl
+ifdef(`USE_DBGSYM',,ifdef(`UTIL_LINUX_NG',,``
Package: libblkid1-dbg
Section: debug
Priority: extra
This package includes the debug information useful for debugging the
UUID library, contained in the libuuid1 package. The debug
information is used for execution tracing and core dump analysis.
-'')dnl
+''))dnl
DISTRO :=$(shell sed -ne '/DISTRIB_ID/s/.*=//p' /etc/lsb-release 2>/dev/null || echo Debian)
UTIL_LINUX_NG ?= yes
+DH_VERSION := $(shell dpkg-query -W -f '$${Version}' debhelper)
+
+# USE_DBGSYM :=
+USE_DBGSYM ?= $(shell if dpkg --compare-versions $(DH_VERSION) ">=" 9.20160114 ; then echo yes ; fi)
+
+ifeq ($(USE_DBGSYM),yes)
+dh_strip_args = -p$(1) --dbgsym-migration='$(1)-dbg (<= 1.43-1)'
+dh_strip_args2 = -p$(1) --dbgsym-migration='$(2)-dbg (<= 1.43-1)'
+else
+dh_strip_args = -p$(1) --dbg-package=$(1)-dbg
+dh_strip_args2 = -p$(1) --dbg-package=$(2)-dbg
+endif
# find the version for the main package, from changelog file
MAIN_VERSION = $(shell head -n 1 debian/changelog | cut '-d ' -f 2 | sed 's/[()]//g')
# find versions for libraries going into their own packages, from their Makefile.in's,
endif
M4_ARGS=
+DBG_PACKAGES=
+
+ifeq ($(USE_DBGSYM),yes)
+M4_ARGS+=-DUSE_DBGSYM
+else
+DBG_PACKAGES += -pe2fsprogs-dbg -pe2fslibs-dbg -plibcomerr2-dbg -plibss2-dbg
+M4_ARGS+=-UUSE_DBGSYM
+endif
+
ifeq ($(UTIL_LINUX_NG),yes)
M4_ARGS+=-DUTIL_LINUX_NG
else
+DBG_PACKAGES += -puuid-runtime-dbg -plibuuid1-dbg -plibblkid1-dbg
M4_ARGS+=-UUTIL_LINUX_NG
endif
DH_OPTIONS= dh_installchangelogs -pe2fsprogs \
-plibcomerr${COMERR_SOVERSION} \
-plibss${SS_SOVERSION} \
- -pe2fslibs \
- -pe2fsprogs-dbg -pe2fslibs-dbg \
- -plibcomerr2-dbg -plibss2-dbg
+ -pe2fslibs $(DBG_PACKAGES)
ifneq ($(BUILD_E2FSCK_STATIC),no)
DH_OPTIONS= dh_installchangelogs -pe2fsck-static
endif
ifneq ($(UTIL_LINUX_NG),yes)
DH_OPTIONS= dh_installchangelogs -plibuuid${UUID_SOVERSION} \
- -puuid-dev -puuid-runtime -puuid-runtime-dbg -plibuuid1-dbg \
- -plibblkid${BLKID_SOVERSION} -plibblkid1-dbg
+ -puuid-dev -puuid-runtime -plibblkid${BLKID_SOVERSION}
endif
dh_fixperms
- dh_strip -pe2fsprogs --dbg-package=e2fsprogs-dbg
+ dh_strip $(call dh_strip_args,e2fsprogs)
ifneq ($(BUILD_E2FSCK_STATIC),no)
- dh_strip -pe2fsck-static --dbg-package=e2fsprogs-dbg
+ dh_strip $(call dh_strip_args2,e2fsck-static,e2fsprogs)
endif
ifneq ($(ismips),)
- dh_strip -pe2fslibs --dbg-package=e2fslibs-dbg -Xlib64ext2fs-nopic.a
+ dh_strip $(call dh_strip_args,e2fslibs) -Xlib64ext2fs-nopic.a
else
- dh_strip -pe2fslibs --dbg-package=e2fslibs-dbg
+ dh_strip $(call dh_strip_args,e2fslibs)
endif
- dh_strip -plibss${SS_SOVERSION} --dbg-package=libss${SS_SOVERSION}-dbg
- dh_strip -plibcomerr${COMERR_SOVERSION} \
- --dbg-package=libcomerr${COMERR_SOVERSION}-dbg
+ dh_strip $(call dh_strip_args,libss${SS_SOVERSION})
+ dh_strip $(call dh_strip_args,libcomerr${COMERR_SOVERSION})
ifneq ($(UTIL_LINUX_NG),yes)
- dh_strip -plibblkid${BLKID_SOVERSION} \
- --dbg-package=libblkid${BLKID_SOVERSION}-dbg
- dh_strip -plibuuid${UUID_SOVERSION} --dbg-package=libuuid${UUID_SOVERSION}-dbg
+ dh_strip $(call dh_strip_args,libblkid${BLKID_SOVERSION})
+ dh_strip $(call dh_strip_args,libuuid${UUID_SOVERSION})
endif
dh_strip
/bin/rm debian/$$i.tmp-patch; \
done
- for i in e2fsprogs e2fsprogs-dbg e2fslibs e2fslibs-dbg; do \
+ for i in e2fsprogs e2fslibs \
+ $(if $(filter $(USE_DBGSYM),yes),,e2fsprogs-dbg e2fslibs-dbg) ; \
+ do \
$(INSTALL) -p -m 0644 debian/copyright \
${debdir}/$$i/usr/share/doc/$$i/copyright; \
done
+ifneq ($(USE_DBGSYM),yes)
ifneq ($(UTIL_LINUX_NG),yes)
$(INSTALL) -p -m 0644 debian/uuid-runtime.copyright \
${uuidruntimedbgdir}/usr/share/doc/uuid-runtime-dbg/copyright
$(INSTALL) -p -m 0644 debian/libuuid1.copyright \
${libuuiddbgdir}/usr/share/doc/libuuid1-dbg/copyright
endif
-
+endif
dh_compress
dh_makeshlibs -Ne2fsprogs-udeb -Nlibblkid1-udeb -Nlibuuid1-udeb
@echo CFLAGS is $(CFLAGS)
@echo LDFLAGS is $(LDFLAGS)
@echo CPPFLAGS is $(CPPFLAGS)
+
+debug:
+ echo $(DH_VERSION)
+ echo $(USE_DBGSYM)
+ echo $(call dh_strip_args,e2fsprogs)
+ echo $(call dh_strip_args2,e2fsck-static,e2fsprogs)
+ echo $(DBG_PACKAGES)
+ echo $(if $(filter $(USE_DBGSYM),yes),,e2fsprogs-dbg e2fslibs-dbg)