]>
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 |
d72e11a6 | 9 | Release: 1 |
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 ER |
15 | BuildRequires: cmake |
16 | BuildRequires: gettext-tools | |
8f55f1bc | 17 | BuildRequires: libstdc++-devel |
2e1a2913 ER |
18 | %if %{with qt4} |
19 | BuildRequires: QtCore-devel | |
8f55f1bc | 20 | BuildRequires: qt4-build |
97e26aaa | 21 | BuildRequires: qt4-linguist |
8f55f1bc | 22 | BuildRequires: qt4-qmake |
2e1a2913 ER |
23 | %endif |
24 | %if %{with qt5} | |
25 | BuildRequires: Qt5Core-devel | |
26 | BuildRequires: qt5-build | |
27 | BuildRequires: qt5-linguist | |
28 | BuildRequires: qt5-qmake | |
29 | %endif | |
8f55f1bc LM |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
8f55f1bc | 32 | %description |
07788830 | 33 | QtKeychain a Qt API to store passwords and other secret data securely. |
d72e11a6 | 34 | |
8f55f1bc LM |
35 | How the data is stored depends on the platform: |
36 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
37 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
38 | tries to use KWallet (via D-Bus), if available. | |
39 | - Windows: Windows does not provide a service for secure storage. | |
40 | QtKeychain uses the Windows API function | |
41 | ||
42 | %package devel | |
8f55f1bc LM |
43 | Summary: Development files for QtKeychain |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | Requires: qt4-build | |
47 | Requires: qt4-qmake | |
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 | |
56 | Requires: qt5-build | |
57 | Requires: qt5-qmake | |
58 | ||
59 | %description -n Qt5Keychain | |
60 | QtKeychain a Qt API to store passwords and other secret data securely. | |
61 | ||
62 | How the data is stored depends on the platform: | |
63 | - Mac OS X: Passwords are stored in the OS X Keychain. | |
64 | - Linux/Unix: If running, GNOME Keyring is used, otherwise qtkeychain | |
65 | tries to use KWallet (via D-Bus), if available. | |
66 | - Windows: Windows does not provide a service for secure storage. | |
67 | QtKeychain uses the Windows API function | |
68 | ||
69 | %package -n Qt5Keychain-devel | |
70 | Summary: Development files for QtKeychain | |
71 | Group: Development/Libraries | |
72 | Requires: Qt5Keychain = %{version}-%{release} | |
73 | Requires: qt5-build | |
74 | Requires: qt5-qmake | |
75 | ||
76 | %description -n Qt5Keychain-devel | |
77 | This package contains libraries and header files for developing | |
78 | applications that use QKeychain. | |
79 | ||
8f55f1bc | 80 | %prep |
fbb6061a | 81 | %setup -q -n qtkeychain-%{version} |
8f55f1bc LM |
82 | |
83 | %build | |
2e1a2913 ER |
84 | %if %{with qt4} |
85 | install -d build-qt4 | |
86 | cd build-qt4 | |
8f55f1bc | 87 | %cmake \ |
d72e11a6 ER |
88 | -DBUILD_WITH_QT4=ON \ |
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 \ | |
98 | -DBUILD_WITH_QT4=OFF \ | |
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.*.*.* | |
2e1a2913 | 130 | %ghost %{_libdir}/libqtkeychain.so.0 |
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.*.*.* | |
143 | %ghost %{_libdir}/libqt5keychain.so.0 | |
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 |