]> git.pld-linux.org Git - packages/gnupg2.git/blob - gnupg2.spec
up to 2.3.5
[packages/gnupg2.git] / gnupg2.spec
1 #
2 # Conditional build:
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"
8 #
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
11 Name:           gnupg2
12 Version:        2.3.5
13 Release:        1
14 License:        GPL v3+
15 Group:          Applications/File
16 Source0:        ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
17 # Source0-md5:  aadf28e7ecc8e484f34c8a8a7b39b33b
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.69
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}
47 Obsoletes:      gnupg < 2
48 Obsoletes:      gnupg-plugin-keys_curl < 2
49 Obsoletes:      gnupg-plugin-keys_hkp < 2
50 Provides:       gnupg = %{version}-%{release}
51 %endif
52 Suggests:       gnupg-agent
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %define         pkglibexecdir   %{_libexecdir}/gnupg2
56
57 %description
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
63 This is enhanced version.
64
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
70 w RFC2440.
71
72 To jest wersja rozszerzona.
73
74 %package common
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
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
89 Conflicts:      gnupg-agent < 1.9.14-2
90
91 %description common
92 Common files used by tools from GnuPG project.
93
94 %description common -l pl.UTF-8
95 Pliki wspólne używane przez różne narzędzia z projektu GnuPG.
96
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
105 Obsoletes:      newpg
106
107 %description -n gnupg-agent
108 GnuPG extension - agent.
109
110 %description -n gnupg-agent -l pl.UTF-8
111 Rozszerzenie GnuPG - agent.
112
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}
118
119 %description -n gnupg-agent-profile_d
120 gnupg-agent start script for text mode.
121
122 %description -n gnupg-agent-profile_d -l pl.UTF-8
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
127 Summary(pl.UTF-8):      Skrypt startowy gnupg-agenta dla trybu X-Window
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
135 %description -n gnupg-agent-xinitrc -l pl.UTF-8
136 Skrypt startowy gnupg-agenta dla trybu X-Window.
137
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
144
145 %description -n gnupg-smime
146 GnuPG extension - S/MIME support.
147
148 %description -n gnupg-smime -l pl.UTF-8
149 Rozszerzenie GnuPG - obsługa S/MIME.
150
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
155 Requires(post,preun):   systemd-units >= 1:250.1
156 Requires:       %{name}-common = %{version}-%{release}
157 Requires:       systemd-units >= 1:250.1
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
171 %prep
172 %setup -q -n gnupg-%{version}
173 %patch0 -p1
174 %patch1 -p1
175 #%patch2 -p1
176
177 %{__rm} po/stamp-po
178
179 %build
180 %{__gettextize}
181 %{__aclocal} -I m4
182 %{__autoconf}
183 %{__autoheader}
184 %{__automake}
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
191 %configure \
192         --libexecdir=%{pkglibexecdir} \
193         %{!?with_dirmngr:--disable-dirmngr} \
194         --enable-g13 \
195         %{!?with_default_gpg:--enable-gpg-is-gpg2} \
196         %{?with_gnutls:--disable-ntbtls} \
197         %{?with_selinux:--enable-selinux-support} \
198         %{!?with_tests:--disable-tests} \
199         --enable-wks-tools \
200         --with-capabilities \
201         --with-pinentry-pgm=%{_bindir}/pinentry \
202         --with-mailprog=/usr/lib/sendmail
203
204 # required for info rebuild
205 %{__make} -C doc defs.inc
206
207 %{__make}
208
209 %install
210 rm -rf $RPM_BUILD_ROOT
211
212 %{__make} install \
213         DESTDIR=$RPM_BUILD_ROOT \
214         pkglibdir=%{_libexecdir}
215
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
218
219 install -d $RPM_BUILD_ROOT%{systemduserunitdir}
220 install -p doc/examples/systemd-user/*.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
221
222 %if %{without dirmngr}
223 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
224 %else
225 install -p doc/examples/systemd-user/dirmngr.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
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
233 %find_lang gnupg2
234
235 %clean
236 rm -rf $RPM_BUILD_ROOT
237
238 %post   common -p /sbin/postshell
239 -/usr/sbin/fix-info-dir -c %{_infodir}
240
241 %postun common -p /sbin/postshell
242 -/usr/sbin/fix-info-dir -c %{_infodir}
243
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
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.
254 EOF
255
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
262 %files
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*
269 %else
270 %attr(755,root,root) %{_bindir}/gpg2
271 %attr(755,root,root) %{_bindir}/gpgv2
272 %{_mandir}/man1/gpg2.1*
273 %{_mandir}/man1/gpgv2.1*
274 %endif
275
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
297
298 %{_datadir}/gnupg
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*
310
311 %files -n gnupg-smime
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/gpgsm
314 %{_mandir}/man1/gpgsm.1*
315
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*
335
336 %files -n gnupg-agent-profile_d
337 %defattr(644,root,root,755)
338 %attr(755,root,root) /etc/profile.d/gnupg-agent.sh
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
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
350 %{systemduserunitdir}/dirmngr.service
351 %{systemduserunitdir}/dirmngr.socket
352 %{_mandir}/man1/dirmngr-client.1*
353 %{_mandir}/man8/dirmngr.8*
354 %endif
This page took 0.077729 seconds and 3 git commands to generate.