]> git.pld-linux.org Git - packages/gnupg2.git/blame - gnupg2.spec
fix build without tests
[packages/gnupg2.git] / gnupg2.spec
CommitLineData
79f30f85 1#
03076a38 2# Conditional build:
b5bc826d 3%bcond_without tests # testsuite on build
74217b8a 4%bcond_without dirmngr # dirmngr packages build
19e8899b 5%bcond_without default_gpg # install as gpg/gpgv instead of gpg2/gpgv2
b5bc826d
JB
6%bcond_with gnutls # GnuTLS instead of NTBTLS
7%bcond_with selinux # "SELinux hacks"
d54c94db 8#
f56b1d35
JB
9Summary: GNU Privacy Guard - tool for secure communication and data storage - enhanced version
10Summary(pl.UTF-8): GnuPG - narzędzie do bezpiecznej komunikacji i bezpiecznego przechowywania danych - wersja rozszerzona
c85d209c 11Name: gnupg2
a15f2caf 12Version: 2.2.21
23f98b3c 13Release: 1
71099ee5 14License: GPL v3+
b626fce0 15Group: Applications/File
d47c18c2 16Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
a15f2caf 17# Source0-md5: 97fa4809da1e8f24fcb0ed7205b2f484
b626fce0 18Source1: gnupg-agent.sh
c85d209c 19Patch0: %{name}-info.patch
19e8899b 20Patch1: %{name}-nogit.patch
ea6e9952 21Patch2: %{name}-disable_tests.patch
6f582fc9 22Patch3: %{name}-pl.po-update.patch
b626fce0 23URL: http://www.gnupg.org/
71099ee5 24BuildRequires: autoconf >= 2.61
cc42aea4 25BuildRequires: automake >= 1:1.14
b636b9b9 26BuildRequires: bzip2-devel
da0f8718 27BuildRequires: curl-devel >= 7.10
169b8933
JB
28BuildRequires: gettext-tools >= 0.17
29%{?with_gnutls:BuildRequires: gnutls-devel >= 3.0}
b3e6ee32 30BuildRequires: libassuan-devel >= 1:2.5.0
169b8933
JB
31BuildRequires: libgcrypt-devel >= 1.7.0
32BuildRequires: libgpg-error-devel >= 1.24
33BuildRequires: libksba-devel >= 1.3.4
34BuildRequires: libusb-devel >= 1.0
35BuildRequires: npth-devel >= 1.2
36%{!?with_gnutls:BuildRequires: ntbtls-devel >= 0.1.0}
74217b8a 37%{?with_dirmngr:BuildRequires: openldap-devel >= 2.4.6}
169b8933
JB
38BuildRequires: pkgconfig
39BuildRequires: readline-devel
f197b41f 40BuildRequires: rpmbuild(macros) >= 1.177
6f441ca0 41BuildRequires: sqlite3-devel >= 3.7
b626fce0
AM
42BuildRequires: texinfo
43BuildRequires: zlib-devel
c85d209c 44Requires: gnupg2-common = %{version}-%{release}
b5bc826d 45Requires: sqlite3 >= 3.7
5516c085
JP
46%if %{with default_gpg}
47Obsoletes: gnupg < 2
19e8899b
AM
48Obsoletes: gnupg-plugin-keys_curl < 2
49Obsoletes: gnupg-plugin-keys_hkp < 2
5516c085
JP
50Provides: gnupg = %{version}-%{release}
51%endif
150f8795 52Suggests: gnupg-agent
b626fce0
AM
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
b5bc826d 55%define pkglibexecdir %{_libexecdir}/gnupg2
b626fce0
AM
56
57%description
c85d209c
AF
58GnuPG is GNU's tool for secure communication and data storage. It can
59be used to encrypt data and to create digital signatures. It includes
60an advanced key management facility and is compliant with the proposed
61OpenPGP Internet standard as described in RFC2440.
62
f56b1d35 63This is enhanced version.
b626fce0 64
0998c692
JR
65%description -l pl.UTF-8
66GnuPG (GNU Privacy Guard) jest narzędziem do bezpiecznej komunikacji i
67bezpiecznego przechowywania danych. Może być używany do szyfrowania
68oraz podpisywania danych. Umożliwia zaawansowane zarządzanie kluczami
69i spełnia normy zdefiniowane w standardzie OpenPGP, który jest opisany
c85d209c
AF
70w RFC2440.
71
f56b1d35 72To jest wersja rozszerzona.
c85d209c
AF
73
74%package common
75Summary: GnuPG - common files
4049c7b1 76Summary(pl.UTF-8): GnuPG - pliki wspólne
c85d209c 77Group: Applications/File
5d1bd0e6
JB
78Requires: libassuan >= 1:2.5.0
79Requires: libgcrypt >= 1.7.0
80Requires: libgpg-error >= 1.24
81Requires: libksba >= 1.3.4
82Requires: npth >= 1.2
83Obsoletes: gnupg2-plugin-keys_curl
84Obsoletes: gnupg2-plugin-keys_finger
85Obsoletes: gnupg2-plugin-keys_hkp
86Obsoletes: gnupg2-plugin-keys_kdns
87Obsoletes: gnupg2-plugin-keys_ldap
88Conflicts: gnupg < 1.4.18-2
c85d209c
AF
89Conflicts: gnupg-agent < 1.9.14-2
90
91%description common
92Common files used by tools from GnuPG project.
93
0998c692
JR
94%description common -l pl.UTF-8
95Pliki wspólne używane przez różne narzędzia z projektu GnuPG.
c85d209c
AF
96
97%package -n gnupg-agent
98Summary: GnuPG extension - agent
4049c7b1 99Summary(pl.UTF-8): Rozszerzenie GnuPG - agent
c85d209c 100Group: Applications/File
7b3cd4e7 101Requires: %{name}-common = %{version}-%{release}
1dbb261a 102Requires: pinentry >= 0.7.5-2
c85d209c
AF
103Obsoletes: newpg
104
105%description -n gnupg-agent
106GnuPG extension - agent.
107
0998c692 108%description -n gnupg-agent -l pl.UTF-8
b626fce0
AM
109Rozszerzenie GnuPG - agent.
110
f197b41f 111%package -n gnupg-agent-profile_d
112Summary: gnupg-agent start script for text mode
4049c7b1 113Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu tekstowego
f197b41f 114Group: Applications/File
115Requires: gnupg-agent = %{version}-%{release}
116
117%description -n gnupg-agent-profile_d
118gnupg-agent start script for text mode.
119
0998c692 120%description -n gnupg-agent-profile_d -l pl.UTF-8
f197b41f 121Skrypt startowy gnupg-agenta dla trybu tekstowego.
122
123%package -n gnupg-agent-xinitrc
124Summary: gnupg-agent start script for X-Window mode
4049c7b1 125Summary(pl.UTF-8): Skrypt startowy gnupg-agenta dla trybu X-Window
f197b41f 126Group: Applications/File
127Requires: gnupg-agent = %{version}-%{release}
128Requires: xinitrc
129
130%description -n gnupg-agent-xinitrc
131gnupg-agent start script for X-Window mode.
132
0998c692 133%description -n gnupg-agent-xinitrc -l pl.UTF-8
f197b41f 134Skrypt startowy gnupg-agenta dla trybu X-Window.
135
c85d209c
AF
136%package -n gnupg-smime
137Summary: GnuPG extension - S/MIME support
4049c7b1 138Summary(pl.UTF-8): Rozszerzenie GnuPG - obsługa S/MIME
c85d209c 139Group: Applications/File
7b3cd4e7 140Requires: %{name}-common = %{version}-%{release}
c85d209c
AF
141Conflicts: gnupg-agent < 1.9.14-2
142
143%description -n gnupg-smime
144GnuPG extension - S/MIME support.
145
0998c692
JR
146%description -n gnupg-smime -l pl.UTF-8
147Rozszerzenie GnuPG - obsługa S/MIME.
c85d209c 148
74217b8a
JB
149%package -n dirmngr
150Summary: X509/LDAP certificate and revocation list client
151Summary(pl.UTF-8): Klient certyfikatów i list anulujących X509/LDAP
152Group: Applications
153Requires: %{name}-common = %{version}-%{release}
154
155%description -n dirmngr
156DirMngr is a client for managing and downloading certificate
157revocation lists (CRLs) for X509 certificates and for downloading the
158certificates themselves. DirMngr is usually invoked by gpgsm and in
159general not used directly.
160
161%description -n dirmngr -l pl.UTF-8
162DirMngr to klient do zarządzania i pobierania list anulujących
163certyfikaty (CRLs - certificate revocation lists) dla certyfikatów
164X509 oraz do pobierania samych certyfikatów. DirMngr jest zwykle
165wywoływany przez gpgsm i nie używany bezpośrednio.
166
b626fce0
AM
167%prep
168%setup -q -n gnupg-%{version}
c85d209c 169%patch0 -p1
491f1c67 170%patch1 -p1
ea6e9952 171%{!?with_tests:%patch2 -p1}
e4ae71ea 172%patch3 -p1
6f582fc9
JB
173
174%{__rm} po/stamp-po
b626fce0
AM
175
176%build
3d3dbf69 177%{__gettextize}
6f441ca0 178%{__aclocal} -I m4
3d3dbf69
JB
179%{__autoconf}
180%{__autoheader}
155bb60b 181%{__automake}
19e8899b
AM
182if (grep -q ^development_version=yes configure); then
183 echo "configure incorrectly rebuild with messed up development status and likely version and revision." >&2
184 echo "Consider fixing nogit.patch" >&2
185 exit 1
186fi
187
b626fce0 188%configure \
b5bc826d 189 --libexecdir=%{pkglibexecdir} \
74217b8a 190 %{!?with_dirmngr:--disable-dirmngr} \
b5bc826d
JB
191 --enable-g13 \
192 %{!?with_default_gpg:--enable-gpg-is-gpg2} \
169b8933
JB
193 %{?with_gnutls:--disable-ntbtls} \
194 %{?with_selinux:--enable-selinux-support} \
d47c18c2 195 --enable-symcryptrun \
b5bc826d 196 --enable-wks-tools \
d47c18c2 197 --with-capabilities \
1dbb261a 198 --with-pinentry-pgm=%{_bindir}/pinentry \
b626fce0
AM
199 --with-mailprog=/usr/lib/sendmail
200
6f441ca0
JR
201# required for info rebuild
202%{__make} -C doc defs.inc
203
62f46a6b 204%{__make}
b626fce0
AM
205
206%install
207rm -rf $RPM_BUILD_ROOT
b626fce0
AM
208
209%{__make} install \
c85d209c
AF
210 DESTDIR=$RPM_BUILD_ROOT \
211 pkglibdir=%{_libexecdir}
b626fce0 212
f197b41f 213install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/profile.d/gnupg-agent.sh
214install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/gnupg-agent.sh
c85d209c 215
a9d55608
JP
216install -d $RPM_BUILD_ROOT%{systemduserunitdir}
217install -p doc/examples/systemd-user/*.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
218
74217b8a
JB
219%if %{without dirmngr}
220%{__rm} $RPM_BUILD_ROOT%{_mandir}/{man1/dirmngr-client.1,man8/dirmngr.8}
a9d55608
JP
221%else
222install -p doc/examples/systemd-user/dirmngr.{socket,service} $RPM_BUILD_ROOT%{systemduserunitdir}
74217b8a
JB
223%endif
224
225%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/info/dir
226
227# files useful for users packaged as %doc
228%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/gnupg
229
f1d02fc8 230%find_lang gnupg2
b626fce0
AM
231
232%clean
233rm -rf $RPM_BUILD_ROOT
234
6f441ca0 235%post common -p /sbin/postshell
4be7d664 236-/usr/sbin/fix-info-dir -c %{_infodir}
b626fce0 237
6f441ca0 238%postun common -p /sbin/postshell
4be7d664 239-/usr/sbin/fix-info-dir -c %{_infodir}
b626fce0 240
f197b41f 241%triggerpostun -n gnupg-agent -- gnupg-agent < 1.9.16-2
242%banner gnupg-agent-1.9.16-2 << EOF
243Scripts for starting gnupg-agent have been moved to separate
244subpackages: gnupg-agent-profile_d and gnupg-agent-xinitrc.
84ab814f 245EOF
f197b41f 246
84ab814f 247%files
b626fce0 248%defattr(644,root,root,755)
b5bc826d
JB
249%if %{with default_gpg}
250%attr(755,root,root) %{_bindir}/gpg
251%attr(755,root,root) %{_bindir}/gpgv
252%{_mandir}/man1/gpg.1*
253%{_mandir}/man1/gpgv.1*
254%else
c85d209c
AF
255%attr(755,root,root) %{_bindir}/gpg2
256%attr(755,root,root) %{_bindir}/gpgv2
579ff0a0
JB
257%{_mandir}/man1/gpg2.1*
258%{_mandir}/man1/gpgv2.1*
b5bc826d 259%endif
c85d209c
AF
260
261%files common -f gnupg2.lang
262%defattr(644,root,root,755)
6f441ca0
JR
263%doc AUTHORS ChangeLog ChangeLog-2011 NEWS README THANKS TODO doc/{DETAILS,FAQ,KEYSERVER,OpenPGP} doc/examples
264%attr(755,root,root) %{_bindir}/g13
df2f3764 265%attr(755,root,root) %{_bindir}/gpg-connect-agent
a83b3e7b 266%attr(755,root,root) %{_bindir}/gpgconf
da4fafa6 267%attr(755,root,root) %{_bindir}/gpgparsemail
bcca612a 268%{?with_tests:%attr(755,root,root) %{_bindir}/gpgscm}
6f441ca0 269%attr(755,root,root) %{_bindir}/gpgtar
579ff0a0 270%attr(755,root,root) %{_bindir}/kbxutil
c85d209c
AF
271%attr(755,root,root) %{_bindir}/watchgnupg
272%attr(755,root,root) %{_sbindir}/addgnupghome
21eea941 273%attr(755,root,root) %{_sbindir}/applygnupgdefaults
b5bc826d
JB
274%attr(755,root,root) %{_sbindir}/g13-syshelp
275%dir %{pkglibexecdir}
276
c85d209c 277%{_datadir}/gnupg
579ff0a0
JB
278%{_mandir}/man1/gpg-connect-agent.1*
279%{_mandir}/man1/gpgconf.1*
280%{_mandir}/man1/gpgparsemail.1*
99fb3cd8 281%{_mandir}/man1/gpgtar.1*
579ff0a0 282%{_mandir}/man1/watchgnupg.1*
6f441ca0 283%{_mandir}/man7/gnupg.7*
579ff0a0 284%{_mandir}/man8/addgnupghome.8*
21eea941 285%{_mandir}/man8/applygnupgdefaults.8*
00461e0e 286%{_infodir}/gnupg.info*
c85d209c
AF
287
288%files -n gnupg-smime
289%defattr(644,root,root,755)
b626fce0 290%attr(755,root,root) %{_bindir}/gpgsm
579ff0a0 291%{_mandir}/man1/gpgsm.1*
c85d209c
AF
292
293%files -n gnupg-agent
294%defattr(644,root,root,755)
c85d209c 295%attr(755,root,root) %{_bindir}/gpg-agent
b5bc826d 296%attr(755,root,root) %{_bindir}/gpg-wks-server
d47c18c2 297%attr(755,root,root) %{_bindir}/symcryptrun
b5bc826d
JB
298%attr(755,root,root) %{pkglibexecdir}/gpg-check-pattern
299%attr(755,root,root) %{pkglibexecdir}/gpg-protect-tool
300%attr(755,root,root) %{pkglibexecdir}/gpg-preset-passphrase
301%attr(755,root,root) %{pkglibexecdir}/gpg-wks-client
302%attr(755,root,root) %{pkglibexecdir}/scdaemon
a9d55608
JP
303%{systemduserunitdir}/gpg-agent.service
304%{systemduserunitdir}/gpg-agent.socket
305%{systemduserunitdir}/gpg-agent-browser.socket
306%{systemduserunitdir}/gpg-agent-extra.socket
307%{systemduserunitdir}/gpg-agent-ssh.socket
579ff0a0
JB
308%{_mandir}/man1/gpg-agent.1*
309%{_mandir}/man1/gpg-preset-passphrase.1*
b5bc826d
JB
310%{_mandir}/man1/gpg-wks-client.1*
311%{_mandir}/man1/gpg-wks-server.1*
579ff0a0 312%{_mandir}/man1/scdaemon.1*
d47c18c2 313%{_mandir}/man1/symcryptrun.1*
f197b41f 314
315%files -n gnupg-agent-profile_d
316%defattr(644,root,root,755)
c85d209c 317%attr(755,root,root) /etc/profile.d/gnupg-agent.sh
f197b41f 318
319%files -n gnupg-agent-xinitrc
320%defattr(644,root,root,755)
321%attr(755,root,root) /etc/X11/xinit/xinitrc.d/gnupg-agent.sh
74217b8a
JB
322
323%if %{with dirmngr}
324%files -n dirmngr
325%defattr(644,root,root,755)
326%attr(755,root,root) %{_bindir}/dirmngr
327%attr(755,root,root) %{_bindir}/dirmngr-client
328%attr(755,root,root) %{pkglibexecdir}/dirmngr_ldap
a9d55608
JP
329%{systemduserunitdir}/dirmngr.service
330%{systemduserunitdir}/dirmngr.socket
74217b8a
JB
331%{_mandir}/man1/dirmngr-client.1*
332%{_mandir}/man8/dirmngr.8*
333%endif
This page took 0.146303 seconds and 4 git commands to generate.