summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-06-01 14:29:00 +0100
committerSimon McVittie <smcv@debian.org>2011-06-01 14:40:15 +0100
commitc43412bd0dc98ba24e9d42d65d0f21b6e9e658b8 (patch)
tree36ba5851c483c1a37eb1899c3cbd4856d2a7c82e
parent58e19a621d314d4352a3ef2760082bf107ac27ee (diff)
downloaddbus-c43412bd0dc98ba24e9d42d65d0f21b6e9e658b8.tar.gz
Do a second build with tests, verbosity etc. enabled, and install it in /usr/lib/$DEB_HOST_MULTIARCH/dbus-1.0/debug-build (Closes: #498185)
-rw-r--r--debian/changelog2
-rw-r--r--debian/control1
-rw-r--r--debian/dbus-1-dbg.NEWS12
-rw-r--r--debian/dbus-1-dbg.install2
-rwxr-xr-xdebian/rules33
5 files changed, 45 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index 3cc5fff6..36a7325e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dbus (1.4.8-4) UNRELEASED; urgency=low
* Don't pass a version to dh_makeshlibs -V - the symbols file gives us
exact dependencies, so the legacy shlibs mechanism is just a guard against
old systems now, and everyone forgets to update it
+ * Do a second build with tests, verbosity etc. enabled, and install it
+ in /usr/lib/$DEB_HOST_MULTIARCH/dbus-1.0/debug-build (Closes: #498185)
-- Simon McVittie <smcv@debian.org> Wed, 01 Jun 2011 14:08:58 +0100
diff --git a/debian/control b/debian/control
index 8d16a786..f81dd1da 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Uploaders: Sjoerd Simons <sjoerd@debian.org>,
Build-Depends: autotools-dev,
debhelper (>= 8),
doxygen,
+ dpkg-dev (>= 1.16.0~ubuntu4),
libexpat-dev,
libselinux1-dev [linux-any],
libx11-dev,
diff --git a/debian/dbus-1-dbg.NEWS b/debian/dbus-1-dbg.NEWS
new file mode 100644
index 00000000..3ac2c3a1
--- /dev/null
+++ b/debian/dbus-1-dbg.NEWS
@@ -0,0 +1,12 @@
+dbus (1.4.8-4) UNRELEASED; urgency=low
+
+ Versions of libdbus, dbus-daemon etc. with debugging, verbose output
+ and self-tests enabled are now installed in
+ /usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/dbus-1.0/debug-build
+ for use in debugging D-Bus-related issues.
+
+ The debug versions of dbus-daemon etc. can be used by adding the bin
+ directory to the PATH, while the debug version of libdbus can be used via
+ LD_PRELOAD or by adding the lib directory to the LD_LIBRARY_PATH.
+
+ -- Simon McVittie <smcv@debian.org> Wed, 01 Jun 2011 14:18:00 +0100
diff --git a/debian/dbus-1-dbg.install b/debian/dbus-1-dbg.install
new file mode 100644
index 00000000..5843d208
--- /dev/null
+++ b/debian/dbus-1-dbg.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/*/dbus-1.0/debug-build/bin
+debian/tmp/usr/lib/*/dbus-1.0/debug-build/lib
diff --git a/debian/rules b/debian/rules
index f0896d87..6d454484 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,24 +9,44 @@
libdbusN := $(shell sed -rn 's/Package:[[:space:]]*(libdbus-[0-9-]+)[[:space:]]*$$/\1/p' debian/control | head -n 1)
+multiarch := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
cflags := $(shell dpkg-buildflags --get CFLAGS)
ldflags := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
-
-override_dh_auto_configure:
- dh_auto_configure -- \
- --enable-xml-docs \
- --enable-doxygen-docs \
+common_configure_flags = \
--disable-libaudit \
--libexecdir=\$${prefix}/lib/dbus-1.0 \
--htmldir=\$${prefix}/share/doc/dbus \
--with-systemdsystemunitdir=/lib/systemd/system \
CFLAGS="$(cflags)" LDFLAGS="$(ldflags)"
+override_dh_auto_configure:
+ dh_auto_configure \
+ -- \
+ $(common_configure_flags) \
+ --enable-xml-docs \
+ --enable-doxygen-docs
+ dh_auto_configure \
+ --builddirectory=build-debug \
+ -- \
+ $(common_configure_flags) \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --enable-asserts \
+ --enable-checks \
+ --enable-tests \
+ --enable-verbose-mode \
+ --prefix=/usr/lib/$(multiarch)/dbus-1.0/debug-build
+
override_dh_auto_build:
dh_auto_build
+ dh_auto_build --builddirectory=build-debug
# work around fd.o #36156
xsltproc -o build/doc/dbus.devhelp doc/doxygen_to_devhelp.xsl build/doc/api/xml/index.xml
+override_dh_auto_install:
+ dh_auto_install
+ make -C build-debug install-exec DESTDIR=$(CURDIR)/debian/tmp
+
override_dh_link:
dh_link -plibdbus-1-dev lib/$$(basename $$(readlink debian/tmp/usr/lib/libdbus-1.so)) usr/lib/libdbus-1.so
dh_link --remaining-packages
@@ -53,6 +73,9 @@ override_dh_makeshlibs:
override_dh_auto_clean:
dh_auto_clean
+ dh_auto_clean --builddirectory=build-debug
rm -f build/test/data/valid-config-files/session.conf
rm -f build/test/data/valid-config-files/system.conf
+ rm -f build-debug/test/data/valid-config-files/session.conf
+ rm -f build-debug/test/data/valid-config-files/system.conf
rm -f dbus.devhelp