diff mbox

please add multi-arch support for popt

Message ID 20110819112821.GA29606@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Aug. 19, 2011, 11:28 a.m. UTC
Package: popt
Version: 1.16-1
Severity: wishlist
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

Hi,

libpopt0 is one of the bottom dependencies in debian, and thus is 
need early multiarch conversion. Any reverse dependencies of libpopt0
cant be (usefully) multiarch until libpopt0 is converted.

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

For more information, see:

http://wiki.debian.org/Multiarch/Implementation

Riku
diff mbox

Patch

diff -urN tmp/popt-1.16//debian/control popt-1.16//debian/control
--- tmp/popt-1.16//debian/control	2010-05-13 07:12:36.000000000 +0300
+++ popt-1.16//debian/control	2011-08-19 14:10:57.772543530 +0300
@@ -2,7 +2,7 @@ 
 Section: devel
 Priority: optional
 Maintainer: Paul Martin <pm@debian.org>
-Build-Depends: debhelper (>> 7), gettext, quilt
+Build-Depends: debhelper (>> 8.1.3), gettext, quilt
 Homepage: http://rpm5.org/
 Standards-Version: 3.8.4
 
@@ -11,6 +11,8 @@ 
 Section: libs
 Priority: important
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Conflicts: popt, libpopt-dev (<= 1.4-1), rpm (<= 4.0.2-3)
 Replaces: popt
 Description: lib for parsing cmdline parameters
@@ -28,6 +30,7 @@ 
 Section: libdevel
 Priority: optional
 Depends: libc6-dev | libc-dev, libpopt0 (= ${binary:Version}), ${misc:Depends}
+Multi-Arch: same
 Conflicts: popt
 Replaces: popt
 Description: lib for parsing cmdline parameters - development files
diff -urN tmp/popt-1.16//debian/libpopt0.install popt-1.16//debian/libpopt0.install
--- tmp/popt-1.16//debian/libpopt0.install	2010-05-13 06:52:04.000000000 +0300
+++ popt-1.16//debian/libpopt0.install	1970-01-01 02:00:00.000000000 +0200
@@ -1,2 +0,0 @@ 
-debian/tmp/usr/lib*/libpopt.so.*				lib
-debian/tmp/usr/share/locale/*/LC_MESSAGES/popt.mo
diff -urN tmp/popt-1.16//debian/libpopt0.install.in popt-1.16//debian/libpopt0.install.in
--- tmp/popt-1.16//debian/libpopt0.install.in	1970-01-01 02:00:00.000000000 +0200
+++ popt-1.16//debian/libpopt0.install.in	2011-08-19 14:14:00.582543530 +0300
@@ -0,0 +1,2 @@ 
+debian/tmp/usr/lib/DEB_HOST_MULTIARCH/libpopt.so.*				lib/DEB_HOST_MULTIARCH
+debian/tmp/usr/share/locale/*/LC_MESSAGES/popt.mo
diff -urN tmp/popt-1.16//debian/libpopt0.links popt-1.16//debian/libpopt0.links
--- tmp/popt-1.16//debian/libpopt0.links	2010-05-13 06:52:04.000000000 +0300
+++ popt-1.16//debian/libpopt0.links	1970-01-01 02:00:00.000000000 +0200
@@ -1 +0,0 @@ 
-lib/libpopt.so.0.0.0	lib/libpopt.so.0
diff -urN tmp/popt-1.16//debian/libpopt0.links.in popt-1.16//debian/libpopt0.links.in
--- tmp/popt-1.16//debian/libpopt0.links.in	1970-01-01 02:00:00.000000000 +0200
+++ popt-1.16//debian/libpopt0.links.in	2011-08-19 14:14:14.502543532 +0300
@@ -0,0 +1 @@ 
+lib/DEB_HOST_MULTIARCH/libpopt.so.0.0.0	lib/DEB_HOST_MULTIARCH/libpopt.so.0
diff -urN tmp/popt-1.16//debian/libpopt-dev.install popt-1.16//debian/libpopt-dev.install
--- tmp/popt-1.16//debian/libpopt-dev.install	2010-05-13 06:52:04.000000000 +0300
+++ popt-1.16//debian/libpopt-dev.install	2011-08-19 14:15:31.302543532 +0300
@@ -1,5 +1,5 @@ 
-debian/tmp/usr/lib*/libpopt.so		usr/lib
-debian/tmp/usr/lib*/libpopt.la		usr/lib
-debian/tmp/usr/lib*/libpopt.a		usr/lib
+debian/tmp/usr/lib/*/libpopt.so		
+debian/tmp/usr/lib/*/libpopt.la		
+debian/tmp/usr/lib/*/libpopt.a		
 debian/tmp/usr/share/man/man3/popt.3	usr/share/man/man3
 debian/tmp/usr/include/popt.h		usr/include
diff -urN tmp/popt-1.16//debian/libpopt-dev.links popt-1.16//debian/libpopt-dev.links
--- tmp/popt-1.16//debian/libpopt-dev.links	2010-05-13 06:52:04.000000000 +0300
+++ popt-1.16//debian/libpopt-dev.links	1970-01-01 02:00:00.000000000 +0200
@@ -1 +0,0 @@ 
-lib/libpopt.so.0	usr/lib/libpopt.so
diff -urN tmp/popt-1.16//debian/libpopt-dev.links.in popt-1.16//debian/libpopt-dev.links.in
--- tmp/popt-1.16//debian/libpopt-dev.links.in	1970-01-01 02:00:00.000000000 +0200
+++ popt-1.16//debian/libpopt-dev.links.in	2011-08-19 14:15:50.622543530 +0300
@@ -0,0 +1 @@ 
+lib/DEB_HOST_MULTIARCH/libpopt.so.0	usr/lib/DEB_HOST_MULTIARCH/libpopt.so
diff -urN tmp/popt-1.16//debian/preprocess popt-1.16//debian/preprocess
--- tmp/popt-1.16//debian/preprocess	1970-01-01 02:00:00.000000000 +0200
+++ popt-1.16//debian/preprocess	2011-08-19 14:13:17.742543532 +0300
@@ -0,0 +1,9 @@ 
+#!/bin/sh
+
+DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`
+
+for file in debian/*.in; 
+do
+	target=`echo $file|sed -e 's/...$//'`
+	sed -e s/DEB_HOST_MULTIARCH/$DEB_HOST_MULTIARCH/g $file > $target
+done
diff -urN tmp/popt-1.16//debian/rules popt-1.16//debian/rules
--- tmp/popt-1.16//debian/rules	2010-05-13 07:02:52.000000000 +0300
+++ popt-1.16//debian/rules	2011-08-19 14:16:39.102543532 +0300
@@ -7,6 +7,8 @@ 
 
 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)
+
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 else
@@ -50,7 +52,7 @@ 
 	mkdir $(objdir)
 	# Add here commands to configure the package.
 	cd $(objdir) && \
-	../configure --prefix=/usr --mandir=/usr/share/man --enable-shared $(CROSS)
+	../configure --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --prefix=/usr --mandir=/usr/share/man --enable-shared $(CROSS)
 	touch $@
 
 configure-udeb-stamp:
@@ -124,6 +126,7 @@ 
 	dh_testdir
 	dh_testroot
 
+	sh debian/preprocess
 	dh_install --list-missing
 #	dh_installdebconf	
 	dh_installdocs