diff -pruN 6.3-8/debian/changelog 6.3-8ubuntu8/debian/changelog
--- 6.3-8/debian/changelog	2014-08-03 17:33:18.000000000 +0000
+++ 6.3-8ubuntu8/debian/changelog	2016-09-17 13:34:21.000000000 +0000
@@ -1,3 +1,34 @@
+readline6 (6.3-8ubuntu8) yakkety; urgency=medium
+
+  * Stop building the -dev packages.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Sep 2016 15:34:21 +0200
+
+readline6 (6.3-8ubuntu4) yakkety; urgency=medium
+
+  * Stop building packages built by the readline source package.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Sep 2016 15:03:02 +0200
+
+readline6 (6.3-8ubuntu3) yakkety; urgency=medium
+
+  * No-change rebuild for readline soname change.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 17 Sep 2016 12:08:54 +0000
+
+readline6 (6.3-8ubuntu2) xenial; urgency=medium
+
+  * Build 32 packages on s390x.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Thu, 04 Feb 2016 15:32:32 +0000
+
+readline6 (6.3-8ubuntu1) utopic; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - Build x32 packages.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 04 Aug 2014 09:45:25 +0200
+
 readline6 (6.3-8) unstable; urgency=medium
 
   * Split out a readline-doc package for documentation and examples.
@@ -45,6 +76,19 @@ readline6 (6.3-5) unstable; urgency=medi
 
  -- Matthias Klose <doko@debian.org>  Sat, 29 Mar 2014 18:03:53 +0100
 
+readline6 (6.3-4ubuntu2) trusty; urgency=medium
+
+  * Fix a display issue when a multiline command is aborted with ^C.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 28 Mar 2014 19:46:45 +0100
+
+readline6 (6.3-4ubuntu1) trusty; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - Build x32 packages.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 20 Mar 2014 04:18:57 +0100
+
 readline6 (6.3-4) unstable; urgency=medium
 
   * Fix an issue in vi-mode, not re-doing the latest "dw", "dl", "D", ...
@@ -71,6 +115,20 @@ readline6 (6.3-2) unstable; urgency=medi
 
  -- Matthias Klose <doko@debian.org>  Wed, 19 Mar 2014 13:42:21 +0100
 
+readline6 (6.3-1ubuntu2) trusty; urgency=medium
+
+  * rl_dispatch_callback-segv.diff: Add upstream patch from Chet Ramey
+    SIGSEGV in _rl_dispatch_callback() (Closes: #741555, LP: #1290287)
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Fri, 14 Mar 2014 14:37:56 -0600
+
+readline6 (6.3-1ubuntu1) trusty; urgency=medium
+
+  * Merge with Debian; remaining changes:
+    - Build x32 packages.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 03 Mar 2014 10:37:35 +0100
+
 readline6 (6.3-1) unstable; urgency=medium
 
   * readline 6.3 release.
@@ -78,6 +136,12 @@ readline6 (6.3-1) unstable; urgency=medi
 
  -- Matthias Klose <doko@debian.org>  Mon, 03 Mar 2014 08:24:21 +0100
 
+readline6 (6.2-9ubuntu1) raring; urgency=low
+
+  * Build x32 packages.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 14 Nov 2012 12:18:05 +0100
+
 readline6 (6.2-9) unstable; urgency=low
 
   * Apply upstream patches 002 - 004. Fixes:
diff -pruN 6.3-8/debian/control 6.3-8ubuntu8/debian/control
--- 6.3-8/debian/control	2014-08-03 17:36:06.000000000 +0000
+++ 6.3-8ubuntu8/debian/control	2016-09-17 13:31:51.000000000 +0000
@@ -1,14 +1,16 @@
 Source: readline6
 Section: libs
 Priority: important
-Maintainer: Matthias Klose <doko@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Matthias Klose <doko@debian.org>
 Standards-Version: 3.9.5
 Build-Depends: debhelper (>= 8.1.3),
-  libtinfo-dev, lib32tinfo-dev [amd64 ppc64],
+  libtinfo-dev, lib32tinfo-dev [amd64 ppc64 s390x],
   libncursesw5-dev (>= 5.6),
-  lib32ncursesw5-dev [amd64 ppc64], lib64ncurses5-dev [i386 powerpc sparc s390],
+  lib32ncursesw5-dev [amd64 ppc64 s390x], lib64ncurses5-dev [i386 powerpc sparc s390],
   mawk | awk, texinfo, autotools-dev,
-  gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc]
+  libx32tinfo-dev [amd64 i386], libx32ncursesw5-dev [amd64 i386],
+  gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 s390x sparc]
 
 Package: libreadline6
 Architecture: any
@@ -38,72 +40,38 @@ Description: GNU readline and history li
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
 
-Package: readline-common
-Architecture: all
-Multi-Arch: foreign
-Section: utils
-Depends: dpkg (>= 1.15.4) | install-info, ${misc:Depends}
-Conflicts: libreadline5 (<< 5.0-11), libreadline-common
-Replaces: libreadline4 (<< 4.3-16), libreadline5 (<< 5.0-11), libreadline-common
-Suggests: readline-doc
-Priority: important
-Description: GNU readline and history libraries, common files
- The GNU readline library aids in the consistency of user interface
- across discrete programs that need to provide a command line
- interface.
- .
- The GNU history library provides a consistent user interface for
- recalling lines of previously typed input.
-
-Package: libreadline-dev
-Architecture: any
-Depends: libreadline6-dev (= ${binary:Version}), ${misc:Depends}
-Conflicts: libreadline-gplv2-dev
-Multi-Arch: same
-Section: libdevel
-Priority: optional
-Description: GNU readline and history libraries, development files
- The GNU readline library aids in the consistency of user interface
- across discrete programs that need to provide a command line
- interface.
- .
- The GNU history library provides a consistent user interface for
- recalling lines of previously typed input.
- .
- This package is a dependency package depending on libreadline6-dev.
-
-Package: libreadline6-dev
-Architecture: any
-Section: libdevel
-Priority: optional
-Depends: libreadline6 (= ${binary:Version}), libtinfo-dev, dpkg (>= 1.15.4) | install-info, ${misc:Depends}
-Multi-Arch: same
-Conflicts: libreadline5-dev, libreadline-gplv2-dev
-Suggests: readline-doc
-Description: GNU readline and history libraries, development files
- The GNU readline library aids in the consistency of user interface
- across discrete programs that need to provide a command line
- interface.
- .
- The GNU history library provides a consistent user interface for
- recalling lines of previously typed input.
- .
- This package contains development files.
-
-Package: lib64readline6-dev
-Architecture: i386 powerpc s390 sparc
-Depends: lib64readline6 (= ${binary:Version}), ${devxx:Depends}, ${misc:Depends}
-Provides: lib64readline-dev
-Conflicts: lib64readline-dev, lib64readline-gplv2-dev
-Section: libdevel
-Priority: optional
-Description: GNU readline and history libraries, development files (64-bit)
- The GNU readline library aids in the consistency of user interface
- across discrete programs that need to provide a command line
- interface.
- .
- The GNU history library provides a consistent user interface for
- recalling lines of previously typed input.
+#Package: libreadline6-dev
+#Architecture: any
+#Section: libdevel
+#Priority: optional
+#Depends: libreadline6 (= ${binary:Version}), libtinfo-dev, dpkg (>= 1.15.4) | install-info, ${misc:Depends}
+#Multi-Arch: same
+#Conflicts: libreadline5-dev, libreadline-gplv2-dev, libreadline-dev
+#Suggests: readline-doc
+#Description: GNU readline and history libraries, development files
+# The GNU readline library aids in the consistency of user interface
+# across discrete programs that need to provide a command line
+# interface.
+# .
+# The GNU history library provides a consistent user interface for
+# recalling lines of previously typed input.
+# .
+# This package contains development files.
+
+#Package: lib64readline6-dev
+#Architecture: i386 powerpc s390 sparc
+#Depends: lib64readline6 (= ${binary:Version}), ${devxx:Depends}, ${misc:Depends}
+#Provides: lib64readline-dev
+#Conflicts: lib64readline-dev, lib64readline-gplv2-dev
+#Section: libdevel
+#Priority: optional
+#Description: GNU readline and history libraries, development files (64-bit)
+# The GNU readline library aids in the consistency of user interface
+# across discrete programs that need to provide a command line
+# interface.
+# .
+# The GNU history library provides a consistent user interface for
+# recalling lines of previously typed input.
 
 Package: libreadline6-dbg
 Architecture: any
@@ -121,22 +89,8 @@ Description: GNU readline and history li
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
 
-Package: rlfe
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Section: utils
-Priority: optional
-Provides: readline-editor
-Description: Front-end using readline to "cook" input lines for other programs
- This tool lets you use history and line-editing in any text oriented
- tool. This is especially useful with third-party proprietary tools that
- cannot be distributed linked against readline. It is not perfect but it
- works pretty well.
- .
- See the ledit and rlwrap packages for other programs of that kind.
-
 Package: lib32readline6
-Architecture: amd64 ppc64
+Architecture: amd64 ppc64 s390x
 Depends: readline-common, ${shlibs:Depends}, ${misc:Depends}
 Section: libs
 Priority: optional
@@ -148,31 +102,45 @@ Description: GNU readline and history li
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
 
-Package: lib32readline6-dev
-Architecture: amd64 ppc64
-Depends: lib32readline6 (= ${binary:Version}), lib32tinfo-dev, ${devxx:Depends}, ${misc:Depends}
-Provides: lib32readline-dev
-Conflicts: lib32readline-dev, lib32readline-gplv2-dev
-Section: libdevel
-Priority: optional
-Description: GNU readline and history libraries, development files (32-bit)
- The GNU readline library aids in the consistency of user interface
- across discrete programs that need to provide a command line
- interface.
- .
- The GNU history library provides a consistent user interface for
- recalling lines of previously typed input.
+#Package: lib32readline6-dev
+#Architecture: amd64 ppc64 s390x
+#Depends: lib32readline6 (= ${binary:Version}), lib32tinfo-dev, ${devxx:Depends}, ${misc:Depends}
+#Provides: lib32readline-dev
+#Conflicts: lib32readline-dev, lib32readline-gplv2-dev
+#Section: libdevel
+#Priority: optional
+#Description: GNU readline and history libraries, development files (32-bit)
+# The GNU readline library aids in the consistency of user interface
+# across discrete programs that need to provide a command line
+# interface.
+# .
+# The GNU history library provides a consistent user interface for
+# recalling lines of previously typed input.
 
-Package: readline-doc
-Architecture: all
-Section: doc
-Depends: dpkg (>= 1.15.4) | install-info, ${misc:Depends}
-Replaces: libreadline6-dev (<< 6.3-8)
+Package: libx32readline6
+Architecture: amd64 i386
+Depends: readline-common, ${shlibs:Depends}, ${misc:Depends}
+Section: libs
 Priority: optional
-Description: GNU readline and history libraries, documentation and examples
+Description: GNU readline and history libraries, run-time libraries (x32)
  The GNU readline library aids in the consistency of user interface
  across discrete programs that need to provide a command line
  interface.
  .
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
+
+#Package: libx32readline6-dev
+#Architecture: amd64 i386
+#Depends: libx32readline6 (= ${binary:Version}), libx32tinfo-dev, libc6-dev-x32, ${misc:Depends}
+#Provides: libx32readline-dev
+#Conflicts: libx32readline-dev, libx32readline-gplv2-dev
+#Section: libdevel
+#Priority: optional
+#Description: GNU readline and history libraries, development files (x32)
+# The GNU readline library aids in the consistency of user interface
+# across discrete programs that need to provide a command line
+# interface.
+# .
+# The GNU history library provides a consistent user interface for
+# recalling lines of previously typed input.
diff -pruN 6.3-8/debian/libx32readline6.symbols 6.3-8ubuntu8/debian/libx32readline6.symbols
--- 6.3-8/debian/libx32readline6.symbols	1970-01-01 00:00:00.000000000 +0000
+++ 6.3-8ubuntu8/debian/libx32readline6.symbols	2014-08-04 07:49:00.000000000 +0000
@@ -0,0 +1,4 @@
+libhistory.so.6 libx32readline6 #MINVER#
+#include "libhistory6.symbols.common"
+libreadline.so.6 libx32readline6 #MINVER#
+#include "libreadline6.symbols.common"
diff -pruN 6.3-8/debian/rules 6.3-8ubuntu8/debian/rules
--- 6.3-8/debian/rules	2014-08-03 17:34:34.000000000 +0000
+++ 6.3-8ubuntu8/debian/rules	2016-09-17 13:34:21.000000000 +0000
@@ -40,7 +40,7 @@ ifneq (,$(findstring /$(DEB_HOST_ARCH)/,
   endif
 endif
 
-ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/ppc64/))
+ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/ppc64/s390x/))
   build32 = yes
   CC32 = $(CROSS) -m32
   lib32dir = lib32
@@ -55,6 +55,20 @@ ifneq (,$(findstring /$(DEB_HOST_ARCH)/,
     ARCH32 = powerpc
     HOST32 = powerpc-linux-gnu
   endif
+  ifeq ($(DEB_HOST_ARCH),s390x)
+    ARCH32 = s390
+    HOST32 = s390-linux-gnu
+    CC32 = $(CROSS) -m31
+  endif
+endif
+
+ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/i386/))
+  buildx32 = yes
+  CCX32 = $(CROSS) -mx32
+  libx32dir = usr/libx32
+  libx32devdir = usr/libx32
+  ARCHX32 = x32
+  HOSTX32 = x86_64-linux-gnux32
 endif
 
 CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
@@ -77,10 +91,13 @@ p_rld64	= $(p_rl64)-dev
 p_rlg	= $(p_rl)-dbg
 p_doc	= readline-doc
 p_rlfe	= rlfe
+p_rlx32	= libx32readline$(soversion)
+p_rldx32= $(p_rlx32)-dev
 
 d	= debian/tmp
 d32	= debian/tmp32
 d64	= debian/tmp64
+dx32	= debian/tmp32
 d_rl	= debian/$(p_rl)
 d_rl32	= debian/$(p_rl32)
 d_rl64	= debian/$(p_rl64)
@@ -92,11 +109,14 @@ d_rld64	= debian/$(p_rld64)
 d_rlg	= debian/$(p_rlg)
 d_doc	= debian/$(p_doc)
 d_rlfe	= debian/$(p_rlfe)
+d_rlx32	= debian/$(p_rlx32)
+d_rldx32= debian/$(p_rldx32)
 
 srcdir		= $(CURDIR)
 builddir	= $(CURDIR)/build
 builddir32	= $(CURDIR)/build32
 builddir64	= $(CURDIR)/build64
+builddirx32	= $(CURDIR)/buildx32
 
 default: build
 
@@ -129,6 +149,14 @@ ifneq ($(build64),)
 		--host=$(HOST64) --prefix=/usr
 endif
 
+ifneq ($(buildx32),)
+	rm -rf $(builddirx32)
+	mkdir $(builddirx32)
+	cd $(builddirx32) && \
+	  CC="$(CCX32)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(srcdir)/configure \
+		--host=$(HOSTX32) --prefix=/usr
+endif
+
 	touch configure-stamp
 
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
@@ -166,6 +194,17 @@ ifneq ($(build64),)
 	    SHLIB_LIBS="-ltinfo"
 	    SHLIB_XLDFLAGS='-Wl,-soname,`echo $$@ | sed s/\\..$$$$//`'
 endif
+
+ifneq ($(buildx32),)
+	$(MAKE) -C $(builddirx32) \
+	    CC="$(CCX32)" \
+	    CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+	    SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='$(LDFLAGS) -shared' \
+	    SHLIB_LIBS="-ltinfo"
+	    SHLIB_XLDFLAGS='-Wl,-soname,`echo $$@ | sed s/\\..$$$$//`'
+endif
+
 	$(MAKE) -C $(builddir)/doc info
 
 	touch build-stamp
@@ -236,6 +275,8 @@ install-stamp:
 		usr/share/readline \
 		usr/share/info \
 		usr/share/doc
+	rm -rf $(d)/usr/share/man
+ifeq (0,1)
 	mv $(d)/usr/share/man $(d_comm)/usr/share/.
 	mv $(d_comm)/usr/share/man/man3/history.3 \
 		$(d_comm)/usr/share/man/man3/history.3readline
@@ -243,6 +284,7 @@ install-stamp:
 		$(d_comm)/usr/share/man/man3/readline.3readline
 	mv $(d)/usr/share/info/rluserman.info $(d_comm)/usr/share/info/.
 	install -m 644 debian/inputrc $(d_comm)/usr/share/readline/
+endif
 
 	: # move $(p_rlg)
 	dh_installdirs -p$(p_rlg) \
@@ -260,6 +302,9 @@ install-stamp:
 		usr/lib/$(DEB_HOST_MULTIARCH)/ \
 		usr/share/doc \
 		usr/share/info
+	rm -f $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.a
+	rm -rf $(d)/usr/include
+ifeq (0,1)
 	ln -s /lib/$(DEB_HOST_MULTIARCH)/libhistory.so.$(soversion) \
 		$(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/libhistory.so
 	ln -s /lib/$(DEB_HOST_MULTIARCH)/libreadline.so.$(soversion) \
@@ -281,6 +326,7 @@ install-stamp:
 	  mv -f $(d_rld)/usr/include/readline/chardefs.h.new \
 	    $(d_rld)/usr/include/readline/chardefs.h; \
 	fi
+endif
 
 	: # install $(p_rlfe)
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
@@ -321,7 +367,8 @@ ifneq ($(build32),)
 		$(d_rld32)/$(lib32devdir)/libhistory.so
 	ln -s /$(lib32dir)/libreadline.so.$(soversion) \
 		$(d_rld32)/$(lib32devdir)/libreadline.so
-	mv $(d32)/usr/lib/lib{history,readline}.a $(d_rld32)/$(lib32devdir)/.
+	-mv $(d32)/usr/lib/lib{history,readline}.a $(d_rld32)/$(lib32devdir)/.
+	rm -f $(d32)/usr/lib/lib{history,readline}.a
 endif
 
 ifneq ($(build64),)
@@ -356,7 +403,8 @@ ifneq ($(build64),)
 		$(d_rld64)/usr/lib64/libhistory.so
 	ln -s /lib64/libreadline.so.$(soversion) \
 		$(d_rld64)/usr/lib64/libreadline.so
-	mv $(d64)/usr/lib/lib{history,readline}.a $(d_rld64)/usr/lib64/.
+	-mv $(d64)/usr/lib/lib{history,readline}.a $(d_rld64)/usr/lib64/.
+	rm -f $(d64)/usr/lib/lib{history,readline}.a
 endif
 
 	: # $(p_doc)
@@ -364,11 +412,46 @@ endif
 	mv $(d)/usr/share/info/{readline.info,history.info} \
 		$(d_doc)/usr/share/info/.
 
+ifneq ($(buildx32),)
+	rm -rf $(dx32)
+	mkdir -p $(dx32)/usr/bin
+	$(MAKE) -C $(builddirx32) install \
+	    CC="$(CCX32)" \
+	    CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared $(LDFLAGS)' \
+	    SHLIB_XLDFLAGS='-Wl,-soname,`echo $$@ | sed s/\\..$$$$//`' \
+	    SHLIB_LIBS=-ltinfo \
+	    DESTDIR=$(CURDIR)/$(dx32) \
+	    mandir=/usr/share/man \
+	    infodir=/usr/share/info
+
+	dh_installdirs -p$(p_rlx32) \
+	    $(libx32dir) \
+	    usr/share/doc
+	cp -p $(dx32)/usr/lib/lib{history,readline}.so.$(libversion) \
+		$(d_rlx32)/$(libx32dir)/
+	ln -s libhistory.so.$(libversion) \
+		$(d_rlx32)/$(libx32dir)/libhistory.so.$(soversion)
+	ln -s libreadline.so.$(libversion) \
+		$(d_rlx32)/$(libx32dir)/libreadline.so.$(soversion)
+
+	dh_installdirs -p$(p_rldx32) \
+	    $(libx32devdir) \
+	    usr/share/doc
+	ln -s /$(libx32dir)/libhistory.so.$(soversion) \
+		$(d_rldx32)/$(libx32devdir)/libhistory.so
+	ln -s /$(lib32dir)/libreadline.so.$(soversion) \
+		$(d_rldx32)/$(libx32devdir)/libreadline.so
+	-mv $(dx32)/usr/lib/lib{history,readline}.a $(d_rldx32)/$(libx32devdir)/.
+	rm -f $(dx32)/usr/lib/lib{history,readline}.a
+endif
+
 	touch install-stamp
 
 binary-indep: build install
 	dh_testdir
 	dh_testroot
+ifeq (0,1)
 	mkdir -p $(d_doc)/usr/share/doc/$(p_rl)/examples
 	cp -p $(builddir)/examples/Makefile examples/*.c \
 		$(d_doc)/usr/share/doc/$(p_rl)/examples/
@@ -394,6 +477,7 @@ binary-indep: build install
 	dh_gencontrol -i
 	dh_md5sums -i
 	dh_builddeb -i
+endif
 
 binary-arch: build install
 	dh_testdir
@@ -409,16 +493,18 @@ binary-arch: build install
 	ln -sf $(p_rld) $(d_rldnv)/usr/share/doc/$(p_rldnv)
 
 ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ifeq (0,1)
 	dh_installdocs -p$(p_rlfe) examples/rlfe/README
 	dh_installchangelogs -p$(p_rlfe) examples/rlfe/ChangeLog
+endif
 
-	dh_fixperms -p$(p_rl) -p$(p_rld) -p$(p_rldnv) -p$(p_rlg) -p$(p_rlfe)
-	dh_strip --dbg-package=$(p_rlg) -p$(p_rl) -p$(p_rld) -p$(p_rldnv) -p$(p_rlg) -p$(p_rlfe)
-	dh_compress -p$(p_rl) -p$(p_rld) -p$(p_rldnv) -p$(p_rlg) -p$(p_rlfe) \
+	dh_fixperms -p$(p_rl) -p$(p_rlg)
+	dh_strip --dbg-package=$(p_rlg) -p$(p_rl) -p$(p_rlg)
+	dh_compress -p$(p_rl) -p$(p_rlg) \
 		-X.c -XMakefile
 	dh_makeshlibs -p$(p_rl)
 	cp -p debian/$(p_rl).shlibs debian/shlibs.local
-	dh_shlibdeps -p$(p_rl) -p$(p_rld) -p$(p_rldnv) -p$(p_rlg) -p$(p_rlfe) \
+	dh_shlibdeps -p$(p_rl) -p$(p_rlg) \
 		 -L $(p_rl) -l $(d_rl)/lib
 endif
 
@@ -428,11 +514,11 @@ ifneq ($(build32),)
 		USAGE debian/inputrc.arrows
 	dh_installchangelogs -p$(p_rl32) CHANGES
 	ln -sf $(p_rl32) $(d_rld32)/usr/share/doc/$(p_rld32)
-	dh_compress -p$(p_rl32) -p$(p_rld32)
-	dh_fixperms -p$(p_rl32) -p$(p_rld32)
-	dh_strip --dbg-package=$(p_rlg) -p$(p_rl32) -p$(p_rld32)
+	dh_compress -p$(p_rl32)
+	dh_fixperms -p$(p_rl32)
+	dh_strip --dbg-package=$(p_rlg) -p$(p_rl32)
 	dh_makeshlibs -p$(p_rl32)
-	-dh_shlibdeps -p$(p_rl32) -p$(p_rld32) \
+	-dh_shlibdeps -p$(p_rl32) \
 		 -L $(p_rl32) -l $(d_rl32)/lib
 	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
 endif
@@ -443,15 +529,30 @@ ifneq ($(build64),)
 		USAGE debian/inputrc.arrows
 	dh_installchangelogs -p$(p_rl64) CHANGES
 	ln -sf $(p_rl64) $(d_rld64)/usr/share/doc/$(p_rld64)
-	dh_compress -p$(p_rl64) -p$(p_rld64)
-	dh_fixperms -p$(p_rl64) -p$(p_rld64)
-	dh_strip --dbg-package=$(p_rlg) -p$(p_rl64) -p$(p_rld64)
+	dh_compress -p$(p_rl64)
+	dh_fixperms -p$(p_rl64)
+	dh_strip --dbg-package=$(p_rlg) -p$(p_rl64)
 	dh_makeshlibs -p$(p_rl64)
-	-dh_shlibdeps -p$(p_rl64) -p$(p_rld64) \
+	-dh_shlibdeps -p$(p_rl64) \
 		 -L $(p_rl64) -l $(d_rl64)/lib
 	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
 endif
 
+ifneq ($(buildx32),)
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+	dh_installdocs -p$(p_rlx32) \
+		USAGE debian/inputrc.arrows
+	dh_installchangelogs -p$(p_rlx32) CHANGES
+	ln -sf $(p_rlx32) $(d_rldx32)/usr/share/doc/$(p_rldx32)
+	dh_compress -p$(p_rlx32)
+	dh_fixperms -p$(p_rlx32)
+	dh_strip --dbg-package=$(p_rlg) -p$(p_rlx32)
+	dh_makeshlibs -p$(p_rlx32)
+	-dh_shlibdeps -p$(p_rlx32) \
+		 -L $(p_rlx32) -l $(d_rlx32)/lib
+	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
+endif
+
 	dh_installdeb -s
 	dh_gencontrol -s $(gencontrol_flags)
 	dh_md5sums -s
