[Pkg-crosswire-commits] [sword] 04/08: multiarch enable

Daniel Glassey wdg at moszumanska.debian.org
Mon Sep 7 15:33:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

wdg pushed a commit to branch master
in repository sword.

commit aefdb0abced935bcec17bce5bc6652f63486c665
Author: Daniel Glassey <wdg at debian.org>
Date:   Mon Sep 7 15:56:03 2015 +0100

    multiarch enable
---
 debian/control                 | 10 +++++++++-
 debian/libsword-dev.install    |  5 +++--
 debian/libsword11v5.install    |  2 +-
 debian/patches/multiarch.patch | 34 ++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 debian/rules                   |  4 +++-
 6 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/debian/control b/debian/control
index 9f59bf3..2051a4b 100644
--- a/debian/control
+++ b/debian/control
@@ -19,8 +19,10 @@ Homepage: http://www.crosswire.org/sword/
 
 Package: libsword11v5
 Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
 Depends: libsword-common, ${shlibs:Depends}, ${misc:Depends}
 Recommends: sword-frontend
+Multi-Arch: same
 Description: API/library for bible software
  The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
  MacOSX etc.) API/library for Bible software with a constantly growing list 
@@ -38,6 +40,7 @@ Architecture: any
 Section: libdevel
 Depends: libsword11v5 (= ${binary:Version}), ${misc:Depends}
 Recommends: libsword-utils
+Multi-Arch: same
 Description: Development files for libsword
  The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
  MacOSX etc.) API/library for Bible software with a constantly growing list 
@@ -50,9 +53,10 @@ Description: Development files for libsword
 Package: libsword-common
 Architecture: all
 Section: devel
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${misc:Depends}
 Conflicts: libsword6, libsword7, libsword8
 Replaces: libsword6, libsword7, libsword8
+Multi-Arch: foreign
 Description: common settings and module repository for libsword
  The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
  MacOSX etc.) API/library for Bible software with a constantly growing list 
@@ -64,6 +68,7 @@ Description: common settings and module repository for libsword
 Package: libsword-utils
 Architecture: any
 Section: devel
+Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Conflicts: libsword6, libsword7, libsword8
 Replaces: libsword6, libsword7, libsword8
@@ -80,6 +85,7 @@ Package: libsword-dbg
 Architecture: any
 Section: debug
 Priority: extra
+Multi-Arch: same
 Depends: libsword11v5 (= ${binary:Version}), ${misc:Depends}
 Description: API/library for bible software - Debug Files
  The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
@@ -92,6 +98,8 @@ Description: API/library for bible software - Debug Files
 Package: diatheke
 Architecture: any
 Section: text
+Provides: sword-frontend
+Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: command line bible browsing and search tool
  The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
diff --git a/debian/libsword-dev.install b/debian/libsword-dev.install
index 8119ce0..b211acf 100644
--- a/debian/libsword-dev.install
+++ b/debian/libsword-dev.install
@@ -1,3 +1,4 @@
 usr/include
-usr/lib/libsword.a
-usr/lib/pkgconfig
+usr/lib/*/libsword.a
+usr/lib/*/libsword.so
+usr/lib/*/pkgconfig
diff --git a/debian/libsword11v5.install b/debian/libsword11v5.install
index 79e4168..825d1a3 100644
--- a/debian/libsword11v5.install
+++ b/debian/libsword11v5.install
@@ -1 +1 @@
-usr/lib/libsword.so.11
+usr/lib/*/libsword.so.11
diff --git a/debian/patches/multiarch.patch b/debian/patches/multiarch.patch
new file mode 100644
index 0000000..2dc94e7
--- /dev/null
+++ b/debian/patches/multiarch.patch
@@ -0,0 +1,34 @@
+Description: install to multiarch locations
+Author: Daniel Glassey <wdg at debian.org>
+
+Index: sword-1.7.3+dfsg/cmake/install.cmake
+===================================================================
+--- sword-1.7.3+dfsg.orig/cmake/install.cmake	2015-09-02 00:23:45.451613059 +0100
++++ sword-1.7.3+dfsg/cmake/install.cmake	2015-09-02 00:24:49.763931921 +0100
+@@ -5,17 +5,17 @@
+ # Configuration files, of course
+ SET(prefix 		"${PREFIX}")
+ SET(exec_prefix 	"${PREFIX}")
+-SET(libdir              "${LIBDIR}")
++SET(libdir              "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}")
+ SET(includedir 		"${INCLUDEDIR}")
+ 
+ # Install the library
+ IF(BUILDING_SHARED)
+ 	INSTALL(TARGETS sword
+-		DESTINATION "${LIBDIR}")
++		DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}")
+ ENDIF(BUILDING_SHARED)
+ IF(BUILDING_STATIC)
+ 	INSTALL(TARGETS sword_static
+-		DESTINATION "${LIBDIR}")
++		DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}")
+ ENDIF(BUILDING_STATIC)
+ # Install the locales
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/locales.d
+@@ -53,4 +53,4 @@
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/swversion.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/swversion.h @ONLY)
+ 
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sword.pc
+-	DESTINATION "${LIBDIR}/pkgconfig")
++	DESTINATION "${LIBDIR}/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig")
diff --git a/debian/patches/series b/debian/patches/series
index 4ead391..c133da1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ multiarch-clucene.patch
 no-included-zconf.h.diff
 dso-missing-shared.patch
 abicompare.patch
+multiarch.patch
diff --git a/debian/rules b/debian/rules
index 13d8352..b8e2fa2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@ DH_VERBOSE := 1
 ppa:=$(shell sed -n "1s/.*~.*/yes/p" debian/changelog)
 ver:=$(shell dpkg-parsechangelog | sed -nr "2s/Version: (.*)-.*/\1/p")
 bd :=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 WFLAGS   := -Wall -Werror -Wno-error=deprecated-declarations
 CFLAGS    = $(shell dpkg-buildflags --get CFLAGS) $(WFLAGS)
@@ -12,6 +13,7 @@ CXXFLAGS  = $(shell dpkg-buildflags --get CXXFLAGS) $(WFLAGS)
 	dh $@
 override_dh_auto_configure:
 	dh_auto_configure -Scmake -- \
+	-DCMAKE_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \
 	-DLIBSWORD_LIBRARY_TYPE="Shared Static" \
 	-DLIBSWORD_SOVERSION=11 \
 	-DSWORD_GLOBAL_CONF_DIR='/etc' \
@@ -27,7 +29,7 @@ override_dh_auto_test:
 override_dh_auto_install:
 	dh_auto_install -Scmake
 override_dh_install:
-	chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/*so*
+	chrpath -d debian/tmp/usr/bin/* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*so*
 	dh_install --list-missing
 	# Fixes FTBFS if running binary-arch target only
 	-chmod -x debian/libsword-common/usr/share/sword/locales.d/*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-crosswire/sword.git



More information about the Pkg-crosswire-commits mailing list