]> git.pld-linux.org Git - packages/QtKeychain.git/blob - QtKeychain.spec
build qt5 version as well
[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.3.0
9 Release:        1
10 License:        Modified BSD License
11 Group:          Libraries
12 # Repackaged from https://github.com/frankosterfeld/qtkeychain/archive/master.zip
13 Source0:        %{name}-%{version}.tar.bz2
14 # Source0-md5:  a9de9be0cae568c03b152009d24ff170
15 URL:            https://github.com/frankosterfeld/qtkeychain
16 BuildRequires:  cmake
17 BuildRequires:  gettext-tools
18 BuildRequires:  libstdc++-devel
19 %if %{with qt4}
20 BuildRequires:  QtCore-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:  qt5-build
28 BuildRequires:  qt5-linguist
29 BuildRequires:  qt5-qmake
30 %endif
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 QtKeychain a Qt API to store passwords and other secret data securely.
35
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
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
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
81 %prep
82 %setup -q
83
84 %build
85 %if %{with qt4}
86 install -d build-qt4
87 cd build-qt4
88 %cmake \
89         -DBUILD_WITH_QT4=ON \
90         ..
91 %{__make}
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
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 %if %{with qt4}
107 %{__make} -C build-qt4 install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 %find_lang qtkeychain --with-qm
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
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post   -p /sbin/ldconfig
124 %postun -p /sbin/ldconfig
125
126 %if %{with qt4}
127 %files -f qtkeychain.lang
128 %defattr(644,root,root,755)
129 %doc COPYING ReadMe.txt ChangeLog
130 %attr(755,root,root) %{_libdir}/libqtkeychain.so.*.*.*
131 %ghost %{_libdir}/libqtkeychain.so.0
132
133 %files devel
134 %defattr(644,root,root,755)
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
This page took 0.09381 seconds and 3 git commands to generate.