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