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