diff mbox

please add multi-arch support for gpm

Message ID 20110823105128.GC15357@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Aug. 23, 2011, 10:51 a.m. UTC
Package: gpm
Version: 1.20.4-3.4
Severity: normal
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

Hi,

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

Since gpm is bottom dependency installed by default when installing
toolchain, we need a early conversion of gpm to be able to take advantage
of multiarch.

Riku
diff mbox

Patch

diff -urN orig/gpm-1.20.4//debian/control gpm-1.20.4//debian/control
--- orig/gpm-1.20.4//debian/control	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/control	2011-08-23 13:21:05.938530001 +0300
@@ -8,7 +7,7 @@ 
 Homepage: http://unix.schottelius.org/gpm/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-gpm/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-gpm/trunk/
-Build-Depends: autoconf, quilt (>= 0.4), debhelper (>= 6.0.7), mawk | awk,
+Build-Depends: autoconf, quilt (>= 0.4), debhelper (>= 8.1.3), mawk | awk,
  bison, texlive-base, texinfo, texi2html
 
 Package: gpm
@@ -16,6 +15,7 @@ 
 Section: misc
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, debianutils (>= 1.7), ucf (>= 0.28), lsb-base
+Multi-Arch: foreign
 Conflicts: libgpmg1
 Description: General Purpose Mouse interface
  This package provides a daemon that captures mouse events when the system
@@ -30,6 +30,8 @@ 
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Conflicts: gpm (<< 1.20.3~pre3)
 Suggests: gpm
 Description: General Purpose Mouse - shared library
@@ -42,6 +44,7 @@ 
 Section: libdevel
 Architecture: any
 Depends: libgpm2 (= ${binary:Version}), libc6-dev | libc-dev, ${misc:Depends}
+Multi-Arch: same
 Conflicts: libgpmg1-dev (<< 1.20.4)
 Replaces: libgpmg1-dev (<< 1.20.4)
 Provides: libgpmg1-dev
diff -urN orig/gpm-1.20.4//debian/libgpm2.install gpm-1.20.4//debian/libgpm2.install
--- orig/gpm-1.20.4//debian/libgpm2.install	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/libgpm2.install	2011-08-23 12:32:40.504692001 +0300
@@ -1,2 +1 @@ 
-src/lib/libgpm.so.2.0.0 usr/lib
 
diff -urN orig/gpm-1.20.4//debian/libgpm2.links gpm-1.20.4//debian/libgpm2.links
--- orig/gpm-1.20.4//debian/libgpm2.links	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/libgpm2.links	1970-01-01 02:00:00.000000000 +0200
@@ -1,2 +0,0 @@ 
-usr/lib/libgpm.so.2.0.0 usr/lib/libgpm.so.2
-
diff -urN orig/gpm-1.20.4//debian/libgpm-dev.install gpm-1.20.4//debian/libgpm-dev.install
--- orig/gpm-1.20.4//debian/libgpm-dev.install	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/libgpm-dev.install	2011-08-23 12:32:44.524692001 +0300
@@ -1,2 +1 @@ 
 src/headers/gpm.h usr/include/
-src/lib/libgpm.a usr/lib/
diff -urN orig/gpm-1.20.4//debian/libgpm-dev.links gpm-1.20.4//debian/libgpm-dev.links
--- orig/gpm-1.20.4//debian/libgpm-dev.links	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/libgpm-dev.links	1970-01-01 02:00:00.000000000 +0200
@@ -1,2 +0,0 @@ 
-usr/lib/libgpm.so.2 usr/lib/libgpm.so
-
diff -urN orig/gpm-1.20.4//debian/rules gpm-1.20.4//debian/rules
--- orig/gpm-1.20.4//debian/rules	2011-08-23 11:19:32.000000000 +0300
+++ gpm-1.20.4//debian/rules	2011-08-23 13:31:34.218530001 +0300
@@ -17,6 +17,7 @@ 
 
 export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 	confflags += --build $(DEB_HOST_GNU_TYPE)
@@ -68,8 +69,9 @@ 
 	dh_testroot
 	dh_clean -k
 	
-	dh_installdirs
-	dh_install
+	dh_installdirs -pgpm
+	dh_install -pgpm
+
 	
 	$(INSTALL_PROGRAM) debian/gpm.apm \
 	                   debian/gpm/etc/apm/event.d/gpm
@@ -78,6 +80,14 @@ 
 	$(INSTALL_PROGRAM) contrib/scripts/microtouch-setup \
 	                   debian/gpm/usr/sbin/gpm-microtouch-setup
 	
+	mkdir -p debian/libgpm2/usr/lib/$(DEB_HOST_MULTIARCH)
+	$(INSTALL_PROGRAM) src/lib/libgpm.so.2.0.0 debian/libgpm2/usr/lib/$(DEB_HOST_MULTIARCH)
+	ln -s libgpm.so.2.0.0 debian/libgpm2/usr/lib/$(DEB_HOST_MULTIARCH)/libgpm.so.2
+
+	mkdir -p debian/libgpm-dev/usr/lib/$(DEB_HOST_MULTIARCH)
+	ln -s libgpm.so.2 debian/libgpm-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libgpm.so
+	$(INSTALL_PROGRAM) src/lib/libgpm.a debian/libgpm-dev/usr/lib/$(DEB_HOST_MULTIARCH)
+	
 	dh_installinfo
 	dh_installman
 	dh_installdocs