diff mbox

please add multi-arch support for pciutils

Message ID 20110912091421.GA18309@afflict.kos.to
State Accepted
Headers show

Commit Message

Riku Voipio Sept. 12, 2011, 9:14 a.m. UTC
Package: pciutils
Version: 0.48-7
Severity: normal
User: debian-dpkg@lists.debian.org
Usertags: multiarch
Tags: patch

Hi,

The following package converts pciutils to multiarch directories and adds
needed Multi-Arch: stanzas to control file. Please ask if any questions.

http://wiki.debian.org/Multiarch/Implementation
https://wiki.ubuntu.com/MultiarchSpec#Dependencies_involving_Architecture:_all_packages

Riku
diff mbox

Patch

diff -urN orig/pciutils-3.1.7//debian/control pciutils-3.1.7//debian/control
--- orig/pciutils-3.1.7//debian/control	2011-04-13 06:15:35.000000000 +0300
+++ pciutils-3.1.7//debian/control	2011-09-12 10:01:40.422406001 +0300
@@ -3,7 +3,7 @@ 
 Priority: optional
 Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
 Uploaders: Matthew Wilcox <willy@debian.org>, Matt Taggart <taggart@debian.org>
-Build-Depends: debhelper (>= 7), zlib1g-dev
+Build-Depends: debhelper (>= 8.1.3), zlib1g-dev
 Standards-Version: 3.9.2
 Homepage: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
 
@@ -11,6 +11,7 @@ 
 Architecture: any
 Priority: standard
 Depends: ${shlibs:Depends}, ${misc:Depends}, libpci3 (= ${binary:Version})
+Multi-Arch: foreign
 Suggests: bzip2, wget | curl | lynx
 Description: Linux PCI Utilities
  This package contains various utilities for inspecting and setting of
@@ -24,6 +25,7 @@ 
 Conflicts: pciutils-dev
 Provides: pciutils-dev
 Replaces: pciutils-dev
+Multi-Arch: same
 Description: Linux PCI Utilities (development files)
  This package contains the <pci/pci.h>, <pci/config.h> and <pci/header.h>
  header files, as well as the /usr/lib/libpci.a library.
@@ -33,6 +35,8 @@ 
 Priority: standard
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Conflicts: libpci2
 Provides: libpci2
 Replaces: libpci2
diff -urN orig/pciutils-3.1.7//debian/libpci3.dirs pciutils-3.1.7//debian/libpci3.dirs
--- orig/pciutils-3.1.7//debian/libpci3.dirs	2008-04-13 04:49:40.000000000 +0300
+++ pciutils-3.1.7//debian/libpci3.dirs	1970-01-01 02:00:00.000000000 +0200
@@ -1 +0,0 @@ 
-usr/lib
diff -urN orig/pciutils-3.1.7//debian/libpci-dev.dirs pciutils-3.1.7//debian/libpci-dev.dirs
--- orig/pciutils-3.1.7//debian/libpci-dev.dirs	2008-02-20 10:28:34.000000000 +0200
+++ pciutils-3.1.7//debian/libpci-dev.dirs	2011-09-12 10:15:13.432406001 +0300
@@ -1,4 +1,2 @@ 
 usr/include/pci
-usr/lib
-usr/lib/pkgconfig
 usr/share/doc
diff -urN orig/pciutils-3.1.7//debian/rules pciutils-3.1.7//debian/rules
--- orig/pciutils-3.1.7//debian/rules	2011-07-27 05:18:16.000000000 +0300
+++ pciutils-3.1.7//debian/rules	2011-09-12 10:15:45.752406001 +0300
@@ -4,11 +4,13 @@ 
 
 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=CC=$(DEB_HOST_GNU_TYPE)-gcc
 endif
 
-PATHS := PREFIX=/usr SBINDIR=/usr/bin IDSDIR=/usr/share/misc
+PATHS := LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) PREFIX=/usr SBINDIR=/usr/bin IDSDIR=/usr/share/misc
 
 update-ids:
 	# get a new version of pci.ids, this should only be run by the
@@ -47,15 +49,17 @@ 
 	gunzip debian/pciutils/usr/share/misc/pci.ids.gz
 
 	# libpci-dev
-	install -m 644 lib/libpci.a debian/libpci-dev/usr/lib/
+	mkdir -p debian/libpci-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
+	install -m 644 lib/libpci.a debian/libpci-dev/usr/lib/$(DEB_HOST_MULTIARCH)
 	install -m 644 lib/pci.h lib/header.h lib/config.h lib/types.h \
 			debian/libpci-dev/usr/include/pci/
-	install -m 644 lib/libpci.pc debian/libpci-dev/usr/lib/pkgconfig/
-	ln -s libpci.so.3.1.7 debian/libpci-dev/usr/lib/libpci.so
+	install -m 644 lib/libpci.pc debian/libpci-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
+	ln -s libpci.so.3.1.7 debian/libpci-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libpci.so
 
 	# libpci3
-	install -m 644 lib/libpci.so* debian/libpci3/usr/lib/
-	ln -s libpci.so.3.1.7 debian/libpci3/usr/lib/libpci.so.3
+	mkdir -p debian/libpci3/usr/lib/$(DEB_HOST_MULTIARCH)
+	install -m 644 lib/libpci.so* debian/libpci3/usr/lib/$(DEB_HOST_MULTIARCH)
+	ln -s libpci.so.3.1.7 debian/libpci3/usr/lib/$(DEB_HOST_MULTIARCH)/libpci.so.3
 
 	# pciutils-udeb
 	# Reduce by removing subsystem ids and comments.