]>
Commit | Line | Data |
---|---|---|
2e1a2913 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qt4 # build Qt4 | |
4 | %bcond_without qt5 # build Qt5 | |
5 | ||
8f55f1bc LM |
6 | Summary: Qt API to store passwords and other secret data securely |
7 | Name: QtKeychain | |
5498a8aa JR |
8 | Version: 0.8.0 |
9 | Release: 1 | |
8f55f1bc LM |
10 | License: Modified BSD License |
11 | Group: Libraries | |
fbb6061a | 12 | Source0: https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz |
5498a8aa JR |
13 | # Source0-md5: d741e7e55ae48a130cb95264fbe732b7 |
14 | Patch0: cmake.patch | |
07788830 | 15 | URL: https://github.com/frankosterfeld/qtkeychain |
2e1a2913 | 16 | BuildRequires: cmake |
8f55f1bc | 17 | BuildRequires: libstdc++-devel |
f3986110 | 18 | BuildRequires: rpmbuild(find_lang) >= 1.37 |
2e1a2913 ER |
19 | %if %{with qt4} |
20 | BuildRequires: QtCore-devel | |
f3986110 | 21 | BuildRequires: QtDBus-devel |
8f55f1bc | 22 | BuildRequires: qt4-build |
97e26aaa | 23 | BuildRequires: qt4-linguist |
8f55f1bc | 24 | BuildRequires: qt4-qmake |
2e1a2913 ER |
25 | %endif |
26 | %if %{with qt5} | |
27 | BuildRequires: Qt5Core-devel | |
f3986110 | 28 | BuildRequires: Qt5DBus-devel |
2e1a2913 ER |
29 | BuildRequires: qt5-build |
30 | BuildRequires: qt5-linguist | |
31 | BuildRequires: qt5-qmake | |
32 | %endif | |
8f55f1bc LM |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
5498a8aa JR |
35 | #define skip_post_check_so libqt5keychain.so.* |
36 | ||
8f55f1bc | 37 | %description |
07788830 | 38 | QtKeychain a Qt API to store passwords and other secret data securely. |
d72e11a6 | 39 | |
8f55f1bc LM |
40 | How the data is stored depends on the platform: |
41 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
42 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
43 | tries to use KWallet (via D-Bus), if available. | |
44 | - Windows: Windows does not provide a service for secure storage. | |
45 | QtKeychain uses the Windows API function | |
46 | ||
47 | %package devel | |
8f55f1bc LM |
48 | Summary: Development files for QtKeychain |
49 | Group: Development/Libraries | |
50 | Requires: %{name} = %{version}-%{release} | |
8f55f1bc LM |
51 | |
52 | %description devel | |
53 | This package contains libraries and header files for developing | |
54 | applications that use QKeychain. | |
55 | ||
2e1a2913 ER |
56 | %package -n Qt5Keychain |
57 | Summary: Qt API to store passwords and other secret data securely | |
58 | Group: Libraries | |
2e1a2913 ER |
59 | |
60 | %description -n Qt5Keychain | |
61 | QtKeychain a Qt API to store passwords and other secret data securely. | |
62 | ||
63 | How the data is stored depends on the platform: | |
64 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
65 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
66 | tries to use KWallet (via D-Bus), if available. | |
67 | - Windows: Windows does not provide a service for secure storage. | |
68 | QtKeychain uses the Windows API function | |
69 | ||
70 | %package -n Qt5Keychain-devel | |
71 | Summary: Development files for QtKeychain | |
72 | Group: Development/Libraries | |
73 | Requires: Qt5Keychain = %{version}-%{release} | |
2e1a2913 ER |
74 | |
75 | %description -n Qt5Keychain-devel | |
76 | This package contains libraries and header files for developing | |
77 | applications that use QKeychain. | |
78 | ||
8f55f1bc | 79 | %prep |
fbb6061a | 80 | %setup -q -n qtkeychain-%{version} |
5498a8aa | 81 | %patch0 -p1 |
8f55f1bc LM |
82 | |
83 | %build | |
2e1a2913 ER |
84 | %if %{with qt4} |
85 | install -d build-qt4 | |
86 | cd build-qt4 | |
8f55f1bc | 87 | %cmake \ |
5498a8aa | 88 | -DBUILD_WITH_QT4:BOOL=TRUE \ |
d72e11a6 | 89 | .. |
8f55f1bc | 90 | %{__make} |
2e1a2913 ER |
91 | cd .. |
92 | %endif | |
93 | ||
94 | %if %{with qt5} | |
95 | install -d build-qt5 | |
96 | cd build-qt5 | |
97 | %cmake \ | |
5498a8aa | 98 | -DBUILD_WITH_QT4:BOOL=OFF \ |
2e1a2913 ER |
99 | .. |
100 | %{__make} | |
101 | %endif | |
8f55f1bc LM |
102 | |
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
2e1a2913 ER |
105 | %if %{with qt4} |
106 | %{__make} -C build-qt4 install \ | |
07788830 | 107 | DESTDIR=$RPM_BUILD_ROOT |
8f55f1bc | 108 | |
d72e11a6 | 109 | %find_lang qtkeychain --with-qm |
2e1a2913 ER |
110 | %endif |
111 | ||
112 | %if %{with qt5} | |
113 | %{__make} -C build-qt5 install \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | ||
116 | %find_lang qtkeychain --with-qm | |
117 | %endif | |
d72e11a6 | 118 | |
8f55f1bc LM |
119 | %clean |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post -p /sbin/ldconfig | |
07788830 | 123 | %postun -p /sbin/ldconfig |
8f55f1bc | 124 | |
2e1a2913 | 125 | %if %{with qt4} |
d72e11a6 | 126 | %files -f qtkeychain.lang |
8f55f1bc LM |
127 | %defattr(644,root,root,755) |
128 | %doc COPYING ReadMe.txt ChangeLog | |
129 | %attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.* | |
5498a8aa | 130 | %ghost %{_libdir}/libqtkeychain.so.1 |
8f55f1bc LM |
131 | |
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
2e1a2913 ER |
134 | %{_includedir}/qtkeychain |
135 | %{_libdir}/libqtkeychain.so | |
136 | %{_libdir}/cmake/QtKeychain | |
137 | %endif | |
138 | ||
139 | %if %{with qt5} | |
140 | %files -n Qt5Keychain | |
141 | %defattr(644,root,root,755) | |
142 | %attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.* | |
5498a8aa | 143 | %ghost %{_libdir}/libqt5keychain.so.1 |
2e1a2913 ER |
144 | |
145 | %files -n Qt5Keychain-devel | |
146 | %defattr(644,root,root,755) | |
147 | %{_includedir}/qt5keychain | |
148 | %{_libdir}/libqt5keychain.so | |
149 | %{_libdir}/cmake/Qt5Keychain | |
150 | %endif |