]> git.pld-linux.org Git - packages/QtKeychain.git/blobdiff - QtKeychain.spec
drop qt*-build, and qt*-qmake from -devel deps
[packages/QtKeychain.git] / QtKeychain.spec
index 576d287bca3e86e5b2efa99699b3fd87e41836c2..46b8ab3de4d57ea6d2a8975d866eaf1ab91150e2 100644 (file)
@@ -1,20 +1,34 @@
-# TODO
-# - qt5 version
+#
+# Conditional build:
+%bcond_without qt4             # build Qt4
+%bcond_without qt5             # build Qt5
+
 Summary:       Qt API to store passwords and other secret data securely
 Name:          QtKeychain
-Version:       0.3.0
-Release:       1
+Version:       0.4.0
+Release:       2
 License:       Modified BSD License
 Group:         Libraries
-# Repackaged from https://github.com/frankosterfeld/qtkeychain/archive/master.zip
-Source0:       %{name}-%{version}.tar.bz2
-# Source0-md5: a9de9be0cae568c03b152009d24ff170
+Source0:       https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: e4e48d8742a9fd2664425d58be236424
 URL:           https://github.com/frankosterfeld/qtkeychain
-BuildRequires: QtCore-devel
+BuildRequires: cmake
 BuildRequires: libstdc++-devel
+BuildRequires: rpmbuild(find_lang) >= 1.37
+%if %{with qt4}
+BuildRequires: QtCore-devel
+BuildRequires: QtDBus-devel
 BuildRequires: qt4-build
 BuildRequires: qt4-linguist
 BuildRequires: qt4-qmake
+%endif
+%if %{with qt5}
+BuildRequires: Qt5Core-devel
+BuildRequires: Qt5DBus-devel
+BuildRequires: qt5-build
+BuildRequires: qt5-linguist
+BuildRequires: qt5-qmake
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -31,30 +45,72 @@ How the data is stored depends on the platform:
 Summary:       Development files for QtKeychain
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      qt4-build
-Requires:      qt4-qmake
 
 %description devel
 This package contains libraries and header files for developing
 applications that use QKeychain.
 
+%package -n Qt5Keychain
+Summary:       Qt API to store passwords and other secret data securely
+Group:         Libraries
+
+%description -n Qt5Keychain
+QtKeychain a Qt API to store passwords and other secret data securely.
+
+How the data is stored depends on the platform:
+- Mac OS X: Passwords are stored in the OS X Keychain.
+- Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain
+  tries to use KWallet (via D-Bus), if available.
+- Windows: Windows does not provide a service for secure storage.
+  QtKeychain uses the Windows API function
+
+%package -n Qt5Keychain-devel
+Summary:       Development files for QtKeychain
+Group:         Development/Libraries
+Requires:      Qt5Keychain = %{version}-%{release}
+
+%description -n Qt5Keychain-devel
+This package contains libraries and header files for developing
+applications that use QKeychain.
+
 %prep
-%setup -q
+%setup -q -n qtkeychain-%{version}
 
 %build
-install -d build
-cd build
+%if %{with qt4}
+install -d build-qt4
+cd build-qt4
 %cmake \
        -DBUILD_WITH_QT4=ON \
        ..
 %{__make}
+cd ..
+%endif
+
+%if %{with qt5}
+install -d build-qt5
+cd build-qt5
+%cmake \
+       -DBUILD_WITH_QT4=OFF \
+       ..
+%{__make}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} -C build install \
+%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
+
+%find_lang qtkeychain --with-qm
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -62,20 +118,29 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%if %{with qt4}
 %files -f qtkeychain.lang
 %defattr(644,root,root,755)
 %doc COPYING ReadMe.txt ChangeLog
 %attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libqtkeychain.so.0
+%ghost %{_libdir}/libqtkeychain.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%dir %{_includedir}/qtkeychain
-%{_includedir}/qtkeychain/keychain.h
-%{_includedir}/qtkeychain/qkeychain_export.h
-%dir %{_libdir}/cmake/QtKeychain
-%attr(755,root,root) %{_libdir}/libqtkeychain.so
-%{_libdir}/cmake/QtKeychain/QtKeychainLibraryDepends.cmake
-%{_libdir}/cmake/QtKeychain/QtKeychainLibraryDepends-pld.cmake
-%{_libdir}/cmake/QtKeychain/QtKeychainConfig.cmake
-%{_libdir}/cmake/QtKeychain/QtKeychainConfigVersion.cmake
+%{_includedir}/qtkeychain
+%{_libdir}/libqtkeychain.so
+%{_libdir}/cmake/QtKeychain
+%endif
+
+%if %{with qt5}
+%files -n Qt5Keychain
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.*
+%ghost %{_libdir}/libqt5keychain.so.0
+
+%files -n Qt5Keychain-devel
+%defattr(644,root,root,755)
+%{_includedir}/qt5keychain
+%{_libdir}/libqt5keychain.so
+%{_libdir}/cmake/Qt5Keychain
+%endif
This page took 0.062441 seconds and 4 git commands to generate.