]> git.pld-linux.org Git - packages/QtKeychain.git/commitdiff
build qt5 version as well
authorElan Ruusamäe <glen@delfi.ee>
Sat, 7 Feb 2015 14:55:32 +0000 (16:55 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 7 Feb 2015 14:55:32 +0000 (16:55 +0200)
QtKeychain.spec

index 576d287bca3e86e5b2efa99699b3fd87e41836c2..d576520f4b3a08d1af1ba86592d409c81e14c9ba 100644 (file)
@@ -1,5 +1,8 @@
-# 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
@@ -10,11 +13,21 @@ Group:              Libraries
 Source0:       %{name}-%{version}.tar.bz2
 # Source0-md5: a9de9be0cae568c03b152009d24ff170
 URL:           https://github.com/frankosterfeld/qtkeychain
-BuildRequires: QtCore-devel
+BuildRequires: cmake
+BuildRequires: gettext-tools
 BuildRequires: libstdc++-devel
+%if %{with qt4}
+BuildRequires: QtCore-devel
 BuildRequires: qt4-build
 BuildRequires: qt4-linguist
 BuildRequires: qt4-qmake
+%endif
+%if %{with qt5}
+BuildRequires: Qt5Core-devel
+BuildRequires: qt5-build
+BuildRequires: qt5-linguist
+BuildRequires: qt5-qmake
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,23 +51,71 @@ Requires:   qt4-qmake
 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
+Requires:      qt5-build
+Requires:      qt5-qmake
+
+%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}
+Requires:      qt5-build
+Requires:      qt5-qmake
+
+%description -n Qt5Keychain-devel
+This package contains libraries and header files for developing
+applications that use QKeychain.
+
 %prep
 %setup -q
 
 %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 +123,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.104086 seconds and 4 git commands to generate.