diff --git a/libzrtpcpp-libdir.patch b/libzrtpcpp-libdir.patch new file mode 100644 index 0000000..373ba76 --- /dev/null +++ b/libzrtpcpp-libdir.patch @@ -0,0 +1,16 @@ +--- libzrtpcpp-2.0.0/CMakeLists.txt.orig 2012-04-05 15:26:17.231590000 +0200 ++++ libzrtpcpp-2.0.0/CMakeLists.txt 2012-04-05 15:26:37.471769000 +0200 +@@ -50,12 +50,7 @@ + args_help() + + # this caused problems in debian where it has to always be lib.... +-set(LIBDIRNAME "lib") +-if (NOT EXISTS /etc/debian_version) +- if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" ) +- set(LIBDIRNAME "lib64") +- endif() +-endif() ++set(LIBDIRNAME "lib${LIB_SUFFIX}") + + # setup the Thread include and lib + find_package(Threads) diff --git a/libzrtpcpp-ppc64.patch b/libzrtpcpp-ppc64.patch deleted file mode 100644 index b0d727e..0000000 --- a/libzrtpcpp-ppc64.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libzrtpcpp-2.0.0/CMakeLists.txt.orig 2012-04-05 13:55:16.254447000 +0200 -+++ libzrtpcpp-2.0.0/CMakeLists.txt 2012-04-05 13:55:42.722086000 +0200 -@@ -52,7 +52,7 @@ - # this caused problems in debian where it has to always be lib.... - set(LIBDIRNAME "lib") - if (NOT EXISTS /etc/debian_version) -- if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" ) -+ if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64" ) - set(LIBDIRNAME "lib64") - endif() - endif() diff --git a/libzrtpcpp.changes b/libzrtpcpp.changes index 1e692d5..3c069c6 100644 --- a/libzrtpcpp.changes +++ b/libzrtpcpp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 5 13:28:26 UTC 2012 - dvaleev@suse.com + +- better libdir handling + ------------------------------------------------------------------- Thu Apr 5 11:59:40 UTC 2012 - dvaleev@suse.com diff --git a/libzrtpcpp.spec b/libzrtpcpp.spec index 6682e22..e19af79 100644 --- a/libzrtpcpp.spec +++ b/libzrtpcpp.spec @@ -31,7 +31,7 @@ BuildRequires: gcc-c++ BuildRequires: ccrtp-devel >= 2.0.0 BuildRequires: libopenssl-devel >= 0.9.8 BuildRequires: pkgconfig -Patch0: libzrtpcpp-ppc64.patch +Patch0: libzrtpcpp-libdir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -74,6 +74,9 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \ +%ifarch x86_64 ppc64 s390x + -DLIB_SUFFIX=64 \ +%endif .. make %{?_smp_mflags} V=1