]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without qt4 # Qt4 library | |
4 | %bcond_without qt5 # Qt5 library | |
5 | ||
6 | Summary: Qt API to store passwords and other secret data securely | |
7 | Summary(pl.UTF-8): API Qt do bezpiecznego przechowywania haseł i innych tajnych danych | |
8 | Name: QtKeychain | |
9 | Version: 0.9.1 | |
10 | Release: 1 | |
11 | License: Modified BSD License | |
12 | Group: Libraries | |
13 | #Source0Download: https://github.com/frankosterfeld/qtkeychain/releases | |
14 | Source0: https://github.com/frankosterfeld/qtkeychain/archive/v%{version}/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: e6921de6f256259784f2a9edd1eeb8f5 | |
16 | Patch0: %{name}-qt4.patch | |
17 | URL: https://github.com/frankosterfeld/qtkeychain | |
18 | BuildRequires: cmake >= 2.8.11 | |
19 | BuildRequires: libsecret-devel | |
20 | BuildRequires: libstdc++-devel | |
21 | BuildRequires: rpmbuild(find_lang) >= 1.37 | |
22 | BuildRequires: rpmbuild(macros) >= 1.605 | |
23 | %if %{with qt4} | |
24 | BuildRequires: QtCore-devel >= 4 | |
25 | BuildRequires: QtDBus-devel >= 4 | |
26 | BuildRequires: qt4-build >= 4 | |
27 | BuildRequires: qt4-linguist >= 4 | |
28 | BuildRequires: qt4-qmake >= 4 | |
29 | %endif | |
30 | %if %{with qt5} | |
31 | BuildRequires: Qt5Core-devel >= 5 | |
32 | BuildRequires: Qt5DBus-devel >= 5 | |
33 | BuildRequires: qt5-build >= 5 | |
34 | BuildRequires: qt5-linguist >= 5 | |
35 | BuildRequires: qt5-qmake >= 5 | |
36 | %endif | |
37 | Requires: QtKeychain-common = %{version}-%{release} | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | QtKeychain a Qt API to store passwords and other secret data securely. | |
42 | ||
43 | How the data is stored depends on the platform: | |
44 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
45 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
46 | tries to use KWallet (via D-Bus), if available. | |
47 | - Windows: Windows does not provide a service for secure storage. | |
48 | QtKeychain uses the Windows API function | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | API Qt do bezpiecznego przechowywania haseł i innych tajnych danych. | |
52 | ||
53 | Sposób przechowywania danych zależy od platformy: | |
54 | - Mac OS X: hasła są przechowywanie poprzez usługę OS X Keychain | |
55 | - Linux/Unix: używany jest GNOME Keyring jeśli jest uruchomiony, | |
56 | w przeciwnym wypadku używany jest KWallet (przez DBus), o ile jest | |
57 | dostępny | |
58 | - Windows: system nie udostępnia usługi do bezpiecznego przechowywania | |
59 | danych; QtKeychain używa funkcji Windows API | |
60 | ||
61 | %package devel | |
62 | Summary: Development files for QtKeychain | |
63 | Summary(pl.UTF-8): Pliki programistyczne biblioteki QtKeychain | |
64 | Group: Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | ||
67 | %description devel | |
68 | This package contains the header files for developing applications | |
69 | that use QtKeychain. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
73 | wykorzystujących bibliotekę QtKeychain. | |
74 | ||
75 | %package common | |
76 | Summary: Common data for QtKeychain libraries | |
77 | Summary(pl.UTF-8): Wspólne dane dla bibliotek QtKeychain | |
78 | Group: Libraries | |
79 | Conflicts: QtKeychain < 0.9.1-1 | |
80 | ||
81 | %description common | |
82 | Common data for QtKeychain libraries (both Qt 4 and Qt 5). | |
83 | ||
84 | %description common -l pl.UTF-8 | |
85 | Wspólne dane dla bibliotek QtKeychain (zarówno dla Qt 4, jak i Qt 5). | |
86 | ||
87 | %package -n Qt5Keychain | |
88 | Summary: Qt 5 API to store passwords and other secret data securely | |
89 | Summary(pl.UTF-8): API Qt 5 do bezpiecznego przechowywania haseł i innych tajnych danych | |
90 | Group: Libraries | |
91 | Requires: QtKeychain-common = %{version}-%{release} | |
92 | ||
93 | %description -n Qt5Keychain | |
94 | QtKeychain a Qt API to store passwords and other secret data securely. | |
95 | ||
96 | How the data is stored depends on the platform: | |
97 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
98 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
99 | tries to use KWallet (via D-Bus), if available. | |
100 | - Windows: Windows does not provide a service for secure storage. | |
101 | QtKeychain uses the Windows API function | |
102 | ||
103 | %description -n Qt5Keychain -l pl.UTF-8 | |
104 | API Qt do bezpiecznego przechowywania haseł i innych tajnych danych. | |
105 | ||
106 | Sposób przechowywania danych zależy od platformy: | |
107 | - Mac OS X: hasła są przechowywanie poprzez usługę OS X Keychain | |
108 | - Linux/Unix: używany jest GNOME Keyring jeśli jest uruchomiony, | |
109 | w przeciwnym wypadku używany jest KWallet (przez DBus), o ile jest | |
110 | dostępny | |
111 | - Windows: system nie udostępnia usługi do bezpiecznego przechowywania | |
112 | danych; QtKeychain używa funkcji Windows API | |
113 | ||
114 | %package -n Qt5Keychain-devel | |
115 | Summary: Development files for Qt5Keychain | |
116 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Qt5Keychain | |
117 | Group: Development/Libraries | |
118 | Requires: Qt5Keychain = %{version}-%{release} | |
119 | ||
120 | %description -n Qt5Keychain-devel | |
121 | This package contains the header files for developing applications | |
122 | that use Qt5Keychain. | |
123 | ||
124 | %description -n Qt5Keychain-devel -l pl.UTF-8 | |
125 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
126 | wykorzystujących bibliotekę Qt5Keychain. | |
127 | ||
128 | %prep | |
129 | %setup -q -n qtkeychain-%{version} | |
130 | %patch0 -p1 | |
131 | ||
132 | %build | |
133 | %if %{with qt4} | |
134 | install -d build-qt4 | |
135 | cd build-qt4 | |
136 | %cmake .. \ | |
137 | -DBUILD_WITH_QT4:BOOL=ON \ | |
138 | -DECM_MKSPECS_INSTALL_DIR=%{_datadir}/qt4/mkspecs/modules | |
139 | ||
140 | %{__make} | |
141 | cd .. | |
142 | %endif | |
143 | ||
144 | %if %{with qt5} | |
145 | install -d build-qt5 | |
146 | cd build-qt5 | |
147 | %cmake .. \ | |
148 | -DBUILD_WITH_QT4:BOOL=OFF \ | |
149 | -DECM_MKSPECS_INSTALL_DIR=%{_libdir}/qt5/mkspecs/modules | |
150 | %{__make} | |
151 | %endif | |
152 | ||
153 | %install | |
154 | rm -rf $RPM_BUILD_ROOT | |
155 | ||
156 | %if %{with qt4} | |
157 | %{__make} -C build-qt4 install \ | |
158 | DESTDIR=$RPM_BUILD_ROOT | |
159 | %endif | |
160 | ||
161 | %if %{with qt5} | |
162 | %{__make} -C build-qt5 install \ | |
163 | DESTDIR=$RPM_BUILD_ROOT | |
164 | %endif | |
165 | ||
166 | %find_lang qtkeychain --with-qm | |
167 | ||
168 | %clean | |
169 | rm -rf $RPM_BUILD_ROOT | |
170 | ||
171 | %post -p /sbin/ldconfig | |
172 | %postun -p /sbin/ldconfig | |
173 | ||
174 | %if %{with qt4} | |
175 | %files | |
176 | %defattr(644,root,root,755) | |
177 | %attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.* | |
178 | %attr(755,root,root) %ghost %{_libdir}/libqtkeychain.so.1 | |
179 | ||
180 | %files devel | |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_libdir}/libqtkeychain.so | |
183 | %{_includedir}/qtkeychain | |
184 | %{_libdir}/cmake/QtKeychain | |
185 | %{_datadir}/qt4/mkspecs/modules/qt_QtKeychain.pri | |
186 | %endif | |
187 | ||
188 | %files common -f qtkeychain.lang | |
189 | %defattr(644,root,root,755) | |
190 | %doc COPYING ChangeLog ReadMe.txt | |
191 | ||
192 | %if %{with qt5} | |
193 | %files -n Qt5Keychain | |
194 | %defattr(644,root,root,755) | |
195 | %doc COPYING ChangeLog ReadMe.txt | |
196 | %attr(755,root,root) %{_libdir}/libqt5keychain.so.*.*.* | |
197 | %attr(755,root,root) %ghost %{_libdir}/libqt5keychain.so.1 | |
198 | ||
199 | %files -n Qt5Keychain-devel | |
200 | %defattr(644,root,root,755) | |
201 | %attr(755,root,root) %{_libdir}/libqt5keychain.so | |
202 | %{_includedir}/qt5keychain | |
203 | %{_libdir}/cmake/Qt5Keychain | |
204 | %{_libdir}/qt5/mkspecs/modules/qt_Qt5Keychain.pri | |
205 | %endif |