]>
Commit | Line | Data |
---|---|---|
79f30f85 | 1 | # |
03076a38 | 2 | # Conditional build: |
b5bc826d | 3 | %bcond_without tests # testsuite on build |
74217b8a | 4 | %bcond_without dirmngr # dirmngr packages build |
19e8899b | 5 | %bcond_without default_gpg # install as gpg/gpgv instead of gpg2/gpgv2 |
b5bc826d JB |
6 | %bcond_with gnutls # GnuTLS instead of NTBTLS |
7 | %bcond_with selinux # "SELinux hacks" | |
d54c94db | 8 | # |
f56b1d35 JB |
9 | Summary: GNU Privacy Guard - tool for secure communication and data storage - enhanced version |
10 | Summary(pl.UTF-8): GnuPG - narzędzie do bezpiecznej komunikacji i bezpiecznego przechowywania danych - wersja rozszerzona | |
c85d209c | 11 | Name: gnupg2 |
9c33a370 JP |
12 | Version: 2.2.27 |
13 | Release: 1 | |
71099ee5 | 14 | License: GPL v3+ |
b626fce0 | 15 | Group: Applications/File |
d47c18c2 | 16 | Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2 |
9c33a370 | 17 | # Source0-md5: a9c002b5356103c97412955a1956ae0c |
b626fce0 | 18 | Source1: gnupg-agent.sh |
c85d209c | 19 | Patch0: %{name}-info.patch |
19e8899b | 20 | Patch1: %{name}-nogit.patch |
ebc61b8e | 21 | Patch2: %{name}-pl.po-update.patch |
98b0bc09 | 22 | URL: https://www.gnupg.org/ |
71099ee5 | 23 | BuildRequires: autoconf >= 2.61 |
cc42aea4 | 24 | BuildRequires: automake >= 1:1.14 |
b636b9b9 | 25 | BuildRequires: bzip2-devel |
da0f8718 | 26 | BuildRequires: curl-devel >= 7.10 |
169b8933 JB |
27 | BuildRequires: gettext-tools >= 0.17 |
28 | %{?with_gnutls:BuildRequires: gnutls-devel >= 3.0} | |
b3e6ee32 | 29 | BuildRequires: libassuan-devel >= 1:2.5.0 |
f03c845a | 30 | BuildRequires: libgcrypt-devel >= 1.8.0 |
c2c14ced | 31 | BuildRequires: libgpg-error-devel >= 1.40 |
3d4982c6 | 32 | BuildRequires: libksba-devel >= 1.3.5 |
169b8933 JB |
33 | BuildRequires: libusb-devel >= 1.0 |
34 | BuildRequires: npth-devel >= 1.2 | |
35 | %{!?with_gnutls:BuildRequires: ntbtls-devel >= 0.1.0} | |
74217b8a | 36 | %{?with_dirmngr:BuildRequires: openldap-devel >= 2.4.6} |
169b8933 JB |
37 | BuildRequires: pkgconfig |
38 | BuildRequires: readline-devel | |
f197b41f | 39 | BuildRequires: rpmbuild(macros) >= 1.177 |
6f441ca0 | 40 | BuildRequires: sqlite3-devel >= 3.7 |
b626fce0 AM |
41 | BuildRequires: texinfo |
42 | BuildRequires: zlib-devel | |
c85d209c | 43 | Requires: gnupg2-common = %{version}-%{release} |
b5bc826d | 44 | Requires: sqlite3 >= 3.7 |
5516c085 JP |
45 | %if %{with default_gpg} |
46 | Obsoletes: gnupg < 2 | |
19e8899b AM |
47 | Obsoletes: gnupg-plugin-keys_curl < 2 |
48 | Obsoletes: gnupg-plugin-keys_hkp < 2 | |
5516c085 JP |
49 | Provides: gnupg = %{version}-%{release} |
50 | %endif | |
150f8795 | 51 | Suggests: gnupg-agent |
b626fce0 AM |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
b5bc826d | 54 | %define pkglibexecdir %{_libexecdir}/gnupg2 |
b626fce0 AM |
55 | |
56 | %description | |
c85d209c AF |
57 | GnuPG is GNU's tool for secure communication and data storage. It can |
58 | be used to encrypt data and to create digital signatures. It includes | |
59 | an advanced key management facility and is compliant with the proposed | |
60 | OpenPGP Internet standard as described in RFC2440. | |
61 | ||
f56b1d35 | 62 | This is enhanced version. |
b626fce0 | 63 | |
0998c692 JR |
64 | %description -l pl.UTF-8 |
65 | GnuPG (GNU Privacy Guard) jest narzędziem do bezpiecznej komunikacji i | |
66 | bezpiecznego przechowywania danych. Może być używany do szyfrowania | |
67 | oraz podpisywania danych. Umożliwia zaawansowane zarządzanie kluczami | |
68 | i spełnia normy zdefiniowane w standardzie OpenPGP, który jest opisany | |
c85d209c AF |
69 | w RFC2440. |
70 | ||
f56b1d35 | 71 | To jest wersja rozszerzona. |
c85d209c AF |
72 | |
73 | %package common | |
74 | Summary: GnuPG - common files | |
4049c7b1 | 75 | Summary(pl.UTF-8): GnuPG - pliki wspólne |
c85d209c | 76 | Group: Applications/File |
5d1bd0e6 | 77 | Requires: libassuan >= 1:2.5.0 |
f03c845a | 78 | Requires: libgcrypt >= 1.8.0 |
c2c14ced | 79 | Requires: libgpg-error >= 1.40 |
3d4982c6 | 80 | Requires: libksba >= 1.3.5 |
5d1bd0e6 JB |
81 | Requires: npth >= 1.2 |
82 | Obsoletes: gnupg2-plugin-keys_curl | |
83 | Obsoletes: gnupg2-plugin-keys_finger | |
84 | Obsoletes: gnupg2-plugin-keys_hkp | |
85 | Obsoletes: gnupg2-plugin-keys_kdns | |
86 | Obsoletes: gnupg2-plugin-keys_ldap | |
87 | Conflicts: gnupg < 1.4.18-2 | |
c85d209c AF |
88 | Conflicts: gnupg-agent < 1.9.14-2 |
89 | ||
90 | %description common | |
91 | Common files used by tools from GnuPG project. | |
92 | ||
0998c692 JR |
93 | %description common -l pl.UTF-8 |
94 | Pliki wspólne używane przez różne narzędzia z projektu GnuPG. | |
c85d209c AF |
95 | |
96 | %package -n gnupg-agent | |
97 | Summary: GnuPG extension - agent | |
4049c7b1 | 98 | Summary(pl.UTF-8): Rozszerzenie GnuPG - agent |
c85d209c | 99 | Group: Applications/File |
7b3cd4e7 | 100 | Requires: %{name}-common = %{version}-%{release} |
1dbb261a | 101 | Requires: pinentry >= 0.7.5-2 |
c85d209c AF |
102 | Obsoletes: newpg |
103 | ||
104 | %description -n gnupg-agent | |
105 | GnuPG extension - agent. | |
106 | ||
0998c692 | 107 | %description -n gnupg-agent -l pl.UTF-8 |
b626fce0 AM |
108 | Rozszerzenie GnuPG - agent. |
109 | ||
f197b41f | 110 | %package -n gnupg-agent-profile_d |
111 | Summary: gnupg-agent start script for text mode | |
4049c7b1 | 112 | Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu tekstowego |
f197b41f | 113 | Group: Applications/File |
114 | Requires: gnupg-agent = %{version}-%{release} | |
115 | ||
116 | %description -n gnupg-agent-profile_d | |
117 | gnupg-agent start script for text mode. | |
118 | ||
0998c692 | 119 | %description -n gnupg-agent-profile_d -l pl.UTF-8 |
f197b41f | 120 | Skrypt startowy gnupg-agenta dla trybu tekstowego. |
121 | ||
122 | %package -n gnupg-agent-xinitrc | |
123 | Summary: gnupg-agent start script for X-Window mode | |
4049c7b1 | 124 | Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu X-Window |
f197b41f | 125 | Group: Applications/File |
126 | Requires: gnupg-agent = %{version}-%{release} | |
127 | Requires: xinitrc | |
128 | ||
129 | %description -n gnupg-agent-xinitrc | |
130 | gnupg-agent start script for X-Window mode. | |
131 | ||
0998c692 | 132 | %description -n gnupg-agent-xinitrc -l pl.UTF-8 |
f197b41f | 133 | Skrypt startowy gnupg-agenta dla trybu X-Window. |
134 | ||
c85d209c AF |
135 | %package -n gnupg-smime |
136 | Summary: GnuPG extension - S/MIME support | |
4049c7b1 | 137 | Summary(pl.UTF-8): Rozszerzenie GnuPG - obsługa S/MIME |
c85d209c | 138 | Group: Applications/File |
7b3cd4e7 | 139 | Requires: %{name}-common = %{version}-%{release} |
c85d209c AF |
140 | Conflicts: gnupg-agent < 1.9.14-2 |
141 | ||
142 | %description -n gnupg-smime | |
143 | GnuPG extension - S/MIME support. | |
144 | ||
0998c692 JR |
145 | %description -n gnupg-smime -l pl.UTF-8 |
146 | Rozszerzenie GnuPG - obsługa S/MIME. | |
c85d209c | 147 | |
74217b8a JB |
148 | %package -n dirmngr |
149 | Summary: X509/LDAP certificate and revocation list client | |
150 | Summary(pl.UTF-8): Klient certyfikatów i list anulujących X509/LDAP | |
151 | Group: Applications | |
152 | Requires: %{name}-common = %{version}-%{release} | |
153 | ||
154 | %description -n dirmngr | |
155 | DirMngr is a client for managing and downloading certificate | |
156 | revocation lists (CRLs) for X509 certificates and for downloading the | |
157 | certificates themselves. DirMngr is usually invoked by gpgsm and in | |
158 | general not used directly. | |
159 | ||
160 | %description -n dirmngr -l pl.UTF-8 | |
161 | DirMngr to klient do zarządzania i pobierania list anulujących | |
162 | certyfikaty (CRLs - certificate revocation lists) dla certyfikatów | |
163 | X509 oraz do pobierania samych certyfikatów. DirMngr jest zwykle | |
164 | wywoływany przez gpgsm i nie używany bezpośrednio. | |
165 | ||
b626fce0 AM |
166 | %prep |
167 | %setup -q -n gnupg-%{version} | |
c85d209c | 168 | %patch0 -p1 |
491f1c67 | 169 | %patch1 -p1 |
ebc61b8e | 170 | %patch2 -p1 |
6f582fc9 JB |
171 | |
172 | %{__rm} po/stamp-po | |
b626fce0 AM |
173 | |
174 | %build | |
3d3dbf69 | 175 | %{__gettextize} |
6f441ca0 | 176 | %{__aclocal} -I m4 |
3d3dbf69 JB |
177 | %{__autoconf} |
178 | %{__autoheader} | |
155bb60b | 179 | %{__automake} |
19e8899b AM |
180 | if (grep -q ^development_version=yes configure); then |
181 | echo "configure incorrectly rebuild with messed up development status and likely version and revision." >&2 | |
182 | echo "Consider fixing nogit.patch" >&2 | |
183 | exit 1 | |
184 | fi | |
185 | ||
b626fce0 | 186 | %configure \ |
b5bc826d | 187 | --libexecdir=%{pkglibexecdir} \ |
74217b8a | 188 | %{!?with_dirmngr:--disable-dirmngr} \ |
b5bc826d JB |
189 | --enable-g13 \ |
190 | %{!?with_default_gpg:--enable-gpg-is-gpg2} \ | |
169b8933 JB |
191 | %{?with_gnutls:--disable-ntbtls} \ |
192 | %{?with_selinux:--enable-selinux-support} \ | |
a772cce7 | 193 | %{!?with_tests:--disable-tests} \ |
b5bc826d | 194 | --enable-wks-tools \ |
d47c18c2 | 195 | --with-capabilities \ |
1dbb261a | 196 | --with-pinentry-pgm=%{_bindir}/pinentry \ |
b626fce0 AM |
197 | --with-mailprog=/usr/lib/sendmail |
198 | ||
6f441ca0 JR |
199 | # required for info rebuild |
200 | %{__make} -C doc defs.inc | |
201 | ||
62f46a6b | 202 | %{__make} |
b626fce0 AM |
203 | |
204 | %install | |
205 | rm -rf $RPM_BUILD_ROOT | |
b626fce0 AM |
206 | |
207 | %{__make} install \ | |
c85d209c AF |
208 | DESTDIR=$RPM_BUILD_ROOT \ |
209 | pkglibdir=%{_libexecdir} | |
b626fce0 | 210 | |
f197b41f | 211 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/gnupg-agent.sh |
212 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/gnupg-agent.sh | |
c85d209c | 213 | |
a9d55608 JP |
214 | install -d $RPM_BUILD_ROOT%{systemduserunitdir} |
215 | install -p doc/examples/systemd-user/*.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir} | |
216 | ||
74217b8a JB |
217 | %if %{without dirmngr} |
218 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8} | |
a9d55608 JP |
219 | %else |
220 | install -p doc/examples/systemd-user/dirmngr.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir} | |
74217b8a JB |
221 | %endif |
222 | ||
98b0bc09 JB |
223 | # tool removed in 2.2.26 |
224 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/symcryptrun.1* | |
225 | ||
74217b8a JB |
226 | %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir |
227 | ||
228 | # files useful for users packaged as %doc | |
229 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gnupg | |
230 | ||
f1d02fc8 | 231 | %find_lang gnupg2 |
b626fce0 AM |
232 | |
233 | %clean | |
234 | rm -rf $RPM_BUILD_ROOT | |
235 | ||
6f441ca0 | 236 | %post common -p /sbin/postshell |
4be7d664 | 237 | -/usr/sbin/fix-info-dir -c %{_infodir} |
b626fce0 | 238 | |
6f441ca0 | 239 | %postun common -p /sbin/postshell |
4be7d664 | 240 | -/usr/sbin/fix-info-dir -c %{_infodir} |
b626fce0 | 241 | |
f197b41f | 242 | %triggerpostun -n gnupg-agent -- gnupg-agent < 1.9.16-2 |
243 | %banner gnupg-agent-1.9.16-2 << EOF | |
244 | Scripts for starting gnupg-agent have been moved to separate | |
245 | subpackages: gnupg-agent-profile_d and gnupg-agent-xinitrc. | |
84ab814f | 246 | EOF |
f197b41f | 247 | |
84ab814f | 248 | %files |
b626fce0 | 249 | %defattr(644,root,root,755) |
b5bc826d JB |
250 | %if %{with default_gpg} |
251 | %attr(755,root,root) %{_bindir}/gpg | |
252 | %attr(755,root,root) %{_bindir}/gpgv | |
253 | %{_mandir}/man1/gpg.1* | |
254 | %{_mandir}/man1/gpgv.1* | |
255 | %else | |
c85d209c AF |
256 | %attr(755,root,root) %{_bindir}/gpg2 |
257 | %attr(755,root,root) %{_bindir}/gpgv2 | |
579ff0a0 JB |
258 | %{_mandir}/man1/gpg2.1* |
259 | %{_mandir}/man1/gpgv2.1* | |
b5bc826d | 260 | %endif |
c85d209c AF |
261 | |
262 | %files common -f gnupg2.lang | |
263 | %defattr(644,root,root,755) | |
6f441ca0 JR |
264 | %doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP} doc/examples |
265 | %attr(755,root,root) %{_bindir}/g13 | |
df2f3764 | 266 | %attr(755,root,root) %{_bindir}/gpg-connect-agent |
a83b3e7b | 267 | %attr(755,root,root) %{_bindir}/gpgconf |
da4fafa6 | 268 | %attr(755,root,root) %{_bindir}/gpgparsemail |
bcca612a | 269 | %{?with_tests:%attr(755,root,root) %{_bindir}/gpgscm} |
af5dd50f | 270 | %attr(755,root,root) %{_bindir}/gpgsplit |
6f441ca0 | 271 | %attr(755,root,root) %{_bindir}/gpgtar |
579ff0a0 | 272 | %attr(755,root,root) %{_bindir}/kbxutil |
c85d209c AF |
273 | %attr(755,root,root) %{_bindir}/watchgnupg |
274 | %attr(755,root,root) %{_sbindir}/addgnupghome | |
21eea941 | 275 | %attr(755,root,root) %{_sbindir}/applygnupgdefaults |
b5bc826d JB |
276 | %attr(755,root,root) %{_sbindir}/g13-syshelp |
277 | %dir %{pkglibexecdir} | |
278 | ||
c85d209c | 279 | %{_datadir}/gnupg |
579ff0a0 JB |
280 | %{_mandir}/man1/gpg-connect-agent.1* |
281 | %{_mandir}/man1/gpgconf.1* | |
282 | %{_mandir}/man1/gpgparsemail.1* | |
99fb3cd8 | 283 | %{_mandir}/man1/gpgtar.1* |
579ff0a0 | 284 | %{_mandir}/man1/watchgnupg.1* |
6f441ca0 | 285 | %{_mandir}/man7/gnupg.7* |
579ff0a0 | 286 | %{_mandir}/man8/addgnupghome.8* |
21eea941 | 287 | %{_mandir}/man8/applygnupgdefaults.8* |
00461e0e | 288 | %{_infodir}/gnupg.info* |
c85d209c AF |
289 | |
290 | %files -n gnupg-smime | |
291 | %defattr(644,root,root,755) | |
b626fce0 | 292 | %attr(755,root,root) %{_bindir}/gpgsm |
579ff0a0 | 293 | %{_mandir}/man1/gpgsm.1* |
c85d209c AF |
294 | |
295 | %files -n gnupg-agent | |
296 | %defattr(644,root,root,755) | |
c85d209c | 297 | %attr(755,root,root) %{_bindir}/gpg-agent |
b5bc826d | 298 | %attr(755,root,root) %{_bindir}/gpg-wks-server |
b5bc826d JB |
299 | %attr(755,root,root) %{pkglibexecdir}/gpg-check-pattern |
300 | %attr(755,root,root) %{pkglibexecdir}/gpg-protect-tool | |
301 | %attr(755,root,root) %{pkglibexecdir}/gpg-preset-passphrase | |
302 | %attr(755,root,root) %{pkglibexecdir}/gpg-wks-client | |
303 | %attr(755,root,root) %{pkglibexecdir}/scdaemon | |
a9d55608 JP |
304 | %{systemduserunitdir}/gpg-agent.service |
305 | %{systemduserunitdir}/gpg-agent.socket | |
306 | %{systemduserunitdir}/gpg-agent-browser.socket | |
307 | %{systemduserunitdir}/gpg-agent-extra.socket | |
308 | %{systemduserunitdir}/gpg-agent-ssh.socket | |
579ff0a0 JB |
309 | %{_mandir}/man1/gpg-agent.1* |
310 | %{_mandir}/man1/gpg-preset-passphrase.1* | |
b5bc826d JB |
311 | %{_mandir}/man1/gpg-wks-client.1* |
312 | %{_mandir}/man1/gpg-wks-server.1* | |
579ff0a0 | 313 | %{_mandir}/man1/scdaemon.1* |
f197b41f | 314 | |
315 | %files -n gnupg-agent-profile_d | |
316 | %defattr(644,root,root,755) | |
c85d209c | 317 | %attr(755,root,root) /etc/profile.d/gnupg-agent.sh |
f197b41f | 318 | |
319 | %files -n gnupg-agent-xinitrc | |
320 | %defattr(644,root,root,755) | |
321 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/gnupg-agent.sh | |
74217b8a JB |
322 | |
323 | %if %{with dirmngr} | |
324 | %files -n dirmngr | |
325 | %defattr(644,root,root,755) | |
326 | %attr(755,root,root) %{_bindir}/dirmngr | |
327 | %attr(755,root,root) %{_bindir}/dirmngr-client | |
328 | %attr(755,root,root) %{pkglibexecdir}/dirmngr_ldap | |
a9d55608 JP |
329 | %{systemduserunitdir}/dirmngr.service |
330 | %{systemduserunitdir}/dirmngr.socket | |
74217b8a JB |
331 | %{_mandir}/man1/dirmngr-client.1* |
332 | %{_mandir}/man8/dirmngr.8* | |
333 | %endif |