kde4-libs: inflate soname to avoid collisions (#1374869)

- fix Obsoletes
epel9
Rex Dieter 8 years ago
parent 57b1beac98
commit e6cb71fb92

@ -1,11 +1,11 @@
# once kf5 dolphin lands, may consider disabling this -- rex # once kf5 dolphin lands, may consider disabling this -- rex
%if 0%{?fedora} < 24 #if 0%{?fedora} < 24
%global _with_kde4 1 %global _with_kde4 1
%endif #endif
Name: kde-connect Name: kde-connect
Version: 1.0.1 Version: 1.0.1
Release: 1%{?dist} Release: 1%{?dist}.1
License: GPLv2+ License: GPLv2+
Summary: KDE Connect client for communication with smartphones Summary: KDE Connect client for communication with smartphones
@ -25,6 +25,8 @@ Source2: kde-connect.xml
# Upstream patch for KDE 4 version # Upstream patch for KDE 4 version
Patch0: kdeconnect-kde-0.8-b-revision.patch 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: desktop-file-utils
BuildRequires: extra-cmake-modules BuildRequires: extra-cmake-modules
@ -53,8 +55,8 @@ BuildRequires: pkgconfig(libfakekey)
BuildRequires: pkgconfig(QJson) BuildRequires: pkgconfig(QJson)
BuildRequires: pkgconfig(qca2) BuildRequires: pkgconfig(qca2)
%else %else
Obsoletes: kde-connect-kde4-ioslave < 0.9 Obsoletes: kde-connect-kde4-ioslave < %{version}-%{release}
Obsoletes: kde-connect-kde4-libs < 0.9 Obsoletes: kde-connect-kde4-libs < %{verson}-%{release}
%endif %endif
# upstream name # upstream name
@ -121,6 +123,7 @@ Requires: fuse-sshfs
tar xfJ %{SOURCE1} tar xfJ %{SOURCE1}
pushd kdeconnect-kde-0.8 pushd kdeconnect-kde-0.8
%patch0 -p1 %patch0 -p1
%patch1 -p1 -b .soname
popd popd
%endif %endif
@ -148,15 +151,7 @@ popd
%install %install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform} # install kde4 bits first to reduce risk of polluting or overwriting kf5 stuff
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
%if 0%{?_with_kde4} %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}/interfaces
make install/fast DESTDIR=%{buildroot} -C kdeconnect-kde-0.8/%{_target_platform}/kio 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 rm -rfv %{buildroot}%{_kde4_libdir}/libkdeconnectinterfaces.so
%endif %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 %check
desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.kdeconnect.kcm.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.kdeconnect.kcm.desktop
@ -232,7 +236,7 @@ fi
%postun kde4-libs -p /sbin/ldconfig %postun kde4-libs -p /sbin/ldconfig
%files kde4-libs %files kde4-libs
%{_kde4_libdir}/libkdeconnectinterfaces.so.1* %{_kde4_libdir}/libkdeconnectinterfaces.so.100*
%files kde4-ioslave %files kde4-ioslave
%{_kde4_datadir}/kde4/services/kdeconnect.protocol %{_kde4_datadir}/kde4/services/kdeconnect.protocol
@ -241,6 +245,10 @@ fi
%changelog %changelog
* Wed Oct 05 2016 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1.1
- -kde4-libs: inflate soname to avoid collisions (#1374869)
- fix Obsoletes
* Wed Sep 21 2016 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1 * Wed Sep 21 2016 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1
- 1.0.1 - 1.0.1

@ -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}")
Loading…
Cancel
Save