3 %bcond_without tests # testsuite on build
4 %bcond_with gnutls # GnuTLS instead of NTBTLS
5 %bcond_with selinux # "SELinux hacks"
7 Summary: GNU Privacy Guard - tool for secure communication and data storage - enhanced version
8 Summary(pl.UTF-8): GnuPG - narzędzie do bezpiecznej komunikacji i bezpiecznego przechowywania danych - wersja rozszerzona
10 # 2.1.x is development version unfortunately (see gpg2 --version)
14 Group: Applications/File
15 Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
16 # Source0-md5: 685ebf4c3a7134ba0209c96b18b2f064
17 Source1: gnupg-agent.sh
18 Patch0: %{name}-info.patch
20 Patch2: %{name}-disable_tests.patch
21 Patch3: %{name}-pl.po-update.patch
22 URL: http://www.gnupg.org/
23 BuildRequires: adns-devel
24 BuildRequires: autoconf >= 2.61
25 BuildRequires: automake >= 1:1.14
26 BuildRequires: bzip2-devel
27 BuildRequires: curl-devel >= 7.10
28 BuildRequires: gettext-tools >= 0.17
29 %{?with_gnutls:BuildRequires: gnutls-devel >= 3.0}
30 BuildRequires: libassuan-devel >= 1:2.4.3
31 BuildRequires: libgcrypt-devel >= 1.7.0
32 BuildRequires: libgpg-error-devel >= 1.24
33 BuildRequires: libksba-devel >= 1.3.4
34 BuildRequires: libusb-devel >= 1.0
35 BuildRequires: npth-devel >= 1.2
36 %{!?with_gnutls:BuildRequires: ntbtls-devel >= 0.1.0}
37 # only for dirmngr, which is not built here
38 #BuildRequires: openldap-devel
39 BuildRequires: pkgconfig
40 BuildRequires: readline-devel
41 BuildRequires: rpmbuild(macros) >= 1.177
42 BuildRequires: sqlite3-devel >= 3.7
43 BuildRequires: texinfo
44 BuildRequires: zlib-devel
45 Requires: gnupg2-common = %{version}-%{release}
46 Requires: sqlite3 >= 3.7
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 %define _libexecdir %{_libdir}/gnupg2
53 GnuPG is GNU's tool for secure communication and data storage. It can
54 be used to encrypt data and to create digital signatures. It includes
55 an advanced key management facility and is compliant with the proposed
56 OpenPGP Internet standard as described in RFC2440.
58 This is enhanced version.
60 %description -l pl.UTF-8
61 GnuPG (GNU Privacy Guard) jest narzędziem do bezpiecznej komunikacji i
62 bezpiecznego przechowywania danych. Może być używany do szyfrowania
63 oraz podpisywania danych. Umożliwia zaawansowane zarządzanie kluczami
64 i spełnia normy zdefiniowane w standardzie OpenPGP, który jest opisany
67 To jest wersja rozszerzona.
70 Summary: GnuPG - common files
71 Summary(pl.UTF-8): GnuPG - pliki wspólne
72 Group: Applications/File
73 Requires: libassuan >= 1:2.4.3
74 Requires: libgcrypt >= 1.7.0
75 Requires: libgpg-error >= 1.24
76 Requires: libksba >= 1.3.4
78 Obsoletes: gnupg2-plugin-keys_curl
79 Obsoletes: gnupg2-plugin-keys_finger
80 Obsoletes: gnupg2-plugin-keys_hkp
81 Obsoletes: gnupg2-plugin-keys_kdns
82 Obsoletes: gnupg2-plugin-keys_ldap
83 Conflicts: gnupg < 1.4.18-2
84 Conflicts: gnupg-agent < 1.9.14-2
87 Common files used by tools from GnuPG project.
89 %description common -l pl.UTF-8
90 Pliki wspólne używane przez różne narzędzia z projektu GnuPG.
92 %package -n gnupg-agent
93 Summary: GnuPG extension - agent
94 Summary(pl.UTF-8): Rozszerzenie GnuPG - agent
95 Group: Applications/File
96 Requires: %{name}-common = %{version}-%{release}
97 Requires: pinentry >= 0.7.5-2
100 %description -n gnupg-agent
101 GnuPG extension - agent.
103 %description -n gnupg-agent -l pl.UTF-8
104 Rozszerzenie GnuPG - agent.
106 %package -n gnupg-agent-profile_d
107 Summary: gnupg-agent start script for text mode
108 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu tekstowego
109 Group: Applications/File
110 Requires: gnupg-agent = %{version}-%{release}
112 %description -n gnupg-agent-profile_d
113 gnupg-agent start script for text mode.
115 %description -n gnupg-agent-profile_d -l pl.UTF-8
116 Skrypt startowy gnupg-agenta dla trybu tekstowego.
118 %package -n gnupg-agent-xinitrc
119 Summary: gnupg-agent start script for X-Window mode
120 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu X-Window
121 Group: Applications/File
122 Requires: gnupg-agent = %{version}-%{release}
125 %description -n gnupg-agent-xinitrc
126 gnupg-agent start script for X-Window mode.
128 %description -n gnupg-agent-xinitrc -l pl.UTF-8
129 Skrypt startowy gnupg-agenta dla trybu X-Window.
131 %package -n gnupg-smime
132 Summary: GnuPG extension - S/MIME support
133 Summary(pl.UTF-8): Rozszerzenie GnuPG - obsługa S/MIME
134 Group: Applications/File
135 Requires: %{name}-common = %{version}-%{release}
136 Conflicts: gnupg-agent < 1.9.14-2
138 %description -n gnupg-smime
139 GnuPG extension - S/MIME support.
141 %description -n gnupg-smime -l pl.UTF-8
142 Rozszerzenie GnuPG - obsługa S/MIME.
145 %setup -q -n gnupg-%{version}
148 %{!?with_tests:%patch2 -p1}
163 %{?with_gnutls:--disable-ntbtls} \
164 %{?with_selinux:--enable-selinux-support} \
165 --enable-symcryptrun \
166 --with-capabilities \
167 --with-pinentry-pgm=%{_bindir}/pinentry \
168 --with-mailprog=/usr/lib/sendmail
170 # required for info rebuild
171 %{__make} -C doc defs.inc
176 rm -rf $RPM_BUILD_ROOT
179 DESTDIR=$RPM_BUILD_ROOT \
180 pkglibdir=%{_libexecdir}
182 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/gnupg-agent.sh
183 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/gnupg-agent.sh
185 # see dirmngr package
186 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
188 %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir
190 # files useful for users packaged as %doc
191 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gnupg
196 rm -rf $RPM_BUILD_ROOT
198 %post common -p /sbin/postshell
199 -/usr/sbin/fix-info-dir -c %{_infodir}
201 %postun common -p /sbin/postshell
202 -/usr/sbin/fix-info-dir -c %{_infodir}
204 %triggerpostun -n gnupg-agent -- gnupg-agent < 1.9.16-2
205 %banner gnupg-agent-1.9.16-2 << EOF
206 Scripts for starting gnupg-agent have been moved to separate
207 subpackages: gnupg-agent-profile_d and gnupg-agent-xinitrc.
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{_bindir}/gpg2
213 %attr(755,root,root) %{_bindir}/gpgv2
214 %{_mandir}/man1/gpg2.1*
215 %{_mandir}/man1/gpgv2.1*
217 %files common -f gnupg2.lang
218 %defattr(644,root,root,755)
219 %doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP} doc/examples
220 %attr(755,root,root) %{_bindir}/g13
221 %attr(755,root,root) %{_bindir}/gpg-connect-agent
222 %attr(755,root,root) %{_bindir}/gpgconf
223 %attr(755,root,root) %{_bindir}/gpgparsemail
224 %attr(755,root,root) %{_bindir}/gpgscm
225 %attr(755,root,root) %{_bindir}/gpgtar
226 %attr(755,root,root) %{_bindir}/kbxutil
227 %attr(755,root,root) %{_bindir}/watchgnupg
228 %attr(755,root,root) %{_sbindir}/addgnupghome
229 %attr(755,root,root) %{_sbindir}/applygnupgdefaults
230 %attr(755,root,root) %{_sbindir}/g13-syshelp
234 %{_mandir}/man1/gpg-connect-agent.1*
235 %{_mandir}/man1/gpgconf.1*
236 %{_mandir}/man1/gpgparsemail.1*
237 %{_mandir}/man1/watchgnupg.1*
238 %{_mandir}/man7/gnupg.7*
239 %{_mandir}/man8/addgnupghome.8*
240 %{_mandir}/man8/applygnupgdefaults.8*
241 %{_infodir}/gnupg.info*
243 %files -n gnupg-smime
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_bindir}/gpgsm
246 %{_mandir}/man1/gpgsm.1*
248 %files -n gnupg-agent
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/gpg-agent
251 %attr(755,root,root) %{_bindir}/symcryptrun
252 %attr(755,root,root) %{_libexecdir}/gpg-check-pattern
253 %attr(755,root,root) %{_libexecdir}/gpg-protect-tool
254 %attr(755,root,root) %{_libexecdir}/gpg-preset-passphrase
255 %attr(755,root,root) %{_libexecdir}/gpg-wks-client
256 %attr(755,root,root) %{_libexecdir}/scdaemon
257 %{_mandir}/man1/gpg-agent.1*
258 %{_mandir}/man1/gpg-preset-passphrase.1*
259 %{_mandir}/man1/scdaemon.1*
260 %{_mandir}/man1/symcryptrun.1*
262 %files -n gnupg-agent-profile_d
263 %defattr(644,root,root,755)
264 %attr(755,root,root) /etc/profile.d/gnupg-agent.sh
266 %files -n gnupg-agent-xinitrc
267 %defattr(644,root,root,755)
268 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/gnupg-agent.sh