3 %bcond_without tests # testsuite on build
4 %bcond_without dirmngr # dirmngr packages build
5 %bcond_without default_gpg # install as gpg/gpgv instead of gpg2/gpgv2
6 %bcond_with gnutls # GnuTLS instead of NTBTLS
7 %bcond_with selinux # "SELinux hacks"
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
15 Group: Applications/File
16 Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
17 # Source0-md5: 92c295278c41509ba1c10ef752b8b0ff
18 Source1: gnupg-agent.sh
19 Patch0: %{name}-info.patch
20 Patch1: %{name}-nogit.patch
21 Patch2: %{name}-pl.po-update.patch
22 URL: https://www.gnupg.org/
23 BuildRequires: autoconf >= 2.61
24 BuildRequires: automake >= 1:1.16.3
25 BuildRequires: bzip2-devel
26 BuildRequires: curl-devel >= 7.10
27 BuildRequires: gettext-tools >= 0.21
28 %{?with_gnutls:BuildRequires: gnutls-devel >= 3.0}
29 BuildRequires: libassuan-devel >= 1:2.5.0
30 BuildRequires: libgcrypt-devel >= 1.9.1
31 BuildRequires: libgpg-error-devel >= 1.41
32 BuildRequires: libksba-devel >= 1.3.4
33 BuildRequires: libusb-devel >= 1.0
34 BuildRequires: npth-devel >= 1.2
35 %{!?with_gnutls:BuildRequires: ntbtls-devel >= 0.1.0}
36 %{?with_dirmngr:BuildRequires: openldap-devel >= 2.4.6}
37 BuildRequires: pkgconfig
38 BuildRequires: readline-devel
39 BuildRequires: rpmbuild(macros) >= 2.011
40 BuildRequires: sqlite3-devel >= 3.27
41 BuildRequires: texinfo
42 BuildRequires: tpm2-tss-devel
43 BuildRequires: zlib-devel
44 Requires: gnupg2-common = %{version}-%{release}
45 Requires: sqlite3 >= 3.27
46 %if %{with default_gpg}
48 Obsoletes: gnupg-plugin-keys_curl < 2
49 Obsoletes: gnupg-plugin-keys_hkp < 2
50 Provides: gnupg = %{version}-%{release}
53 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 %define pkglibexecdir %{_libexecdir}/gnupg2
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.
63 This is enhanced version.
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
72 To jest wersja rozszerzona.
75 Summary: GnuPG - common files
76 Summary(pl.UTF-8): GnuPG - pliki wspólne
77 Group: Applications/File
78 Requires: libassuan >= 1:2.5.0
79 Requires: libgcrypt >= 1.9.1
80 Requires: libgpg-error >= 1.41
81 Requires: libksba >= 1.3.4
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
89 Conflicts: gnupg-agent < 1.9.14-2
92 Common files used by tools from GnuPG project.
94 %description common -l pl.UTF-8
95 Pliki wspólne używane przez różne narzędzia z projektu GnuPG.
97 %package -n gnupg-agent
98 Summary: GnuPG extension - agent
99 Summary(pl.UTF-8): Rozszerzenie GnuPG - agent
100 Group: Applications/File
101 Requires(post,preun): systemd-units >= 1:250.1
102 Requires: %{name}-common = %{version}-%{release}
103 Requires: pinentry >= 0.7.5-2
104 Requires: systemd-units >= 1:250.1
107 %description -n gnupg-agent
108 GnuPG extension - agent.
110 %description -n gnupg-agent -l pl.UTF-8
111 Rozszerzenie GnuPG - agent.
113 %package -n gnupg-agent-profile_d
114 Summary: gnupg-agent start script for text mode
115 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu tekstowego
116 Group: Applications/File
117 Requires: gnupg-agent = %{version}-%{release}
119 %description -n gnupg-agent-profile_d
120 gnupg-agent start script for text mode.
122 %description -n gnupg-agent-profile_d -l pl.UTF-8
123 Skrypt startowy gnupg-agenta dla trybu tekstowego.
125 %package -n gnupg-agent-xinitrc
126 Summary: gnupg-agent start script for X-Window mode
127 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu X-Window
128 Group: Applications/File
129 Requires: gnupg-agent = %{version}-%{release}
132 %description -n gnupg-agent-xinitrc
133 gnupg-agent start script for X-Window mode.
135 %description -n gnupg-agent-xinitrc -l pl.UTF-8
136 Skrypt startowy gnupg-agenta dla trybu X-Window.
138 %package -n gnupg-smime
139 Summary: GnuPG extension - S/MIME support
140 Summary(pl.UTF-8): Rozszerzenie GnuPG - obsługa S/MIME
141 Group: Applications/File
142 Requires: %{name}-common = %{version}-%{release}
143 Conflicts: gnupg-agent < 1.9.14-2
145 %description -n gnupg-smime
146 GnuPG extension - S/MIME support.
148 %description -n gnupg-smime -l pl.UTF-8
149 Rozszerzenie GnuPG - obsługa S/MIME.
152 Summary: X509/LDAP certificate and revocation list client
153 Summary(pl.UTF-8): Klient certyfikatów i list anulujących X509/LDAP
155 Requires(post,preun): systemd-units >= 1:250.1
156 Requires: %{name}-common = %{version}-%{release}
157 Requires: systemd-units >= 1:250.1
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.
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.
172 %setup -q -n gnupg-%{version}
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
192 --libexecdir=%{pkglibexecdir} \
193 %{!?with_dirmngr:--disable-dirmngr} \
195 %{!?with_default_gpg:--enable-gpg-is-gpg2} \
196 %{?with_gnutls:--disable-ntbtls} \
197 %{?with_selinux:--enable-selinux-support} \
198 %{!?with_tests:--disable-tests} \
200 --with-capabilities \
201 --with-pinentry-pgm=%{_bindir}/pinentry \
202 --with-mailprog=/usr/lib/sendmail
204 # required for info rebuild
205 %{__make} -C doc defs.inc
210 rm -rf $RPM_BUILD_ROOT
213 DESTDIR=$RPM_BUILD_ROOT \
214 pkglibdir=%{_libexecdir}
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
219 install -d $RPM_BUILD_ROOT%{systemduserunitdir}
220 install -p doc/examples/systemd-user/*.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
222 %if %{without dirmngr}
223 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
225 install -p doc/examples/systemd-user/dirmngr.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
228 %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir
230 # files useful for users packaged as %doc
231 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gnupg
236 rm -rf $RPM_BUILD_ROOT
238 %post common -p /sbin/postshell
239 -/usr/sbin/fix-info-dir -c %{_infodir}
241 %postun common -p /sbin/postshell
242 -/usr/sbin/fix-info-dir -c %{_infodir}
245 %systemd_user_post gpg-agent.service gpg-agent.socket gpg-agent-browser.socket gpg-agent-extra.socket gpg-agent-ssh.socket
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
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.
257 %systemd_user_post dirmngr.service dirmngr.socket
260 %systemd_user_preun dirmngr.service dirmngr.socket
263 %defattr(644,root,root,755)
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*
270 %attr(755,root,root) %{_bindir}/gpg2
271 %attr(755,root,root) %{_bindir}/gpgv2
272 %{_mandir}/man1/gpg2.1*
273 %{_mandir}/man1/gpgv2.1*
276 %files common -f gnupg2.lang
277 %defattr(644,root,root,755)
278 %doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP} doc/examples
279 %attr(755,root,root) %{_bindir}/g13
280 %attr(755,root,root) %{_bindir}/gpg-card
281 %attr(755,root,root) %{_bindir}/gpg-connect-agent
282 %attr(755,root,root) %{_bindir}/gpg-wks-client
283 %attr(755,root,root) %{_bindir}/gpgconf
284 %attr(755,root,root) %{_bindir}/gpgparsemail
285 %{?with_tests:%attr(755,root,root) %{_bindir}/gpgscm}
286 %attr(755,root,root) %{_bindir}/gpgsplit
287 %attr(755,root,root) %{_bindir}/gpgtar
288 %attr(755,root,root) %{_bindir}/kbxutil
289 %attr(755,root,root) %{_bindir}/watchgnupg
290 %attr(755,root,root) %{_sbindir}/addgnupghome
291 %attr(755,root,root) %{_sbindir}/applygnupgdefaults
292 %attr(755,root,root) %{_sbindir}/g13-syshelp
293 %dir %{pkglibexecdir}
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
299 %{_mandir}/man1/gpg-card.1*
300 %{_mandir}/man1/gpg-connect-agent.1*
301 %{_mandir}/man1/gpg-wks-client.1*
302 %{_mandir}/man1/gpgconf.1*
303 %{_mandir}/man1/gpgparsemail.1*
304 %{_mandir}/man1/gpgtar.1*
305 %{_mandir}/man1/watchgnupg.1*
306 %{_mandir}/man7/gnupg.7*
307 %{_mandir}/man8/addgnupghome.8*
308 %{_mandir}/man8/applygnupgdefaults.8*
309 %{_infodir}/gnupg.info*
311 %files -n gnupg-smime
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/gpgsm
314 %{_mandir}/man1/gpgsm.1*
316 %files -n gnupg-agent
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/gpg-agent
319 %attr(755,root,root) %{_bindir}/gpg-wks-server
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
323 %attr(755,root,root) %{pkglibexecdir}/scdaemon
324 %attr(755,root,root) %{pkglibexecdir}/tpm2daemon
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
330 %{_mandir}/man1/gpg-agent.1*
331 %{_mandir}/man1/gpg-check-pattern.1*
332 %{_mandir}/man1/gpg-preset-passphrase.1*
333 %{_mandir}/man1/gpg-wks-server.1*
334 %{_mandir}/man1/scdaemon.1*
336 %files -n gnupg-agent-profile_d
337 %defattr(644,root,root,755)
338 %attr(755,root,root) /etc/profile.d/gnupg-agent.sh
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
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
350 %{systemduserunitdir}/dirmngr.service
351 %{systemduserunitdir}/dirmngr.socket
352 %{_mandir}/man1/dirmngr-client.1*
353 %{_mandir}/man8/dirmngr.8*