gpg2/gpg2.spec

168 lines
5.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package gpg2
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gpg2
Version: 2.1.4
Release: 0
Summary: GnuPG 2
License: GPL-3.0+
Group: Productivity/Networking/Security
Url: http://www.gnupg.org/aegypten2/
Source: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
Source2: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2.sig
# https://www.gnupg.org/signature_key.html
Source3: %{name}.keyring
Patch4: gnupg-2.0.9-langinfo.patch
Patch5: gnupg-2.0.18-files-are-digests.patch
Patch6: gnupg-dont-fail-with-seahorse-agent.patch
Patch8: gnupg-set_umask_before_open_outfile.patch
Patch9: gnupg-detect_FIPS_mode.patch
Patch11: gnupg-add_legacy_FIPS_mode_option.patch
BuildRequires: expect
BuildRequires: fdupes
BuildRequires: gnutls-devel >= 3.0
BuildRequires: libadns-devel
BuildRequires: libassuan-devel >= 2.1.0
BuildRequires: libbz2-devel
BuildRequires: libcurl-devel >= 7.10
# patch11 (gnupg-add_legacy_FIPS_mode_option.patch) mentions GCRYCTL_INACTIVATE_FIPS_FLAG
# raising gcrypt requirement from 1.4.0
BuildRequires: libgcrypt-devel >= 1.6.1
BuildRequires: libgpg-error-devel >= 1.16
BuildRequires: libksba-devel >= 1.2.0
BuildRequires: libusb-devel
BuildRequires: makeinfo
BuildRequires: npth-devel >= 0.91
BuildRequires: openldap2-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
BuildRequires: zlib-devel
Requires: pinentry
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: %{install_info_prereq}
Recommends: %{name}-lang = %{version}
Obsoletes: dirmngr < 2.1.0
Provides: dirmngr = %{version}
Provides: gnupg = %{version}
Provides: gpg = 1.4.9
Provides: newpg
# special feature needed for OBS signd
Provides: gpg2_signd_support
Obsoletes: gpg < 1.4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GnuPG 2 is the successor of "GnuPG" or GPG. It provides: GPGSM,
gpg-agent, and a keybox library.
%lang_package
%prep
%setup -q -n gnupg-%{version}
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch8 -p1
%patch9 -p1
%patch11 -p1
%build
# build PIEs (position independent executables) for address space randomisation:
%ifarch s390x %{sparc}
# s390x needs to use the large PIE model (at least for gpg.c):
PIE="-fPIE"
%else
PIE="-fpie"
%endif
export CFLAGS="%{optflags} ${PIE}"
export LDFLAGS=-pie
%configure \
--libexecdir=%{_libdir} \
--docdir=%{_docdir}/%{name} \
--with-agent-pgm=%{_bindir}/gpg-agent \
--with-pinentry-pgm=%{_bindir}/pinentry \
--with-dirmngr-pgm=%{_bindir}/dirmngr \
--with-scdaemon-pgm=%{_bindir}/scdaemon \
--enable-ldap \
--enable-gpgsm=yes \
--enable-gpg \
--enable-gpgtar \
--enable-large-rsa \
--enable-large-secmem \
--with-gnu-ld
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir -p %{buildroot}%{_sysconfdir}/gnupg/
# bnc#391347
install -m 644 doc/examples/gpgconf.conf %{buildroot}%{_sysconfdir}/gnupg
# delete to prevent fdupes from creating cross-partition hardlink
rm -rf %{buildroot}%{_docdir}/gpg2/examples/gpgconf.conf
rm %{buildroot}%{_infodir}/dir
# compat symlinks
ln -sf gpg2 %{buildroot}%{_bindir}/gpg
ln -sf gpgv2 %{buildroot}%{_bindir}/gpgv
ln -sf gpg2.1 %{buildroot}%{_mandir}/man1/gpg.1
ln -sf gpgv2.1 %{buildroot}%{_mandir}/man1/gpgv.1
# fix rpmlint invalid-lc-messages-dir:
rm -rf %{buildroot}/%{_datadir}/locale/en@{bold,}quot
# additional files to documentation directory
install -m 644 AUTHORS COPYING ChangeLog NEWS THANKS TODO doc/FAQ %{buildroot}/%{_docdir}/%{name}
# install scdaemon to %{_bindir} (bnc#863645)
mv %{buildroot}%{_libdir}/scdaemon %{buildroot}%{_bindir}
Accepting request 260826 from home:vitezslav_cizek:branches:Base:System - upgrade to 2.1.0 (modern) - The file "secring.gpg" is not anymore used to store the secret keys. Merging of secret keys is now supported. - All support for PGP-2 keys has been removed for security reasons. - The standard key generation interface is now much leaner. This will help a new user to quickly generate a suitable key. - Support for Elliptic Curve Cryptography (ECC) is now available. - Commands to create and sign keys from the command line without any extra prompts are now available. - The Pinentry may now show the new passphrase entry and the passphrase confirmation entry in one dialog. - There is no more need to manually start the gpg-agent. It is now started by any part of GnuPG as needed. - Problems with importing keys with the same long key id have been addressed. - The Dirmngr is now part of GnuPG proper and also takes care of accessing keyserver. - Keyserver pools are now handled in a smarter way. - A new format for locally storing the public keys is now used. This considerable speeds up operations on large keyrings. - Revocation certificates are now created by default. - Card support has been updated, new readers and token types are supported. - The format of the key listing has been changed to better identify the properties of a key. - The gpg-agent may now be used on Windows as a Pageant replacement for Putty in the same way it is used for years on Unix as ssh-agent replacement. - Creation of X.509 certificates has been improved. It is now also possible to export them directly in PKCS#8 and PEM format for use OBS-URL: https://build.opensuse.org/request/show/260826 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=79
2014-11-11 11:52:31 +01:00
mv %{buildroot}%{_libdir}/dirmngr_ldap %{buildroot}%{_bindir}
# install legacy tools
install -m 755 tools/gpg-zip %{buildroot}/%{_bindir}
install -m 755 tools/gpgsplit %{buildroot}/%{_bindir}
%find_lang gnupg2
%if 0%{?suse_version} > 1020
%fdupes %{buildroot}
%endif
%check
%if ! 0%{?qemu_user_space_build}
make check
%endif
%post
%install_info --info-dir=%{_infodir} %{_infodir}/gnupg.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gnupg.info.gz
%files lang -f gnupg2.lang
%defattr(-,root,root)
%files
%defattr(-,root,root)
%doc %{_infodir}/gnupg*
%doc %{_mandir}/*/*.gz
%doc %{_docdir}/%{name}
%{_bindir}/*
%{_libdir}/[^d]*
%{_sbindir}/addgnupghome
%{_sbindir}/applygnupgdefaults
%{_datadir}/gnupg
%dir %{_sysconfdir}/gnupg
%config(noreplace) %{_sysconfdir}/gnupg/gpgconf.conf
%changelog