1 # TODO: ntbtls instead of gnutls (when released)?
4 %bcond_without tests # testsuite on build
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: 43a809789a1d897f4386680be0b09d02
17 Source1: gnupg-agent.sh
18 Patch0: %{name}-info.patch
20 Patch2: %{name}-disable_tests.patch
21 Patch3: %{name}-pl.po-update.patch
22 Patch4: %{name}-am.patch
23 URL: http://www.gnupg.org/
24 BuildRequires: adns-devel
25 BuildRequires: autoconf >= 2.61
26 BuildRequires: automake >= 1:1.10
27 BuildRequires: bzip2-devel
28 BuildRequires: curl-devel >= 7.10
29 BuildRequires: gettext-tools >= 0.17
30 BuildRequires: gnutls-devel >= 3.0
31 BuildRequires: libassuan-devel >= 1:2.0.0
32 BuildRequires: libgcrypt-devel >= 1.6.0
33 BuildRequires: libgpg-error-devel >= 1.15
34 BuildRequires: libksba-devel >= 1.2.0
35 BuildRequires: libusb-compat-devel >= 0.1
36 BuildRequires: npth-devel >= 1.1
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: texinfo
43 BuildRequires: zlib-devel
44 Requires: gnupg2-common = %{version}-%{release}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %define _libexecdir %{_libdir}/gnupg2
51 GnuPG is GNU's tool for secure communication and data storage. It can
52 be used to encrypt data and to create digital signatures. It includes
53 an advanced key management facility and is compliant with the proposed
54 OpenPGP Internet standard as described in RFC2440.
56 This is enhanced version.
58 %description -l pl.UTF-8
59 GnuPG (GNU Privacy Guard) jest narzędziem do bezpiecznej komunikacji i
60 bezpiecznego przechowywania danych. Może być używany do szyfrowania
61 oraz podpisywania danych. Umożliwia zaawansowane zarządzanie kluczami
62 i spełnia normy zdefiniowane w standardzie OpenPGP, który jest opisany
65 To jest wersja rozszerzona.
68 Summary: GnuPG - common files
69 Summary(pl.UTF-8): GnuPG - pliki wspólne
70 Group: Applications/File
71 Requires: libassuan >= 1:2.0.0
72 Requires: libgcrypt >= 1.6.0
73 Requires: libgpg-error >= 1.15
74 Requires: libksba >= 1.2.0
76 Obsoletes: gnupg2-plugin-keys_curl
77 Obsoletes: gnupg2-plugin-keys_finger
78 Obsoletes: gnupg2-plugin-keys_hkp
79 Obsoletes: gnupg2-plugin-keys_kdns
80 Obsoletes: gnupg2-plugin-keys_ldap
81 Conflicts: gnupg < 1.4.18-2
82 Conflicts: gnupg-agent < 1.9.14-2
85 Common files used by tools from GnuPG project.
87 %description common -l pl.UTF-8
88 Pliki wspólne używane przez różne narzędzia z projektu GnuPG.
90 %package -n gnupg-agent
91 Summary: GnuPG extension - agent
92 Summary(pl.UTF-8): Rozszerzenie GnuPG - agent
93 Group: Applications/File
94 Requires: %{name}-common = %{version}-%{release}
95 Requires: pinentry >= 0.7.5-2
98 %description -n gnupg-agent
99 GnuPG extension - agent.
101 %description -n gnupg-agent -l pl.UTF-8
102 Rozszerzenie GnuPG - agent.
104 %package -n gnupg-agent-profile_d
105 Summary: gnupg-agent start script for text mode
106 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu tekstowego
107 Group: Applications/File
108 Requires: gnupg-agent = %{version}-%{release}
110 %description -n gnupg-agent-profile_d
111 gnupg-agent start script for text mode.
113 %description -n gnupg-agent-profile_d -l pl.UTF-8
114 Skrypt startowy gnupg-agenta dla trybu tekstowego.
116 %package -n gnupg-agent-xinitrc
117 Summary: gnupg-agent start script for X-Window mode
118 Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu X-Window
119 Group: Applications/File
120 Requires: gnupg-agent = %{version}-%{release}
123 %description -n gnupg-agent-xinitrc
124 gnupg-agent start script for X-Window mode.
126 %description -n gnupg-agent-xinitrc -l pl.UTF-8
127 Skrypt startowy gnupg-agenta dla trybu X-Window.
129 %package -n gnupg-smime
130 Summary: GnuPG extension - S/MIME support
131 Summary(pl.UTF-8): Rozszerzenie GnuPG - obsługa S/MIME
132 Group: Applications/File
133 Requires: %{name}-common = %{version}-%{release}
134 Conflicts: gnupg-agent < 1.9.14-2
136 %description -n gnupg-smime
137 GnuPG extension - S/MIME support.
139 %description -n gnupg-smime -l pl.UTF-8
140 Rozszerzenie GnuPG - obsługa S/MIME.
143 %setup -q -n gnupg-%{version}
146 %{!?with_tests:%patch2 -p1}
154 %{__aclocal} -I m4 -I gl/m4
161 %{?with_selinux:--enable-selinux-support} \
162 --enable-symcryptrun \
163 --with-capabilities \
164 --with-pinentry-pgm=%{_bindir}/pinentry \
165 --with-mailprog=/usr/lib/sendmail
170 rm -rf $RPM_BUILD_ROOT
173 DESTDIR=$RPM_BUILD_ROOT \
174 pkglibdir=%{_libexecdir}
176 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/gnupg-agent.sh
177 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/gnupg-agent.sh
179 # non-existing program
180 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/gpg-zip.1
181 # see dirmngr package
182 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
184 %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir
189 rm -rf $RPM_BUILD_ROOT
191 %post -p /sbin/postshell
192 -/usr/sbin/fix-info-dir -c %{_infodir}
194 %postun -p /sbin/postshell
195 -/usr/sbin/fix-info-dir -c %{_infodir}
197 %triggerpostun -n gnupg-agent -- gnupg-agent < 1.9.16-2
198 %banner gnupg-agent-1.9.16-2 << EOF
199 Scripts for starting gnupg-agent have been moved to separate
200 subpackages: gnupg-agent-profile_d and gnupg-agent-xinitrc.
204 %defattr(644,root,root,755)
205 %doc g10/options.skel
206 %attr(755,root,root) %{_bindir}/gpg2
207 %attr(755,root,root) %{_bindir}/gpgv2
208 %{_mandir}/man1/gpg2.1*
209 %{_mandir}/man1/gpgv2.1*
211 %files common -f gnupg2.lang
212 %defattr(644,root,root,755)
213 %doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP}
214 %attr(755,root,root) %{_bindir}/g13
215 %attr(755,root,root) %{_bindir}/gpg-connect-agent
216 %attr(755,root,root) %{_bindir}/gpgconf
217 %attr(755,root,root) %{_bindir}/gpgkey2ssh
218 %attr(755,root,root) %{_bindir}/gpgparsemail
219 %attr(755,root,root) %{_bindir}/gpgtar
220 %attr(755,root,root) %{_bindir}/kbxutil
221 %attr(755,root,root) %{_bindir}/watchgnupg
222 %attr(755,root,root) %{_sbindir}/addgnupghome
223 %attr(755,root,root) %{_sbindir}/applygnupgdefaults
227 %{_mandir}/man1/gpg-connect-agent.1*
228 %{_mandir}/man1/gpgconf.1*
229 %{_mandir}/man1/gpgparsemail.1*
230 %{_mandir}/man1/watchgnupg.1*
231 %{_mandir}/man7/gnupg.7*
232 %{_mandir}/man8/addgnupghome.8*
233 %{_mandir}/man8/applygnupgdefaults.8*
234 %{_infodir}/gnupg.info*
236 %files -n gnupg-smime
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_bindir}/gpgsm
239 %attr(755,root,root) %{_bindir}/gpgsm-gencert.sh
240 %{_mandir}/man1/gpgsm.1*
241 %{_mandir}/man1/gpgsm-gencert.sh.1*
243 %files -n gnupg-agent
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_bindir}/gpg-agent
246 %attr(755,root,root) %{_bindir}/symcryptrun
247 %attr(755,root,root) %{_libexecdir}/gpg-check-pattern
248 %attr(755,root,root) %{_libexecdir}/gpg-protect-tool
249 %attr(755,root,root) %{_libexecdir}/gpg-preset-passphrase
250 %attr(755,root,root) %{_libexecdir}/scdaemon
251 %{_mandir}/man1/gpg-agent.1*
252 %{_mandir}/man1/gpg-preset-passphrase.1*
253 %{_mandir}/man1/scdaemon.1*
254 %{_mandir}/man1/symcryptrun.1*
256 %files -n gnupg-agent-profile_d
257 %defattr(644,root,root,755)
258 %attr(755,root,root) /etc/profile.d/gnupg-agent.sh
260 %files -n gnupg-agent-xinitrc
261 %defattr(644,root,root,755)
262 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/gnupg-agent.sh