- removed obsolete cmake patch
- added qt4 patch (fix build with Qt4)
--- /dev/null
+--- qtkeychain-0.9.1/keychain_unix.cpp.orig 2018-08-20 08:23:34.000000000 +0200
++++ qtkeychain-0.9.1/keychain_unix.cpp 2019-08-03 14:50:14.322137534 +0200
+@@ -91,7 +91,7 @@
+ // a wallet can be opened.
+
+ iface.setTimeout(500);
+- QDBusMessage reply = iface.call(QStringLiteral("networkWallet"));
++ QDBusMessage reply = iface.call(QLatin1String("networkWallet"));
+ return reply.type() == QDBusMessage::ReplyMessage;
+ }
+
-%bcond_without qt4 # build Qt4
-%bcond_without qt5 # build Qt5
+%bcond_without qt4 # Qt4 library
+%bcond_without qt5 # Qt5 library
Summary: Qt API to store passwords and other secret data securely
Summary: Qt API to store passwords and other secret data securely
+Summary(pl.UTF-8): API Qt do bezpiecznego przechowywania haseł i innych tajnych danych
Release: 1
License: Modified BSD License
Group: Libraries
Release: 1
License: Modified BSD License
Group: Libraries
+#Source0Download: https://github.com/frankosterfeld/qtkeychain/releases
Source0: https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: d741e7e55ae48a130cb95264fbe732b7
-Patch0: cmake.patch
+# Source0-md5: e6921de6f256259784f2a9edd1eeb8f5
+Patch0: %{name}-qt4.patch
URL: https://github.com/frankosterfeld/qtkeychain
URL: https://github.com/frankosterfeld/qtkeychain
+BuildRequires: cmake >= 2.8.11
+BuildRequires: libsecret-devel
BuildRequires: libstdc++-devel
BuildRequires: rpmbuild(find_lang) >= 1.37
BuildRequires: libstdc++-devel
BuildRequires: rpmbuild(find_lang) >= 1.37
+BuildRequires: rpmbuild(macros) >= 1.605
-BuildRequires: QtCore-devel
-BuildRequires: QtDBus-devel
-BuildRequires: qt4-build
-BuildRequires: qt4-linguist
-BuildRequires: qt4-qmake
+BuildRequires: QtCore-devel >= 4
+BuildRequires: QtDBus-devel >= 4
+BuildRequires: qt4-build >= 4
+BuildRequires: qt4-linguist >= 4
+BuildRequires: qt4-qmake >= 4
-BuildRequires: Qt5Core-devel
-BuildRequires: Qt5DBus-devel
-BuildRequires: qt5-build
-BuildRequires: qt5-linguist
-BuildRequires: qt5-qmake
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5DBus-devel >= 5
+BuildRequires: qt5-build >= 5
+BuildRequires: qt5-linguist >= 5
+BuildRequires: qt5-qmake >= 5
+Requires: QtKeychain-common = %{version}-%{release}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-#define skip_post_check_so libqt5keychain.so.*
-
%description
QtKeychain a Qt API to store passwords and other secret data securely.
%description
QtKeychain a Qt API to store passwords and other secret data securely.
- Windows: Windows does not provide a service for secure storage.
QtKeychain uses the Windows API function
- Windows: Windows does not provide a service for secure storage.
QtKeychain uses the Windows API function
+%description -l pl.UTF-8
+API Qt do bezpiecznego przechowywania haseł i innych tajnych danych.
+
+Sposób przechowywania danych zależy od platformy:
+- Mac OS X: hasła są przechowywanie poprzez usługę OS X Keychain
+- Linux/Unix: używany jest GNOME Keyring jeśli jest uruchomiony,
+ w przeciwnym wypadku używany jest KWallet (przez DBus), o ile jest
+ dostępny
+- Windows: system nie udostępnia usługi do bezpiecznego przechowywania
+ danych; QtKeychain używa funkcji Windows API
+
%package devel
Summary: Development files for QtKeychain
%package devel
Summary: Development files for QtKeychain
+Summary(pl.UTF-8): Pliki programistyczne biblioteki QtKeychain
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
-This package contains libraries and header files for developing
-applications that use QKeychain.
+This package contains the header files for developing applications
+that use QtKeychain.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
+wykorzystujących bibliotekę QtKeychain.
+
+%package common
+Summary: Common data for QtKeychain libraries
+Summary(pl.UTF-8): Wspólne dane dla bibliotek QtKeychain
+Group: Libraries
+Conflicts: QtKeychain < 0.9.1-1
+
+%description common
+Common data for QtKeychain libraries (both Qt 4 and Qt 5).
+
+%description common -l pl.UTF-8
+Wspólne dane dla bibliotek QtKeychain (zarówno dla Qt 4, jak i Qt 5).
-Summary: Qt API to store passwords and other secret data securely
+Summary: Qt 5 API to store passwords and other secret data securely
+Summary(pl.UTF-8): API Qt 5 do bezpiecznego przechowywania haseł i innych tajnych danych
+Requires: QtKeychain-common = %{version}-%{release}
%description -n Qt5Keychain
QtKeychain a Qt API to store passwords and other secret data securely.
%description -n Qt5Keychain
QtKeychain a Qt API to store passwords and other secret data securely.
- Windows: Windows does not provide a service for secure storage.
QtKeychain uses the Windows API function
- Windows: Windows does not provide a service for secure storage.
QtKeychain uses the Windows API function
+%description -n Qt5Keychain -l pl.UTF-8
+API Qt do bezpiecznego przechowywania haseł i innych tajnych danych.
+
+Sposób przechowywania danych zależy od platformy:
+- Mac OS X: hasła są przechowywanie poprzez usługę OS X Keychain
+- Linux/Unix: używany jest GNOME Keyring jeśli jest uruchomiony,
+ w przeciwnym wypadku używany jest KWallet (przez DBus), o ile jest
+ dostępny
+- Windows: system nie udostępnia usługi do bezpiecznego przechowywania
+ danych; QtKeychain używa funkcji Windows API
+
%package -n Qt5Keychain-devel
%package -n Qt5Keychain-devel
-Summary: Development files for QtKeychain
+Summary: Development files for Qt5Keychain
+Summary(pl.UTF-8): Pliki programistyczne biblioteki Qt5Keychain
Group: Development/Libraries
Requires: Qt5Keychain = %{version}-%{release}
%description -n Qt5Keychain-devel
Group: Development/Libraries
Requires: Qt5Keychain = %{version}-%{release}
%description -n Qt5Keychain-devel
-This package contains libraries and header files for developing
-applications that use QKeychain.
+This package contains the header files for developing applications
+that use Qt5Keychain.
+
+%description -n Qt5Keychain-devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
+wykorzystujących bibliotekę Qt5Keychain.
%prep
%setup -q -n qtkeychain-%{version}
%prep
%setup -q -n qtkeychain-%{version}
%if %{with qt4}
install -d build-qt4
cd build-qt4
%if %{with qt4}
install -d build-qt4
cd build-qt4
-%cmake \
- -DBUILD_WITH_QT4:BOOL=TRUE \
- ..
+%cmake .. \
+ -DBUILD_WITH_QT4:BOOL=ON \
+ -DECM_MKSPECS_INSTALL_DIR=%{_datadir}/qt4/mkspecs/modules
+
%if %{with qt5}
install -d build-qt5
cd build-qt5
%if %{with qt5}
install -d build-qt5
cd build-qt5
-DBUILD_WITH_QT4:BOOL=OFF \
-DBUILD_WITH_QT4:BOOL=OFF \
+ -DECM_MKSPECS_INSTALL_DIR=%{_libdir}/qt5/mkspecs/modules
%{__make}
%endif
%install
rm -rf $RPM_BUILD_ROOT
%{__make}
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if %{with qt4}
%{__make} -C build-qt4 install \
DESTDIR=$RPM_BUILD_ROOT
%if %{with qt4}
%{__make} -C build-qt4 install \
DESTDIR=$RPM_BUILD_ROOT
-
-%find_lang qtkeychain --with-qm
%endif
%if %{with qt5}
%{__make} -C build-qt5 install \
DESTDIR=$RPM_BUILD_ROOT
%endif
%if %{with qt5}
%{__make} -C build-qt5 install \
DESTDIR=$RPM_BUILD_ROOT
%find_lang qtkeychain --with-qm
%find_lang qtkeychain --with-qm
%clean
rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
%if %{with qt4}
%postun -p /sbin/ldconfig
%if %{with qt4}
-%files -f qtkeychain.lang
%defattr(644,root,root,755)
%defattr(644,root,root,755)
-%doc COPYING ReadMe.txt ChangeLog
%attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.*
%attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.*
-%ghost %{_libdir}/libqtkeychain.so.1
+%attr(755,root,root) %ghost %{_libdir}/libqtkeychain.so.1
%files devel
%defattr(644,root,root,755)
%files devel
%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqtkeychain.so
%{_includedir}/qtkeychain
%{_includedir}/qtkeychain
-%{_libdir}/libqtkeychain.so
%{_libdir}/cmake/QtKeychain
%{_libdir}/cmake/QtKeychain
+%{_datadir}/qt4/mkspecs/modules/qt_QtKeychain.pri
+%files common -f qtkeychain.lang
+%defattr(644,root,root,755)
+%doc COPYING ChangeLog ReadMe.txt
+
%if %{with qt5}
%files -n Qt5Keychain
%defattr(644,root,root,755)
%if %{with qt5}
%files -n Qt5Keychain
%defattr(644,root,root,755)
+%doc COPYING ChangeLog ReadMe.txt
%attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.*
%attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.*
-%ghost %{_libdir}/libqt5keychain.so.1
+%attr(755,root,root) %ghost %{_libdir}/libqt5keychain.so.1
%files -n Qt5Keychain-devel
%defattr(644,root,root,755)
%files -n Qt5Keychain-devel
%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqt5keychain.so
%{_includedir}/qt5keychain
%{_includedir}/qt5keychain
-%{_libdir}/libqt5keychain.so
%{_libdir}/cmake/Qt5Keychain
%{_libdir}/cmake/Qt5Keychain
+%{_libdir}/qt5/mkspecs/modules/qt_Qt5Keychain.pri
+++ /dev/null
---- qtkeychain-0.8.0/CMakeLists.txt.orig 2017-04-19 15:09:34.000000000 +0200
-+++ qtkeychain-0.8.0/CMakeLists.txt 2018-04-12 23:34:17.672301365 +0200
-@@ -21,6 +21,8 @@
- option(BUILD_TRANSLATIONS "Build translations" ON)
- option(QTKEYCHAIN_STATIC "Build static library" OFF)
-
-+list(APPEND qtkeychain_LIBRARIES "-lglib-2.0")
-+
- if(CMAKE_SYSTEM_NAME STREQUAL Android)
- set(ANDROID 1)
- endif()
-@@ -38,7 +40,7 @@
- find_package(Qt5Core QUIET)
- endif()
-
--if (Qt5Core_FOUND)
-+if (Qt5Core_FOUND AND NOT BUILD_WITH_QT4 )
- set(QTKEYCHAIN_VERSION_INFIX 5)
-
- if(UNIX AND NOT APPLE AND NOT ANDROID)