]> git.pld-linux.org Git - packages/gnupg2.git/blob - gnupg2.spec
8c9e3572f5ef73d7e416020bba93bb7a7aa32280
[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.4
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:  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) >= 1.177
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:       %{name}-common = %{version}-%{release}
102 Requires:       pinentry >= 0.7.5-2
103 Obsoletes:      newpg
104
105 %description -n gnupg-agent
106 GnuPG extension - agent.
107
108 %description -n gnupg-agent -l pl.UTF-8
109 Rozszerzenie GnuPG - agent.
110
111 %package -n gnupg-agent-profile_d
112 Summary:        gnupg-agent start script for text mode
113 Summary(pl.UTF-8):      Skrypt startowy gnupg-agenta dla trybu tekstowego
114 Group:          Applications/File
115 Requires:       gnupg-agent = %{version}-%{release}
116
117 %description -n gnupg-agent-profile_d
118 gnupg-agent start script for text mode.
119
120 %description -n gnupg-agent-profile_d -l pl.UTF-8
121 Skrypt startowy gnupg-agenta dla trybu tekstowego.
122
123 %package -n gnupg-agent-xinitrc
124 Summary:        gnupg-agent start script for X-Window mode
125 Summary(pl.UTF-8):      Skrypt startowy gnupg-agenta dla trybu X-Window
126 Group:          Applications/File
127 Requires:       gnupg-agent = %{version}-%{release}
128 Requires:       xinitrc
129
130 %description -n gnupg-agent-xinitrc
131 gnupg-agent start script for X-Window mode.
132
133 %description -n gnupg-agent-xinitrc -l pl.UTF-8
134 Skrypt startowy gnupg-agenta dla trybu X-Window.
135
136 %package -n gnupg-smime
137 Summary:        GnuPG extension - S/MIME support
138 Summary(pl.UTF-8):      Rozszerzenie GnuPG - obsługa S/MIME
139 Group:          Applications/File
140 Requires:       %{name}-common = %{version}-%{release}
141 Conflicts:      gnupg-agent < 1.9.14-2
142
143 %description -n gnupg-smime
144 GnuPG extension - S/MIME support.
145
146 %description -n gnupg-smime -l pl.UTF-8
147 Rozszerzenie GnuPG - obsługa S/MIME.
148
149 %package -n dirmngr
150 Summary:        X509/LDAP certificate and revocation list client
151 Summary(pl.UTF-8):      Klient certyfikatów i list anulujących X509/LDAP
152 Group:          Applications
153 Requires:       %{name}-common = %{version}-%{release}
154
155 %description -n dirmngr
156 DirMngr is a client for managing and downloading certificate
157 revocation lists (CRLs) for X509 certificates and for downloading the
158 certificates themselves. DirMngr is usually invoked by gpgsm and in
159 general not used directly.
160
161 %description -n dirmngr -l pl.UTF-8
162 DirMngr to klient do zarządzania i pobierania list anulujących
163 certyfikaty (CRLs - certificate revocation lists) dla certyfikatów
164 X509 oraz do pobierania samych certyfikatów. DirMngr jest zwykle
165 wywoływany przez gpgsm i nie używany bezpośrednio.
166
167 %prep
168 %setup -q -n gnupg-%{version}
169 %patch0 -p1
170 %patch1 -p1
171 #%patch2 -p1
172
173 %{__rm} po/stamp-po
174
175 %build
176 %{__gettextize}
177 %{__aclocal} -I m4
178 %{__autoconf}
179 %{__autoheader}
180 %{__automake}
181 if (grep -q ^development_version=yes configure); then
182         echo "configure incorrectly rebuild with messed up development status and likely version and revision." >&2
183         echo "Consider fixing nogit.patch" >&2
184         exit 1
185 fi
186
187 %configure \
188         --libexecdir=%{pkglibexecdir} \
189         %{!?with_dirmngr:--disable-dirmngr} \
190         --enable-g13 \
191         %{!?with_default_gpg:--enable-gpg-is-gpg2} \
192         %{?with_gnutls:--disable-ntbtls} \
193         %{?with_selinux:--enable-selinux-support} \
194         %{!?with_tests:--disable-tests} \
195         --enable-wks-tools \
196         --with-capabilities \
197         --with-pinentry-pgm=%{_bindir}/pinentry \
198         --with-mailprog=/usr/lib/sendmail
199
200 # required for info rebuild
201 %{__make} -C doc defs.inc
202
203 %{__make}
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207
208 %{__make} install \
209         DESTDIR=$RPM_BUILD_ROOT \
210         pkglibdir=%{_libexecdir}
211
212 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/gnupg-agent.sh
213 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/gnupg-agent.sh
214
215 install -d $RPM_BUILD_ROOT%{systemduserunitdir}
216 install -p doc/examples/systemd-user/*.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
217
218 %if %{without dirmngr}
219 %{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
220 %else
221 install -p doc/examples/systemd-user/dirmngr.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
222 %endif
223
224 %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir
225
226 # files useful for users packaged as %doc
227 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gnupg
228
229 %find_lang gnupg2
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %post   common -p /sbin/postshell
235 -/usr/sbin/fix-info-dir -c %{_infodir}
236
237 %postun common -p /sbin/postshell
238 -/usr/sbin/fix-info-dir -c %{_infodir}
239
240 %triggerpostun -n gnupg-agent -- gnupg-agent < 1.9.16-2
241 %banner gnupg-agent-1.9.16-2 << EOF
242 Scripts for starting gnupg-agent have been moved to separate
243 subpackages: gnupg-agent-profile_d and gnupg-agent-xinitrc.
244 EOF
245
246 %files
247 %defattr(644,root,root,755)
248 %if %{with default_gpg}
249 %attr(755,root,root) %{_bindir}/gpg
250 %attr(755,root,root) %{_bindir}/gpgv
251 %{_mandir}/man1/gpg.1*
252 %{_mandir}/man1/gpgv.1*
253 %else
254 %attr(755,root,root) %{_bindir}/gpg2
255 %attr(755,root,root) %{_bindir}/gpgv2
256 %{_mandir}/man1/gpg2.1*
257 %{_mandir}/man1/gpgv2.1*
258 %endif
259
260 %files common -f gnupg2.lang
261 %defattr(644,root,root,755)
262 %doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP} doc/examples
263 %attr(755,root,root) %{_bindir}/g13
264 %attr(755,root,root) %{_bindir}/gpg-card
265 %attr(755,root,root) %{_bindir}/gpg-connect-agent
266 %attr(755,root,root) %{_bindir}/gpg-wks-client
267 %attr(755,root,root) %{_bindir}/gpgconf
268 %attr(755,root,root) %{_bindir}/gpgparsemail
269 %{?with_tests:%attr(755,root,root) %{_bindir}/gpgscm}
270 %attr(755,root,root) %{_bindir}/gpgsplit
271 %attr(755,root,root) %{_bindir}/gpgtar
272 %attr(755,root,root) %{_bindir}/kbxutil
273 %attr(755,root,root) %{_bindir}/watchgnupg
274 %attr(755,root,root) %{_sbindir}/addgnupghome
275 %attr(755,root,root) %{_sbindir}/applygnupgdefaults
276 %attr(755,root,root) %{_sbindir}/g13-syshelp
277 %dir %{pkglibexecdir}
278 %attr(755,root,root) %{pkglibexecdir}/gpg-pair-tool
279 %attr(755,root,root) %{pkglibexecdir}/gpg-wks-client
280 %attr(755,root,root) %{pkglibexecdir}/keyboxd
281
282 %{_datadir}/gnupg
283 %{_mandir}/man1/gpg-card.1*
284 %{_mandir}/man1/gpg-connect-agent.1*
285 %{_mandir}/man1/gpg-wks-client.1*
286 %{_mandir}/man1/gpgconf.1*
287 %{_mandir}/man1/gpgparsemail.1*
288 %{_mandir}/man1/gpgtar.1*
289 %{_mandir}/man1/watchgnupg.1*
290 %{_mandir}/man7/gnupg.7*
291 %{_mandir}/man8/addgnupghome.8*
292 %{_mandir}/man8/applygnupgdefaults.8*
293 %{_infodir}/gnupg.info*
294
295 %files -n gnupg-smime
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_bindir}/gpgsm
298 %{_mandir}/man1/gpgsm.1*
299
300 %files -n gnupg-agent
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_bindir}/gpg-agent
303 %attr(755,root,root) %{_bindir}/gpg-wks-server
304 %attr(755,root,root) %{pkglibexecdir}/gpg-check-pattern
305 %attr(755,root,root) %{pkglibexecdir}/gpg-protect-tool
306 %attr(755,root,root) %{pkglibexecdir}/gpg-preset-passphrase
307 %attr(755,root,root) %{pkglibexecdir}/scdaemon
308 %attr(755,root,root) %{pkglibexecdir}/tpm2daemon
309 %{systemduserunitdir}/gpg-agent.service
310 %{systemduserunitdir}/gpg-agent.socket
311 %{systemduserunitdir}/gpg-agent-browser.socket
312 %{systemduserunitdir}/gpg-agent-extra.socket
313 %{systemduserunitdir}/gpg-agent-ssh.socket
314 %{_mandir}/man1/gpg-agent.1*
315 %{_mandir}/man1/gpg-check-pattern.1*
316 %{_mandir}/man1/gpg-preset-passphrase.1*
317 %{_mandir}/man1/gpg-wks-server.1*
318 %{_mandir}/man1/scdaemon.1*
319
320 %files -n gnupg-agent-profile_d
321 %defattr(644,root,root,755)
322 %attr(755,root,root) /etc/profile.d/gnupg-agent.sh
323
324 %files -n gnupg-agent-xinitrc
325 %defattr(644,root,root,755)
326 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/gnupg-agent.sh
327
328 %if %{with dirmngr}
329 %files -n dirmngr
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_bindir}/dirmngr
332 %attr(755,root,root) %{_bindir}/dirmngr-client
333 %attr(755,root,root) %{pkglibexecdir}/dirmngr_ldap
334 %{systemduserunitdir}/dirmngr.service
335 %{systemduserunitdir}/dirmngr.socket
336 %{_mandir}/man1/dirmngr-client.1*
337 %{_mandir}/man8/dirmngr.8*
338 %endif
This page took 0.051443 seconds and 2 git commands to generate.