[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#639348: libxtst: multiarch



Package: libxtst
Version: 2:1.2.0-3
Severity: minor
Tags: patch

Someone on IRC asked how to use libxtst6 as multi-arch.
I had a quick look and found it wasn't very hard to convert it.
I do not know quite why he needed this - something about "Xilinx ISE",
whatever that is.  But in the spirit of not wasting work, here is my
patch.

The extra dh_strip line in debian/rules are needed so that
--dbg-package does _not_ pick up the udeb, because the udeb
copy of the library is not under the multiarch path.

I'm not sure whether it is safe or reasonable to specify
Multi-Arch: same for the -dev package.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
diff -u libxtst-1.2.0/debian/libxtst-dev.install libxtst-1.2.0/debian/libxtst-dev.install
--- libxtst-1.2.0/debian/libxtst-dev.install
+++ libxtst-1.2.0/debian/libxtst-dev.install
@@ -1,6 +1,6 @@
-usr/lib/libXtst.a
-usr/lib/libXtst.so
-usr/lib/pkgconfig/xtst.pc
+usr/lib/*/libXtst.a
+usr/lib/*/libXtst.so
+usr/lib/*/pkgconfig/xtst.pc
 usr/share/man/man3
 usr/include/X11/extensions/
 usr/share/doc/libxtst-dev/
diff -u libxtst-1.2.0/debian/control libxtst-1.2.0/debian/control
--- libxtst-1.2.0/debian/control
+++ libxtst-1.2.0/debian/control
@@ -4,6 +4,7 @@
 Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
+ dpkg-dev (>= 1.16),
  debhelper (>= 5.0.0),
  libx11-dev (>= 2:0.99.3),
  libxext-dev (>= 2:1.0.99.4),
@@ -26,6 +27,8 @@
 Package: libxtst6
 Section: libs
 Architecture: any
+Multi-Arch: same
+Pre-Depends: multiarch-support
 Depends: ${shlibs:Depends}, ${misc:Depends}, x11-common
 Description: X11 Testing -- Record extension library
  libXtst provides an X Window System client interface to the Record
@@ -50,6 +53,7 @@
 
 Package: libxtst6-dbg
 Architecture: any
+Multi-Arch: same
 Section: debug
 Priority: extra
 Depends: ${shlibs:Depends}, ${misc:Depends}, x11-common, libxtst6 (= ${binary:Version})
diff -u libxtst-1.2.0/debian/libxtst6-udeb.install libxtst-1.2.0/debian/libxtst6-udeb.install
--- libxtst-1.2.0/debian/libxtst6-udeb.install
+++ libxtst-1.2.0/debian/libxtst6-udeb.install
@@ -1 +1 @@
-usr/lib/libXtst.so.6*
+usr/lib/*/libXtst.so.6* usr/lib
diff -u libxtst-1.2.0/debian/rules libxtst-1.2.0/debian/rules
--- libxtst-1.2.0/debian/rules
+++ libxtst-1.2.0/debian/rules
@@ -26,6 +26,7 @@
 DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 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)
 else
@@ -41,6 +42,7 @@
 	cd build && \
 	../configure --prefix=/usr --mandir=\$${prefix}/share/man \
 	             --infodir=\$${prefix}/share/info $(confflags) \
+	             --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 	             --docdir=\$${prefix}/share/doc/libxtst-dev \
 	             --with-xmlto --without-fop \
 	             CFLAGS="$(CFLAGS)" 
@@ -81,7 +83,8 @@
 	dh_installchangelogs ChangeLog
 	dh_installman
 	dh_link
-	dh_strip --dbg-package=$(PACKAGE)-dbg
+	dh_strip -p$(PACKAGE)-udeb
+	dh_strip -N$(PACKAGE)-udeb --dbg-package=$(PACKAGE)-dbg
 	dh_compress
 	dh_fixperms
 	dh_makeshlibs --add-udeb=$(PACKAGE)-udeb
diff -u libxtst-1.2.0/debian/libxtst6.install libxtst-1.2.0/debian/libxtst6.install
--- libxtst-1.2.0/debian/libxtst6.install
+++ libxtst-1.2.0/debian/libxtst6.install
@@ -1 +1 @@
-usr/lib/libXtst.so.6*
+usr/lib/*/libXtst.so.6*

Reply to: