Summary: A GNU utility for secure communication and data storage.
Name: gnupg
Version: 1.2.1
Release: 3
License: GPL
Group: Applications/System
Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
Source1: ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2.sig
Patch0: gnupg-1.2.1-libexec.patch
# Updates that we stop including after the next release.
URL: http://www.gnupg.org/
BuildPrereq: autoconf
Provides: gpg, openpgp
Prereq: /sbin/install-info
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
GnuPG (GNU Privacy Guard) is a GNU utility for encrypting data and
creating digital signatures. GnuPG has advanced key management
capabilities and is compliant with the proposed OpenPGP Internet
standard described in RFC2440. Since GnuPG doesn't use any patented
algorithm, it is not compatible with any version of PGP2 (PGP2.x uses
only IDEA for symmetric-key encryption, which is patented worldwide).

%prep
%setup -q
%patch0 -p1 -b .libexec
autoconf

%build
%configure --enable-shared \
        --program-transform-name='' --program-prefix='' --program-suffix='' \
        --libexecdir=%{_libdir}/%{name}
make

%clean
rm -rf $RPM_BUILD_ROOT

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall libexecdir=$RPM_BUILD_ROOT/%{_libdir}/%{name} GNUPG_LIBEXECDIR=%{_libdir}/%{name}
install -m644 doc/gpg.info doc/gpgv.info $RPM_BUILD_ROOT/%{_infodir}
sed 's^\.\./g[0-9\.]*/^^g' tools/lspgpot > lspgpot
install -m755 lspgpot $RPM_BUILD_ROOT%{_bindir}/lspgpot
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
%find_lang %name

%post
/sbin/install-info --entry="* gpg: (gpg).                encryption and signing tool" %{_infodir}/gpg.info.gz %{_infodir}/dir
/sbin/install-info --entry="* gpgv: (gpgv).              signature verification tool" %{_infodir}/gpgv.info.gz %{_infodir}/dir

%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/gpgv.info.gz %{_infodir}/dir
    /sbin/install-info --delete %{_infodir}/gpg.info.gz %{_infodir}/dir
fi

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS PROJECTS README THANKS TODO
%doc doc/DETAILS doc/HACKING doc/OpenPGP doc/samplekeys.asc
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/FAQ
%{_datadir}/%{name}/faq.html
%{_datadir}/%{name}/options.skel
%{_infodir}/*
%{_libdir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man7/*

%changelog
* Fri Feb  7 2003 Nalin Dahyabhai <nalin@redhat.com> 1.2.1-3
- modify g10defs to look for helpers in libexecdir, because that's where they
  get installed, per gnupg-users
- actually drop updates for 1.0.7 which are no longer needed for 1.2.1

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Mon Oct 28 2002 Nalin Dahyabhai <nalin@redhat.com> 1.2.1-1
- update to 1.2.1

* Tue Sep 24 2002 Nalin Dahyabhai <nalin@redhat.com> 1.2.0-1
- update to 1.2.0
- stop stripping files manually, let the buildroot policies handle it
- add translations updates ca and fr

* Tue Aug 27 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.7-6
- rebuild

* Fri Jul 24 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.7-5
- specify a menu entry when installing info pages

* Thu Jul 24 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.7-4
- add and install info pages (#67931)
- don't include two copies of the faq, add new doc files (#67931)

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue Apr 30 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.7-1
- update to 1.0.7

* Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.6-5
- rebuild

* Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.6-4
- make the codeset patch unconditional

* Thu Aug  9 2001 Nalin Dahyabhai <nalin@redhat.com> 1.0.6-3
- set message output encoding to match the message encoding, based on a
  patch by goeran@uddeborg.pp.se (#49182)

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com> 1.0.6-2
- Bump release + rebuild.

* Wed May 30 2001 Nalin Dahyabhai <nalin@redhat.com> 1.0.6-1
- update to 1.0.6, fixes format string exploit

* Mon Apr 30 2001 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.0.5, dropping various patches

* Tue Feb 27 2001 Trond Eivind Glomsrød <teg@redhat.com>
- langify
- strip binaries in /usr/lib/gnupg

* Tue Feb 27 2001 Nalin Dahyabhai <nalin@redhat.com>
- fix the group

* Tue Dec 18 2000 Nalin Dahyabhai <nalin@redhat.com>
- go with this version -- 1.0.4c includes a lot of changes beyond just the
  two security fixes

* Thu Dec 14 2000 Nalin Dahyabhai <nalin@redhat.com>
- add the --allow-secret-key-import patch from CVS in case we don't get a 1.0.5

* Fri Dec  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- build as an errata for 7

* Fri Dec  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- add a security patch for a problem with detached signature verification...
  might hold off for an impending 1.0.5, though

* Thu Oct 19 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix a bug preventing creation of .gnupg directories

* Wed Oct 18 2000 Nalin Dahyabhai <nalin@redhat.com>
- add patch to recognize AES signatures properly (#19312)
- add gpgv to the package

* Tue Oct 17 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.0.4 to get security fix

* Tue Oct 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix man page typos (#18797)

* Thu Sep 21 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.0.3
- switch to bundled copy of the man page

* Wed Aug 30 2000 Matt Wilson <msw@redhat.com>
- rebuild to cope with glibc locale binary incompatibility, again

* Wed Aug 16 2000 Nalin Dahyabhai <nalin@redhat.com>
- revert locale patch (#16222)

* Tue Aug 15 2000 Nalin Dahyabhai <nalin@redhat.com>
- set all locale data instead of LC_MESSAGES and LC_TIME (#16222)

* Sun Jul 23 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 1.0.2

* Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
- rebuild to cope with glibc locale binary incompatibility

* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Wed Jul 12 2000 Nalin Dahyabhai <nalin@redhat.com>
- include lspgpot (#13772)

* Mon Jun  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new build environment

* Fri Feb 18 2000 Bill Nottingham <notting@redhat.com>
- build of 1.0.1

* Fri Sep 10 1999 Cristian Gafton <gafton@redhat.com>
- version 1.0.0 build for 6.1us