diff mbox

please add multi-arch support for readline5

Message ID 20110822132054.GB10979@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Aug. 22, 2011, 1:20 p.m. UTC
Package: readline5
Version: 5.2-9
Severity: wishlist
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

Hi,

The attached patch converts libreadline5 to multiarch paths 
and adds the relevant Multi-Arch: fields to debian/control.


Riku
diff mbox

Patch

diff -urN old/readline5-5.2//debian/control readline5-5.2//debian/control
--- old/readline5-5.2//debian/control	2011-08-22 13:02:37.000000000 +0300
+++ readline5-5.2//debian/control	2011-08-22 14:31:52.482285001 +0300
@@ -3,11 +3,13 @@ 
 Priority: extra
 Maintainer: Matthias Klose <doko@debian.org>
 Standards-Version: 3.9.2
-Build-Depends: debhelper (>= 5), dpatch, lsb-release, libncurses5-dev (>= 5.6), lib32ncurses5-dev [amd64 ppc64], lib64ncurses5-dev [i386 powerpc sparc s390], mawk | awk, texinfo, autotools-dev, gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc]
+Build-Depends: debhelper (>= 8.1.3), dpatch, lsb-release, libncurses5-dev (>= 5.6), lib32ncurses5-dev [amd64 ppc64], lib64ncurses5-dev [i386 powerpc sparc s390], mawk | awk, texinfo, autotools-dev, gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc]
 
 Package: libreadline5
 Architecture: any
 Depends: readline-common, ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Section: libs
 Description: GNU readline and history libraries, run-time libraries
  The GNU readline library aids in the consistency of user interface
@@ -34,6 +36,7 @@ 
 Depends: libreadline5 (= ${binary:Version}), libncurses5-dev, ${shlibs:Depends}, ${misc:Depends}, dpkg (>= 1.15.4) | install-info
 Conflicts: libreadline-dev, libreadline5-dev
 Replaces: libreadline5-dev
+Multi-Arch: same
 Section: libdevel
 Description: GNU readline and history libraries, development files
  The GNU readline library aids in the consistency of user interface
diff -urN old/readline5-5.2//debian/rules readline5-5.2//debian/rules
--- old/readline5-5.2//debian/rules	2011-08-22 13:02:37.000000000 +0300
+++ readline5-5.2//debian/rules	2011-08-22 15:28:23.532285002 +0300
@@ -11,6 +11,7 @@ 
 DEB_HOST_ARCH_OS	?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 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)
 
 distribution := $(shell lsb_release -is)
 
@@ -108,7 +109,8 @@ 
 	cd $(builddir) && \
 	  CC=$(CC) $(srcdir)/configure \
 		--with-curses --prefix=/usr\
-		--host=$(DEB_HOST_GNU_TYPE)
+		--host=$(DEB_HOST_GNU_TYPE) \
+		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
 
 ifneq ($(build32),)
 	rm -rf $(builddir32)
@@ -217,9 +219,9 @@ 
 	: # move $(p_rl)
 	dh_installdirs -p$(p_rl) \
 		etc \
-		lib \
+		lib/$(DEB_HOST_MULTIARCH) \
 		usr/share/doc
-	cp -a $(d)/usr/lib/lib{history,readline}.so.* $(d_rl)/lib/
+	cp -a $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.so.* $(d_rl)/lib/$(DEB_HOST_MULTIARCH)
 #	cp -a $(d)/usr/lib/lib{history,readline}.so.$(libversion) $(d_rl)/lib/
 #	ln -s libhistory.so.$(libversion) \
 #		$(d_rl)/lib/libhistory.so.$(soversion)
@@ -246,7 +248,7 @@ 
 	dh_installdirs -p$(p_rlg) \
 		usr/lib/debug \
 		usr/share/doc
-	mv $(d)/usr/lib/lib{history,readline}.so.$(libversion) \
+	mv $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.so.$(libversion) \
 		$(d_rlg)/usr/lib/debug/.
 	ln -s libhistory.so.$(libversion) \
 		$(d_rlg)/usr/lib/debug/libhistory.so.$(soversion)
@@ -258,9 +260,9 @@ 
 		usr/lib \
 		usr/share/doc \
 		usr/share/info
-	ln -s /lib/libhistory.so.$(soversion) $(d_rld)/usr/lib/libhistory.so
-	ln -s /lib/libreadline.so.$(soversion) $(d_rld)/usr/lib/libreadline.so
-	mv $(d)/usr/lib/lib{history,readline}.a	$(d_rld)/usr/lib/.
+	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) $(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/libreadline.so
+	mv $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.a	$(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/.
 	mv $(d)/usr/include $(d_rld)/usr/.
 	mv $(d)/usr/share/info/{readline.info,history.info} \
 		$(d_rld)/usr/share/info/.