Package: taglib
Version: 1.7-1
Severity: normal
Tags: patch

This patch provides Multi-Arch support for the release goal, which we
worked on at the Portland Bug Squashing Party today.

Thanks!

-Kees

-- 
Kees Cook                                            @debian.org
diff -Nru taglib-1.7/debian/changelog taglib-1.7/debian/changelog
--- taglib-1.7/debian/changelog 2011-04-09 09:32:42.000000000 -0700
+++ taglib-1.7/debian/changelog 2011-12-04 17:31:01.000000000 -0800
@@ -1,3 +1,11 @@
+taglib (1.7-2) UNRELEASED; urgency=low
+
+  * debian/{control,rules,*.install}: convert to Multi-Arch.
+  * debian/*patches/multiarch.diff: inject library triplet into cmake.
+  * debian/libtag1-rusxmms.install.in: target must be defined at build time.
+
+ -- Kees Cook <k...@debian.org>  Sun, 04 Dec 2011 15:48:59 -0800
+
 taglib (1.7-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru taglib-1.7/debian/compat taglib-1.7/debian/compat
--- taglib-1.7/debian/compat    2010-05-13 14:52:24.000000000 -0700
+++ taglib-1.7/debian/compat    2011-12-04 15:52:23.000000000 -0800
@@ -1 +1 @@
-7
+9
diff -Nru taglib-1.7/debian/control taglib-1.7/debian/control
--- taglib-1.7/debian/control   2011-04-09 07:58:14.000000000 -0700
+++ taglib-1.7/debian/control   2011-12-04 15:55:38.000000000 -0800
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 Maintainer: Modestas Vainius <mo...@debian.org>
-Build-Depends: cmake (>= 2.6.2), debhelper (>= 7.3), dpkg-dev (>= 1.15.3), 
quilt (>= 0.46-7~), zlib1g-dev, librcc-dev
+Build-Depends: cmake (>= 2.6.2), debhelper (>= 8.1.3~), dpkg-dev (>= 1.15.3), 
quilt (>= 0.46-7~), zlib1g-dev, librcc-dev
 Build-Depends-Indep: doxygen, graphviz, gsfonts-x11
 Standards-Version: 3.9.2
 Homepage: http://developer.kde.org/~wheeler/taglib.html
@@ -11,6 +11,8 @@
 
 Package: libtag1c2a
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: libtag1-vanilla (= ${binary:Version}) | libtag1-rusxmms (= 
${binary:Version}), ${misc:Depends}
 Conflicts: libtag-extras0
 Description: audio meta-data library
@@ -26,6 +28,8 @@
 
 Package: libtag1-vanilla
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libtag1-rusxmms, libtag-extras0
 Replaces: libtag1c2a (<< 1.5-5)
@@ -41,6 +45,8 @@
 
 Package: libtag1-rusxmms
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libtag1-vanilla, libtag-extras0
 Replaces: libtag1c2a (<< 1.5-5)
@@ -84,6 +90,8 @@
 
 Package: libtagc0
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: audio meta-data library - C bindings
  TagLib is a library for reading and editing the meta-data of several popular
@@ -97,6 +105,8 @@
 Package: libtagc0-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: libtagc0 (= ${binary:Version}), libtag1-dev (= ${binary:Version}), 
${misc:Depends}
 Description: audio meta-data library - development files for C bindings
  TagLib is a library for reading and editing the meta-data of several popular
diff -Nru taglib-1.7/debian/libtag1-dev.install 
taglib-1.7/debian/libtag1-dev.install
--- taglib-1.7/debian/libtag1-dev.install       2011-04-09 09:32:16.000000000 
-0700
+++ taglib-1.7/debian/libtag1-dev.install       2011-12-04 15:53:32.000000000 
-0800
@@ -78,5 +78,5 @@
 usr/include/taglib/wavproperties.h
 usr/include/taglib/xingheader.h
 usr/include/taglib/xiphcomment.h
-usr/lib/libtag.so
-usr/lib/pkgconfig/taglib.pc
+usr/lib/*/libtag.so
+usr/lib/*/pkgconfig/taglib.pc
diff -Nru taglib-1.7/debian/libtag1-rusxmms.install 
taglib-1.7/debian/libtag1-rusxmms.install
--- taglib-1.7/debian/libtag1-rusxmms.install   2011-04-09 09:32:16.000000000 
-0700
+++ taglib-1.7/debian/libtag1-rusxmms.install   1969-12-31 16:00:00.000000000 
-0800
@@ -1,2 +0,0 @@
-debian/tmp-rusxmms/usr/lib/libtag.so.1         usr/lib
-debian/tmp-rusxmms/usr/lib/libtag.so.1.*       usr/lib
diff -Nru taglib-1.7/debian/libtag1-rusxmms.install.in 
taglib-1.7/debian/libtag1-rusxmms.install.in
--- taglib-1.7/debian/libtag1-rusxmms.install.in        1969-12-31 
16:00:00.000000000 -0800
+++ taglib-1.7/debian/libtag1-rusxmms.install.in        2011-12-04 
16:10:01.000000000 -0800
@@ -0,0 +1 @@
+debian/tmp-rusxmms/usr/lib/@@@DEB_HOST_MULTIARCH@@@/libtag.so.* 
/usr/lib/@@@DEB_HOST_MULTIARCH@@@/
diff -Nru taglib-1.7/debian/libtag1-vanilla.install 
taglib-1.7/debian/libtag1-vanilla.install
--- taglib-1.7/debian/libtag1-vanilla.install   2011-04-09 09:32:16.000000000 
-0700
+++ taglib-1.7/debian/libtag1-vanilla.install   2011-12-04 16:22:51.000000000 
-0800
@@ -1,2 +1,2 @@
-usr/lib/libtag.so.1
-usr/lib/libtag.so.1.*
+usr/lib/*/libtag.so.1
+usr/lib/*/libtag.so.1.*
diff -Nru taglib-1.7/debian/libtagc0-dev.install 
taglib-1.7/debian/libtagc0-dev.install
--- taglib-1.7/debian/libtagc0-dev.install      2011-04-09 09:32:16.000000000 
-0700
+++ taglib-1.7/debian/libtagc0-dev.install      2011-12-04 15:54:56.000000000 
-0800
@@ -1,3 +1,3 @@
 usr/include/taglib/tag_c.h
-usr/lib/libtag_c.so
-usr/lib/pkgconfig/taglib_c.pc
+usr/lib/*/libtag_c.so
+usr/lib/*/pkgconfig/taglib_c.pc
diff -Nru taglib-1.7/debian/libtagc0.install taglib-1.7/debian/libtagc0.install
--- taglib-1.7/debian/libtagc0.install  2011-04-09 09:32:16.000000000 -0700
+++ taglib-1.7/debian/libtagc0.install  2011-12-04 15:55:07.000000000 -0800
@@ -1,2 +1,2 @@
-usr/lib/libtag_c.so.0
-usr/lib/libtag_c.so.0.0.0
+usr/lib/*/libtag_c.so.0
+usr/lib/*/libtag_c.so.0.0.0
diff -Nru taglib-1.7/debian/patches/multiarch.diff 
taglib-1.7/debian/patches/multiarch.diff
--- taglib-1.7/debian/patches/multiarch.diff    1969-12-31 16:00:00.000000000 
-0800
+++ taglib-1.7/debian/patches/multiarch.diff    2011-12-04 17:09:12.000000000 
-0800
@@ -0,0 +1,16 @@
+Description: insert the multiarch triplet into the library install path.
+Author: Kees Cook <k...@debian.org>
+
+Index: taglib-1.7/CMakeLists.txt
+===================================================================
+--- taglib-1.7.orig/CMakeLists.txt     2011-12-04 16:54:49.940430354 -0800
++++ taglib-1.7/CMakeLists.txt  2011-12-04 16:55:25.020874157 -0800
+@@ -14,7 +14,7 @@
+ add_definitions(-DHAVE_CONFIG_H)
+ 
+ #add some KDE specific stuff
+-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
++set(LIB_SUFFIX "/${DEB_HOST_MULTIARCH}" CACHE STRING "Define suffix of 
directory name (32/64)" )
+ set(EXEC_INSTALL_PREFIX  ${CMAKE_INSTALL_PREFIX}       CACHE PATH  "Base 
directory for executables and libraries" FORCE)
+ #
+ ## the following are directories where stuff will be installed to
diff -Nru taglib-1.7/debian/patches/series taglib-1.7/debian/patches/series
--- taglib-1.7/debian/patches/series    2011-04-09 08:17:40.000000000 -0700
+++ taglib-1.7/debian/patches/series    2011-12-04 16:54:47.000000000 -0800
@@ -1 +1,2 @@
 upstream_doxygen_out_of_source.diff
+multiarch.diff
diff -Nru taglib-1.7/debian/rules taglib-1.7/debian/rules
--- taglib-1.7/debian/rules     2011-04-09 08:07:37.000000000 -0700
+++ taglib-1.7/debian/rules     2011-12-04 17:13:15.000000000 -0800
@@ -2,8 +2,9 @@
 
 export CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
 export CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-CMAKE_ARGS = -DCMAKE_USE_RELATIVE_PATHS=ON -DWITH_ASF=ON -DWITH_MP4=ON
+CMAKE_ARGS = -DCMAKE_USE_RELATIVE_PATHS=ON -DWITH_ASF=ON -DWITH_MP4=ON 
-DDEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH)
 DH_AUTO_ARGS = --buildsystem=cmake
 QUILT := quilt --quiltrc /dev/null
 MAKE_ME = $(MAKE) -f $(lastword $(MAKEFILE_LIST))
@@ -55,8 +56,9 @@
 ### Install / binary building ###
 override_dh_auto_install:
        dh_auto_install --builddirectory=builddir-vanilla $(DH_AUTO_ARGS) 
-       install -d -m755 debian/tmp-rusxmms/usr/lib/
-       cp -a builddir-rusxmms/taglib/libtag.so.* debian/tmp-rusxmms/usr/lib 
+       install -d -m755 debian/tmp-rusxmms/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a builddir-rusxmms/taglib/libtag.so.* 
debian/tmp-rusxmms/usr/lib/$(DEB_HOST_MULTIARCH)/
+       sed -e 's/@@@DEB_HOST_MULTIARCH@@@/$(DEB_HOST_MULTIARCH)/g' 
"$(CURDIR)/debian/libtag1-rusxmms.install.in" > 
"$(CURDIR)/debian/libtag1-rusxmms.install"
 
 override_dh_installdocs:
        dh_installdocs
@@ -80,6 +82,7 @@
        rm -rf $(patsubst %,debian/tmp-%,$(FLAVOURS))
        rm -f debian/stamp-*
        rm -f $(RUSXMMS_PATCH_SERIES)
+       rm -f $(CURDIR)/debian/libtag1-rusxmms.install
        # Clean documentation
        rm -rf doc/html
        dh clean
diff -Nru taglib-1.7/debian/rusxmms-patches/multiarch.diff 
taglib-1.7/debian/rusxmms-patches/multiarch.diff
--- taglib-1.7/debian/rusxmms-patches/multiarch.diff    1969-12-31 
16:00:00.000000000 -0800
+++ taglib-1.7/debian/rusxmms-patches/multiarch.diff    2011-12-04 
17:09:32.000000000 -0800
@@ -0,0 +1,16 @@
+Description: insert the multiarch triplet into the library install path.
+Author: Kees Cook <k...@debian.org>
+
+Index: taglib-1.7/CMakeLists.txt
+===================================================================
+--- taglib-1.7.orig/CMakeLists.txt     2011-12-04 16:54:49.940430354 -0800
++++ taglib-1.7/CMakeLists.txt  2011-12-04 16:55:25.020874157 -0800
+@@ -14,7 +14,7 @@
+ add_definitions(-DHAVE_CONFIG_H)
+ 
+ #add some KDE specific stuff
+-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
++set(LIB_SUFFIX "/${DEB_HOST_MULTIARCH}" CACHE STRING "Define suffix of 
directory name (32/64)" )
+ set(EXEC_INSTALL_PREFIX  ${CMAKE_INSTALL_PREFIX}       CACHE PATH  "Base 
directory for executables and libraries" FORCE)
+ #
+ ## the following are directories where stuff will be installed to

Reply via email to