From e6cb71fb9247ef97e77d381b7a29fdb9a1a654a2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 5 Oct 2016 08:19:51 -0500 Subject: [PATCH] kde4-libs: inflate soname to avoid collisions (#1374869) - fix Obsoletes --- kde-connect.spec | 38 ++++++++++++++++++++------------- kdeconnect-kde-0.8-soname.patch | 9 ++++++++ 2 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 kdeconnect-kde-0.8-soname.patch diff --git a/kde-connect.spec b/kde-connect.spec index 38510f0..7a43442 100644 --- a/kde-connect.spec +++ b/kde-connect.spec @@ -1,11 +1,11 @@ # once kf5 dolphin lands, may consider disabling this -- rex -%if 0%{?fedora} < 24 +#if 0%{?fedora} < 24 %global _with_kde4 1 -%endif +#endif Name: kde-connect Version: 1.0.1 -Release: 1%{?dist} +Release: 1%{?dist}.1 License: GPLv2+ Summary: KDE Connect client for communication with smartphones @@ -25,6 +25,8 @@ Source2: kde-connect.xml # Upstream patch for KDE 4 version Patch0: kdeconnect-kde-0.8-b-revision.patch +# artificially inflate kde4 lib soname +99 to avoid risk of collison with kf5 lib of same basename +Patch1: kdeconnect-kde-0.8-soname.patch BuildRequires: desktop-file-utils BuildRequires: extra-cmake-modules @@ -53,8 +55,8 @@ BuildRequires: pkgconfig(libfakekey) BuildRequires: pkgconfig(QJson) BuildRequires: pkgconfig(qca2) %else -Obsoletes: kde-connect-kde4-ioslave < 0.9 -Obsoletes: kde-connect-kde4-libs < 0.9 +Obsoletes: kde-connect-kde4-ioslave < %{version}-%{release} +Obsoletes: kde-connect-kde4-libs < %{verson}-%{release} %endif # upstream name @@ -121,6 +123,7 @@ Requires: fuse-sshfs tar xfJ %{SOURCE1} pushd kdeconnect-kde-0.8 %patch0 -p1 +%patch1 -p1 -b .soname popd %endif @@ -148,15 +151,7 @@ popd %install -make install/fast DESTDIR=%{buildroot} -C %{_target_platform} - -install -m644 -p -D %{SOURCE2} %{buildroot}%{_prefix}/lib/firewalld/services/kde-connect.xml - -%find_lang %{name} --all-name - -# https://bugzilla.redhat.com/show_bug.cgi?id=1296523 -desktop-file-edit --remove-key=OnlyShowIn %{buildroot}%{_sysconfdir}/xdg/autostart/kdeconnectd.desktop - +# install kde4 bits first to reduce risk of polluting or overwriting kf5 stuff %if 0%{?_with_kde4} make install/fast DESTDIR=%{buildroot} -C kdeconnect-kde-0.8/%{_target_platform}/interfaces make install/fast DESTDIR=%{buildroot} -C kdeconnect-kde-0.8/%{_target_platform}/kio @@ -167,6 +162,15 @@ rm -rfv %{buildroot}%{_libdir}/cmake/ rm -rfv %{buildroot}%{_kde4_libdir}/libkdeconnectinterfaces.so %endif +make install/fast DESTDIR=%{buildroot} -C %{_target_platform} + +install -m644 -p -D %{SOURCE2} %{buildroot}%{_prefix}/lib/firewalld/services/kde-connect.xml + +%find_lang %{name} --all-name + +# https://bugzilla.redhat.com/show_bug.cgi?id=1296523 +desktop-file-edit --remove-key=OnlyShowIn %{buildroot}%{_sysconfdir}/xdg/autostart/kdeconnectd.desktop + %check desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.kdeconnect.kcm.desktop @@ -232,7 +236,7 @@ fi %postun kde4-libs -p /sbin/ldconfig %files kde4-libs -%{_kde4_libdir}/libkdeconnectinterfaces.so.1* +%{_kde4_libdir}/libkdeconnectinterfaces.so.100* %files kde4-ioslave %{_kde4_datadir}/kde4/services/kdeconnect.protocol @@ -241,6 +245,10 @@ fi %changelog +* Wed Oct 05 2016 Rex Dieter - 1.0.1-1.1 +- -kde4-libs: inflate soname to avoid collisions (#1374869) +- fix Obsoletes + * Wed Sep 21 2016 Rex Dieter - 1.0.1-1 - 1.0.1 diff --git a/kdeconnect-kde-0.8-soname.patch b/kdeconnect-kde-0.8-soname.patch new file mode 100644 index 0000000..b9db678 --- /dev/null +++ b/kdeconnect-kde-0.8-soname.patch @@ -0,0 +1,9 @@ +diff -up kdeconnect-kde-0.8/interfaces/CMakeLists.txt.soname kdeconnect-kde-0.8/interfaces/CMakeLists.txt +--- kdeconnect-kde-0.8/interfaces/CMakeLists.txt.soname 2015-01-31 22:01:24.000000000 -0600 ++++ kdeconnect-kde-0.8/interfaces/CMakeLists.txt 2016-10-05 08:12:38.996479517 -0500 +@@ -1,4 +1,4 @@ +-set(KDECONNECT_VERSION_MAJOR 1) ++set(KDECONNECT_VERSION_MAJOR 100) + set(KDECONNECT_VERSION_MINOR 0) + set(KDECONNECT_VERSION_PATCH 1) + set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")