From 43813c1e6b56bbd5342a7b516b652d9110a86de6 Mon Sep 17 00:00:00 2001 From: lguohan Date: Mon, 1 May 2017 09:50:39 -0700 Subject: [PATCH] add debug debian package (#178) --- debian/control | 45 +++++++++++++++++++++++++++++++++++++++++++++ debian/rules | 15 +++++++++++---- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 3603ba87e1b0..61fa850ddf01 100644 --- a/debian/control +++ b/debian/control @@ -48,3 +48,48 @@ Architecture: any Depends: libsaimetadata (= ${binary:Version}) Section: libdevel Description: This package contains development files for SAI-Metadata. + +Package: syncd-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + syncd (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for syncd + +Package: syncd-rpc-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + syncd-rpc (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for syncd-rpc + +Package: libsairedis-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + libsairedis (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for libsairedis + +Package: libsaivs-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + libsaivs (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for libsaivs + +Package: libsaimetadata-dbg +Architecture: any +Section: debug +Priority: extra +Depends: + libsaimetadata (= ${binary:Version}), + ${misc:Depends} +Description: debugging symbols for libsaimetadata diff --git a/debian/rules b/debian/rules index 7e1075ce51cd..019ca7a3bf9a 100755 --- a/debian/rules +++ b/debian/rules @@ -27,14 +27,14 @@ binary: binary-syncd binary-syncd-rpc binary-syncd: $(shell echo > /tmp/syncd-build) dh clean --with autotools-dev - dh build -N syncd-rpc --with autotools-dev - dh binary -N syncd-rpc --with autotools-dev + dh build -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev + dh binary -N syncd-rpc -N syncd-rpc-dbg --with autotools-dev binary-syncd-rpc: $(shell echo '--enable-rpcserver=yes' > /tmp/syncd-build) dh clean --with autotools-dev - dh build -N syncd --with autotools-dev - dh binary -N syncd --with autotools-dev + dh build -N syncd -N syncd-dbg --with autotools-dev + dh binary -N syncd -N syncd-dbg --with autotools-dev # dh_make generated override targets # This is example for Cmake (See https://bugs.debian.org/641051 ) @@ -56,3 +56,10 @@ override_dh_installinit: override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info + +override_dh_strip: + dh_strip -psyncd-rpc --dbg-package=syncd-rpc-dbg + dh_strip -psyncd --dbg-package=syncd-dbg + dh_strip -plibsairedis --dbg-package=libsairedis-dbg + dh_strip -plibsaivs --dbg-package=libsaivs-dbg + dh_strip -plibsaimetadata --dbg-package=libsaimetadata-dbg