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