From 2503e49d93065cd1f3b3c1cbdc1ad1aeb9fffa62 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Jan 2014 20:24:19 +0000 Subject: [PATCH 1/1] Try to allow building of debug .deb packages (optionally). --- cscript | 19 +++++++++++++++++-- debian/rules | 6 +++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cscript b/cscript index c329ea84f..05e8da288 100644 --- a/cscript +++ b/cscript @@ -91,7 +91,7 @@ def packages(name, packages, f): s += str(p) + ', ' print >>f,s[:-2] -def make_control(version, bits, filename): +def make_control(version, bits, filename, debug): f = open(filename, 'w') print >>f,'Source: dcpomatic' print >>f,'Section: video' @@ -108,11 +108,26 @@ def make_control(version, bits, filename): print >>f,'Architecture: amd64' packages('Depends', depends[version], f) + print >>f,'Description: Generator of Digital Cinema Packages (DCPs)' print >>f,' DCP-o-matic generates Digital Cinema Packages (DCPs) from video and audio' print >>f,' files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant' print >>f,' digital projectors.' + if debug: + print >>f,'' + print >>f,'Package: dcpomatic-dbg' + if bits == 32: + print >>f,'Architecture: i386' + else: + print >>f,'Architecture: amd64' + print >>f,'Section: debug' + print >>f,'Priority: extra' + print >>f,'Depends: ${dcpomatic:Depends}, ${misc:Depends}' + print >>f,'Description: debugging symbols for dcpomatic' + print >>f,' This package contains the debugging symbols for dcpomatic.' + print >>f,'' + def dependencies(target): return (('ffmpeg-cdist', '5ac3a6af077c10f07c31954c372a8f29e4e18e2a'), ('libdcp', '054cc86')) @@ -146,7 +161,7 @@ def package(target, version): else: cpu = 'amd64' - make_control(target.version, target.bits, 'debian/control') + make_control(target.version, target.bits, 'debian/control', target.debug) target.command('./waf dist') f = open('debian/files', 'w') print >>f,'dcpomatic_%s-1_%s.deb video extra' % (version, cpu) diff --git a/debian/rules b/debian/rules index c0db3f77a..8973231b5 100755 --- a/debian/rules +++ b/debian/rules @@ -14,10 +14,14 @@ override_dh_auto_configure: LINKFLAGS=$(CDIST_LINKFLAGS) CXXFLAGS="$(CXXFLAGS) $(CDIST_CXXFLAGS)" PKG_CONFIG_PATH=$(CDIST_PKG_CONFIG_PATH) \ - ./waf --nocache configure --prefix=/usr --static + ./waf --nocache configure --prefix=/usr --static --enable-debug override_dh_auto_build: ./waf --nocache build override_dh_auto_install: ./waf --nocache install --destdir=debian/dcpomatic + +.PHONY: override_dh_strip +override_dh_strip: + dh_strip --dbg-package=dcpomatic-dbg -- 2.30.2