Package: src:dmg2img
Version: 1.6.2-1
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu maverick

Ubuntu is currently carrying a patch to dmg2img that enables debug
package building. While we don't do the Ubuntu -dbgsym packages,
not stripping in Makefile and respecting DEB_BUILD_OPTIONS would remove
the need for these Ubuntu patches and improve your package.

Attached is a patch (using quilt and the new dpkg-buildflags).
It'll give you support for the noopt and nostrip DEB_BUILD_OPTIONS.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127
=== added directory 'debian/patches'
=== added file 'debian/patches/dont-strip.patch'
--- debian/patches/dont-strip.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/dont-strip.patch	2010-05-24 12:59:40 +0000
@@ -0,0 +1,31 @@
+Description: Don't strip symbols in upstream's Makefile, let dh_strip take care
+ of stripping, which allows for debug builds.
+Origin: https://bugs.launchpad.net/bugs/546108
+Author: TJ <ubu...@tjworld.net>
+Last-Update: 2010-03-24
+Forwarded: not-needed
+--- a/Makefile
++++ b/Makefile
+@@ -5,7 +5,7 @@
+ all: dmg2img vfdecrypt 
+ 
+ dmg2img: dmg2img.c dmg2img.h mntcmd.h gpt.h dmg2img.o base64.o adc.o 
+-	$(CC) -s -o dmg2img dmg2img.o base64.o adc.o -L. -lz -lbz2
++	$(CC) -o dmg2img dmg2img.o base64.o adc.o -L. -lz -lbz2
+ 
+ dmg2img.o: dmg2img.c dmg2img.h
+ 	$(CC) $(CFLAGS) -c dmg2img.c
+@@ -17,11 +17,11 @@
+ 	$(CC) $(CFLAGS) -c adc.c
+ 
+ vfdecrypt: vfdecrypt.c
+-	$(CC) $(CFLAGS) -s -o vfdecrypt vfdecrypt.c -lcrypto
++	$(CC) $(CFLAGS) -o vfdecrypt vfdecrypt.c -lcrypto
+ 
+ install: dmg2img vfdecrypt
+ 	mkdir -p ${BIN_DIR}
+-	install -c -s -m 755 -o root -g root dmg2img vfdecrypt $(BIN_DIR)
++	install -c -m 755 -o root -g root dmg2img vfdecrypt $(BIN_DIR)
+ 
+ clean:
+ 	rm -f dmg2img vfdecrypt *~ *.o core

=== added file 'debian/patches/series'
--- debian/patches/series	1970-01-01 00:00:00 +0000
+++ debian/patches/series	2010-05-24 12:38:41 +0000
@@ -0,0 +1 @@
+dont-strip.patch

=== modified file 'debian/rules'
--- debian/rules	2009-10-25 12:35:36 +0000
+++ debian/rules	2010-05-24 13:05:01 +0000
@@ -1,10 +1,11 @@
 #!/usr/bin/make -f
 
 include /usr/share/cdbs/1/rules/debhelper.mk
+CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
 
 build-arch: debian/build-stamp
 debian/build-stamp:
-	$(MAKE)
+	$(MAKE) CFLAGS="$(CFLAGS)"
 	touch $@
 
 clean::

=== modified file 'debian/source/format'
--- debian/source/format	2010-03-28 21:45:36 +0000
+++ debian/source/format	2010-05-24 12:37:27 +0000
@@ -1 +1 @@
-1.0
+3.0 (quilt)

Attachment: signature.asc
Description: Digital signature

Reply via email to