diff -Nru elfutils-0.152/debian/changelog elfutils-0.152/debian/changelog
--- elfutils-0.152/debian/changelog	2011-11-02 14:07:02.000000000 +0100
+++ elfutils-0.152/debian/changelog	2012-01-24 13:01:38.000000000 +0100
@@ -1,3 +1,11 @@
+elfutils (0.152-1ubuntu3) precise; urgency=low
+
+  * Convert to multiarch.
+  * Added build-{arch,indep} targets.
+  * Switched to use 'dh_prep' instead of 'dh_clean -k'
+
+ -- Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>  Tue, 24 Jan 2012 12:39:33 +0100
+
 elfutils (0.152-1ubuntu2) precise; urgency=low
 
   * Rebuild for liblzma5.
diff -Nru elfutils-0.152/debian/compat elfutils-0.152/debian/compat
--- elfutils-0.152/debian/compat	2009-03-10 20:07:51.000000000 +0100
+++ elfutils-0.152/debian/compat	2012-01-24 12:38:49.000000000 +0100
@@ -1 +1 @@
-5
+9
diff -Nru elfutils-0.152/debian/control elfutils-0.152/debian/control
--- elfutils-0.152/debian/control	2010-04-24 13:23:00.000000000 +0200
+++ elfutils-0.152/debian/control	2012-01-24 13:12:42.000000000 +0100
@@ -2,7 +2,7 @@
 Priority: optional
 Maintainer: Kurt Roeckx <kurt@roeckx.be>
 Uploaders: Christian Aichinger <Greek0@gmx.net>
-Build-Depends: debhelper (>= 5.0.0), autotools-dev, bzip2, zlib1g-dev, libbz2-dev, liblzma-dev, m4, gettext
+Build-Depends: debhelper (>= 8.1.3), autotools-dev, bzip2, zlib1g-dev, libbz2-dev, liblzma-dev, m4, gettext
 Build-Conflicts: autoconf2.13, automake1.4
 Standards-Version: 3.8.4
 Section: libs
@@ -11,6 +11,7 @@
 Package: elfutils
 Section: utils
 Architecture: any
+Multi-Arch: same
 Depends: ${shlibs:Depends}, libdw1 (= ${binary:Version}), ${misc:Depends}
 Description: collection of utilities to handle ELF objects
  Elfutils is a collection of utilities, including eu-ld (a linker),
@@ -21,7 +22,9 @@
 
 Package: libelf1
 Architecture: any
+Multi-Arch: same
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
 Description: library to read and write ELF files
  The libelf1 package provides a shared library which allows reading and
  writing ELF files on a high level.  Third party programs depend on
@@ -33,6 +36,7 @@
 Package: libelf-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: libelf1 (= ${binary:Version}), ${misc:Depends}
 Conflicts: libelfg0-dev
 Description: libelf1 development libraries and header files
@@ -44,6 +48,7 @@
 Package: libdw-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: libelf-dev, libdw1 (= ${binary:Version}), ${misc:Depends}
 Description: libdw1 development libraries and header files
  libdw1 provides a library that provides access to DWARF debug information
@@ -56,7 +61,9 @@
 
 Package: libdw1
 Architecture: any
+Multi-Arch: same
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
 Description: library that provides access to the DWARF debug information
  libdw1 provides a library that provides access to DWARF debug information
  stored inside ELF files.
@@ -65,7 +72,9 @@
 
 Package: libasm1
 Architecture: any
+Multi-Arch: same
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
 Description: library with a programmable assembler interface
  The libasm1 package provides a library with a programmable assembler
  interface.  It allows you to create ELF files on a low level.
@@ -75,6 +84,7 @@
 Package: libasm-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: libasm1 (= ${binary:Version}), libelf-dev, ${misc:Depends}
 Conflicts: libelfsh0-dev, libasm0-dev
 Description: libasm development libraries and header files
diff -Nru elfutils-0.152/debian/libasm1.install elfutils-0.152/debian/libasm1.install
--- elfutils-0.152/debian/libasm1.install	2009-03-10 20:07:51.000000000 +0100
+++ elfutils-0.152/debian/libasm1.install	2012-01-24 12:45:36.000000000 +0100
@@ -1,2 +1,2 @@
-usr/lib/libasm.so.1
-usr/lib/libasm-*.so
+usr/lib/*/libasm.so.1
+usr/lib/*/libasm-*.so
diff -Nru elfutils-0.152/debian/libasm-dev.install elfutils-0.152/debian/libasm-dev.install
--- elfutils-0.152/debian/libasm-dev.install	2009-03-10 20:07:51.000000000 +0100
+++ elfutils-0.152/debian/libasm-dev.install	2012-01-24 12:39:09.000000000 +0100
@@ -1,3 +1,3 @@
 usr/include/elfutils/libasm.h
-usr/lib/libasm.a
-usr/lib/libasm.so
+usr/lib/*/libasm.a
+usr/lib/*/libasm.so
diff -Nru elfutils-0.152/debian/libdw1.install elfutils-0.152/debian/libdw1.install
--- elfutils-0.152/debian/libdw1.install	2009-08-14 14:28:21.000000000 +0200
+++ elfutils-0.152/debian/libdw1.install	2012-01-24 12:39:09.000000000 +0100
@@ -1,3 +1,3 @@
-usr/lib/libdw.so.1
-usr/lib/libdw-0.*.so
-usr/lib/elfutils/
+usr/lib/*/libdw.so.1
+usr/lib/*/libdw-0.*.so
+usr/lib/*/elfutils/
diff -Nru elfutils-0.152/debian/libdw-dev.install elfutils-0.152/debian/libdw-dev.install
--- elfutils-0.152/debian/libdw-dev.install	2009-08-14 14:28:38.000000000 +0200
+++ elfutils-0.152/debian/libdw-dev.install	2012-01-24 12:39:09.000000000 +0100
@@ -1,5 +1,5 @@
 usr/include/dwarf.h
 usr/include/elfutils/libdw.h
 usr/include/elfutils/libdwfl.h
-usr/lib/libdw.so
-usr/lib/libdw.a
+usr/lib/*/libdw.so
+usr/lib/*/libdw.a
diff -Nru elfutils-0.152/debian/libelf1.install elfutils-0.152/debian/libelf1.install
--- elfutils-0.152/debian/libelf1.install	2010-04-24 12:40:31.000000000 +0200
+++ elfutils-0.152/debian/libelf1.install	2012-01-24 12:39:09.000000000 +0100
@@ -1,3 +1,3 @@
-usr/lib/libelf.so.1
-usr/lib/libelf-*.so
+usr/lib/*/libelf.so.1
+usr/lib/*/libelf-*.so
 usr/share/locale/
diff -Nru elfutils-0.152/debian/libelf-dev.install elfutils-0.152/debian/libelf-dev.install
--- elfutils-0.152/debian/libelf-dev.install	2009-05-02 15:58:14.000000000 +0200
+++ elfutils-0.152/debian/libelf-dev.install	2012-01-24 12:39:09.000000000 +0100
@@ -3,5 +3,5 @@
 usr/include/nlist.h
 usr/include/elfutils/elf-knowledge.h
 usr/include/elfutils/version.h
-usr/lib/libelf.a
-usr/lib/libelf.so
+usr/lib/*/libelf.a
+usr/lib/*/libelf.so
diff -Nru elfutils-0.152/debian/rules elfutils-0.152/debian/rules
--- elfutils-0.152/debian/rules	2010-04-26 21:04:57.000000000 +0200
+++ elfutils-0.152/debian/rules	2012-01-24 13:00:01.000000000 +0100
@@ -17,6 +17,7 @@
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
         confflags += --build=$(DEB_HOST_GNU_TYPE)
@@ -57,7 +58,7 @@
 	-ls -l /proc/$$$$/maps
 	-ls -l /proc/$$$$/auxv
 	-ls -l /proc/$$$$/
-	LC_CTYPE=C $(MAKE) check
+	LC_ALL=C $(MAKE) check
 endif
 
 	touch build-stamp
@@ -77,7 +78,7 @@
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 
 	# Add here commands to install the package into debian/tmp
@@ -86,12 +87,17 @@
 	rm debian/tmp/usr/lib/libebl.a
 	rm debian/tmp/usr/include/elfutils/libebl.h
 
+	install -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv $(CURDIR)/debian/tmp/usr/lib/lib* $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+	mv $(CURDIR)/debian/tmp/usr/lib/elfutils $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
+
 # Build architecture-independent files here.
-binary-indep: build install
+build-indep: build install
+binary-indep: build-indep
 # We have nothing to do.
 
 # Build architecture-dependent files here.
-binary-arch: build install
+build-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs ChangeLog
@@ -112,6 +118,7 @@
 	dh_md5sums
 	dh_builddeb
 
+binary-arch: build-arch
 binary: binary-indep binary-arch
 
 maint-unpatch:

