diff -pruN 0.47-1/debian/changelog 0.47-1ubuntu1/debian/changelog
--- 0.47-1/debian/changelog	2011-08-24 18:48:33.000000000 +0000
+++ 0.47-1ubuntu1/debian/changelog	2011-08-24 18:48:33.000000000 +0000
@@ -1,3 +1,10 @@
+cycfx2prog (0.47-1ubuntu1) oneiric; urgency=low
+
+  * debian/patches/fix-ftbfs-with-ls-as-needed.patch: (LP: #770790)
+    - Reorder libraries to fix FTBFS with ld --as-needed
+
+ -- Angel Abad <angelabad@ubuntu.com>  Sun, 21 Aug 2011 13:21:27 +0200
+
 cycfx2prog (0.47-1) unstable; urgency=low
 
   * New upstream release (Closes: #557772).
diff -pruN 0.47-1/debian/control 0.47-1ubuntu1/debian/control
--- 0.47-1/debian/control	2011-08-24 18:48:33.000000000 +0000
+++ 0.47-1ubuntu1/debian/control	2011-08-24 18:48:33.000000000 +0000
@@ -1,7 +1,8 @@
 Source: cycfx2prog
 Section: electronics
 Priority: extra
-Maintainer: Uwe Hermann <uwe@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Uwe Hermann <uwe@debian.org>
 Build-Depends: cdbs, debhelper (>= 5), libusb-dev
 Standards-Version: 3.8.3
 Homepage: http://www.triplespark.net/elec/periph/USB-FX2/software/
diff -pruN 0.47-1/debian/patches/fix-ftbfs-with-ls-as-needed.patch 0.47-1ubuntu1/debian/patches/fix-ftbfs-with-ls-as-needed.patch
--- 0.47-1/debian/patches/fix-ftbfs-with-ls-as-needed.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.47-1ubuntu1/debian/patches/fix-ftbfs-with-ls-as-needed.patch	2011-08-24 18:48:33.000000000 +0000
@@ -0,0 +1,25 @@
+Description: Reorder libraries to fix FTBFS with ld --as-needed
+Author: Angel Abad <angelabad@ubuntu.com>
+Bug-Ubuntu: https://launchpad.net/bugs/770790
+Bug-Debian: http://bugs.debian.org/638713
+
+diff -Nur -x '*.orig' -x '*~' cycfx2prog-0.47//Makefile cycfx2prog-0.47.new//Makefile
+--- cycfx2prog-0.47//Makefile	2009-12-06 18:55:28.000000000 +0100
++++ cycfx2prog-0.47.new//Makefile	2011-08-21 13:18:48.223560927 +0200
+@@ -2,14 +2,14 @@
+ VERSION = 0.47
+ CFLAGS = -O2 -fno-rtti -fno-exceptions -DCYCFX2PROG_VERSION=\"$(VERSION)\" \
+ 	-W -Wall -Wformat
+-LDFLAGS = -lusb
++LIBS = -lusb
+ DIST_DEST = cycfx2prog-$(VERSION)
+ 
+ all: cycfx2prog
+ 
+ # NOTE: Also add sources to the "dist:" target!
+ cycfx2prog: cycfx2prog.o cycfx2dev.o
+-	$(CC) $(LDFLAGS) cycfx2prog.o cycfx2dev.o -o cycfx2prog
++	$(CC) cycfx2prog.o cycfx2dev.o -o cycfx2prog $(LIBS)
+ 
+ clean:
+ 	-rm -f *.o

