[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC] Build a new xserver-xorg-core-dbg package.



Include debugging symbols for the Xorg server and associated modules in a
new package.
---
Hi all,

This is an attempt at building a package with debugging symbols for the
Xorg server.  It's a bit more complicated than adding --dbg-package to
dh_strip because the modules are stripped differently (without
--strip-unneeded).  Let me know if I should push this for one of the
next uploads to experimental.

Cheers,
Julien

 debian/control |   13 +++++++++++++
 debian/rules   |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/debian/control b/debian/control
index 9d58a35..8dc39ef 100644
--- a/debian/control
+++ b/debian/control
@@ -203,3 +203,16 @@ Description: Xprint - the X11 print system (configuration files)
  This package provides the configuration and postscript definition files
  required to run Xprt, the Xprint server. Xprt is provided by xprint.
 
+Package: xserver-xorg-core-dbg
+Architecture: any
+Depends: xserver-xorg-core (= ${Source-Version})
+Priority: extra
+Description: Xorg - the X.Org X server (debugging symbols)
+ The X.Org X server is an X server for several architectures and operating
+ systems, which is derived from the XFree86 4.x series of X servers.
+ .
+ The X.Org server supports most modern graphics hardware from most vendors,
+ and supersedes all XFree86 X servers.
+ .
+ This package provides debugging symbols for the Xorg X server and associated
+ modules.
diff --git a/debian/rules b/debian/rules
index 852e9e6..1e39de7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,7 +145,12 @@ binary-arch: build install
 	rm -rf debian/xprint/usr/share/doc/xprint
 	
 	dh_link -a
-	dh_strip -a --exclude=usr/lib/xorg/modules
+	dh_strip -a --exclude=usr/lib/xorg/modules --dbg-package=xserver-xorg-core
+	for i in $$(find debian/xserver-xorg-core/usr/lib/xorg/modules -name "lib*.so"); do \
+	  mkdir -p $$(dirname debian/xserver-xorg-core-dbg/usr/lib/debug/$${i#*debian/xserver-xorg-core/}) && \
+	  objcopy --only-keep-debug $$i debian/xserver-xorg-core-dbg/usr/lib/debug/$${i#*debian/xserver-xorg-core/} && \
+	  objcopy --add-gnu-debuglink=debian/xserver-xorg-core-dbg/usr/lib/debug/$${i#*debian/xserver-xorg-core/} $$i; \
+	done
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	find debian/xserver-xorg-core/usr/lib/xorg/modules -name "lib*.so" | \
 	  xargs --no-run-if-empty \
-- 
1.5.0.3



Reply to: