Really attaching the patch.

--
Dmitry Shachnev
--- a/debian/libowncloudsync0.install
+++ b/debian/libowncloudsync0.install
@@ -1 +1 @@
-usr/lib/libowncloudsync.so.*
+usr/lib/*/libowncloudsync.so.*
--- a/debian/patches/0004-cmake-multiarch.patch
+++ b/debian/patches/0004-cmake-multiarch.patch
@@ -0,0 +1,43 @@
+Description: install libraries in multiarch location
+Author: Dmitry Shachnev <mity...@gmail.com>
+Last-Update: 2014-01-02
+
+--- a/cmake/modules/GNUInstallDirs.cmake
++++ b/cmake/modules/GNUInstallDirs.cmake
+@@ -75,18 +75,24 @@
+   #  - we are NOT on debian
+   #  - we are on a 64 bits system
+   # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
+-  # Note that the future of multi-arch handling may be even
+-  # more complicated than that: http://wiki.debian.org/Multiarch
+-  if(CMAKE_SYSTEM_NAME MATCHES "Linux"
+-      AND NOT CMAKE_CROSSCOMPILING
+-      AND NOT EXISTS "/etc/debian_version")
+-    if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
+-      message(AUTHOR_WARNING
+-        "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
+-        "Please enable at least one language before including GNUInstallDirs.")
+-    else()
+-      if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+-        set(_LIBDIR_DEFAULT "lib64")
++  # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
++  # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
++  # See http://wiki.debian.org/Multiarch
++  if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
++      AND NOT CMAKE_CROSSCOMPILING)
++    if (EXISTS "/etc/debian_version") # is this a debian system ?
++       if(CMAKE_LIBRARY_ARCHITECTURE)
++         set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
++       endif()
++    else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
++      if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
++        message(AUTHOR_WARNING
++          "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
++          "Please enable at least one language before including GNUInstallDirs.")
++      else()
++        if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
++          set(_LIBDIR_DEFAULT "lib64")
++        endif()
+       endif()
+     endif()
+   endif()
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-disable-updatecheck.patch
 0002-create-manpage.patch
 0003-respect-the-XDG_CONFIG_HOME-env-variable.patch
+0004-cmake-multiarch.patch

Reply via email to