Try to allow building of debug .deb packages (optionally).
authorCarl Hetherington <cth@carlh.net>
Sun, 26 Jan 2014 20:24:19 +0000 (20:24 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 26 Jan 2014 20:24:19 +0000 (20:24 +0000)
cscript
debian/rules

diff --git a/cscript b/cscript
index c329ea84fd63db7f0f828a512eb813cc7fcc2a8d..05e8da2888eee998f0a7ac8a4bc7f39a238965cd 100644 (file)
--- 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)
index c0db3f77aff09eb5db203ce97d1d652f70c4235c..8973231b56805bf436f4eb99da35aa1a4b2f9ebb 100755 (executable)
 
 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