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