File pgp-tools.spec of Package pgp-tools

%global tarballname signing-party
%global debian_version 2.2
%global __requires_exclude perl\\\(for\\\)

Name:           pgp-tools
Version:        %{debian_version}
Release:        2%{?dist}
Summary:        Collection of several utilities related to OpenPGP
Group:          Applications/System
License:        BSD and GPLv2+
URL:            http://pgp-tools.alioth.debian.org/
Source0:        pgp-tools-svn877.tar.gz
BuildRequires:  gpg, perl(GnuPG::Interface), perl(Term::ReadKey), perl(Class::MethodMaker)
BuildRequires:  perl(Digest::MD5)
Requires: 	perl(GnuPG::Interface)
Requires:       gpg, perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:       coreutils, sed, /usr/sbin/sendmail, perl(Locale::Recode)
Requires:       perl(Class::MethodMaker), perl(Term::ReadKey)
# for pgpring
Requires:      mutt
# for gpg-key2ps
Requires:      libpaper	

%description
This is a collection of several projects relating to OpenPGP.

* caff: CAcr - Fire and Forget signs and mails a key
* pgp-clean: removes all non-self signatures from key
* pgp-fixkey: removes broken packets from keys
* gpg-mailkeys: simply mail out a signed key to its owner
* gpg-key2ps: generate PostScript file with fingerprint paper strips
* gpgdir: recursive directory encryption tool
* gpglist: show who signed which of your UIDs
* gpgsigs: annotates list of GnuPG keys with already done signatures
* keylookup: ncurses wrapper around gpg --search
* gpgparticipants: create list of party participants for the organiser
* gpgwrap: a passphrase wrapper
* keyanalyze: minimum signing distance (MSD) analysis on keyrings
* sig2dot: converts a list of GnuPG signatures to a .dot file
* springgraph: creates a graph from a .dot file

In other distributions this package is called 'signing-party':

%prep
tar xvf %{S:0}
# fix gpgdir library path lookup as we're using system-provided libraries
sed -i -e "s,/usr/lib/gpgdir,," gpgdir/gpgdir

%build
make %{?_smp_mflags} \
    CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" STRIP=: CC=%{__cc}

%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
make install DESTDIR=$RPM_BUILD_ROOT || :
# apps with no 'make install'
for f in caff pgp-clean pgp-fixkey ; do
install -m 755 caff/$f $RPM_BUILD_ROOT%{_bindir}/
done
install -m 755 gpg-key2ps/gpg-key2ps $RPM_BUILD_ROOT%{_bindir}/
install -m 755 gpgdir/gpgdir $RPM_BUILD_ROOT%{_bindir}/
install -m 755 gpglist/gpglist $RPM_BUILD_ROOT%{_bindir}/
install -m 755 gpgwrap/bin/gpgwrap $RPM_BUILD_ROOT%{_bindir}/
install -m 755 gpg-mailkeys/gpg-mailkeys $RPM_BUILD_ROOT%{_bindir}/
install -m 755 gpgparticipants/gpgparticipants $RPM_BUILD_ROOT%{_bindir}/

# nuke apps creating their own docs dir
rm -rf ${RPM_BUILD_ROOT}/usr/share/doc
# find all manpages wherever they are hiding
DIRS="$(find . -maxdepth 1 -type d | sed -e 's:^.$::' -e 's:^./::')"
for man in `find $DIRS -type f -name "*.1" -print`
do
    install -m644 $man $RPM_BUILD_ROOT%{_mandir}/man1
done

# nuke our copy of pgpring manpage
rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/pgpring.1


rm -rf __fedora_docs
mkdir __fedora_docs
cp -a $DIRS __fedora_docs/

#  cleanup to leave docs only...
find __fedora_docs/ -type f \( -perm /0111 -o -name Makefile -o -name "*.[1-9]" \) -print | xargs rm -f
find __fedora_docs -type d -name src -exec rm -rf \{\} \; || :
rm -rf __fedora_docs/keyanalyze/pgpring
rm -rf __fedora_docs/keyanalyze/*.[cho]
rm     __fedora_docs/gpgdir/INSTALL
rm -rf __fedora_docs/gpgdir/packaging
rm -rf __fedora_docs/gpgdir/test
rm -rf __fedora_docs/gpgwrap/{bin,doc}
rm -rf __fedora_docs/gpglist
rm -rf __fedora_docs/gpgparticipants
mv __fedora_docs/keylookup/COPYING .

%check
pushd gpgdir/test
./gpgdir_test.pl

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%doc README COPYING
%doc __fedora_docs/*

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jan 25 2016 Jochen Schmitt <Jochen herr-schmitt de> - 2.2-1
- New upstream release

* Thu Aug 13 2015 Jochen Schmitt <Jochen herr-schmitt de> - 2.1-1
- New upstram release
- remove spcial handling of testsuite R generation

* Thu Jul 30 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.12-7
- Rebuilt to fix dep. issues

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Jun 08 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.1.12-5
- Perl 5.22 rebuild

* Sun Feb 15 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.12-4
- Fix chnagelog entry

* Wed Feb 11 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.12-3
 - Using of  $RPM_OPT_cFLOAGS and $RPM_LD_FLAGS to buid (#1185529) 

* Wed Feb  4 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.12-2
- New upstream release

* Wed Jan 21 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.10-2
- Fix dependency issue agains perl(for) (#1184547)

* Sat Jan 10 2015 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.10-1
- New upstream release

* Sun Dec  7 2014 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.5-7
- Add reference to 'signing-party' in the package description (#1171393)

* Wed Sep 10 2014 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.5-6
- Fix Unicode-issue (#1139704)

* Tue Sep 02 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.1.5-5
- Perl 5.20 rebuild

* Sat Aug 23 2014 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.5-4
- Fix error in gpg-key2ps (#1121353)

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Mar  6 2014 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.5-1
- New upstream release, fix caff <keyid> issue (#10734121)

* Sun Aug 04 2013 Petr Pisar <ppisar@redhat.com> - 1.1.4-3
- Perl 5.18 rebuild

* Sat Aug  3 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.4-2
- Rebuilt for perl-5.18.0

* Sun Jun 16 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1.4.1-1
- New upstream release
- Add Req libpaper for gpg-key2ps
- Fix local issue with the paper size (#831211)

* Sun Feb 17 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.3-11
- Add perl-podlators as a BR
- Remove BuildRoot definition

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 22 2012 Petr Pisar <ppisar@redhat.com> - 1.1.3-8
- Perl 5.16 rebuild

* Mon Apr 30 2012 Paul Howarth <paul@city-fan.org> - 1.1.3-7
- Fix dependency declaration for Digest::MD5

* Mon Apr 30 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.3-6
- Add missing perl module to fix FTBFS

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.1.3-4
- Perl mass rebuild

* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> - 1.1.3-3
- Perl mass rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Sep  7 2010 Jochen Schmitt <Jochen herr-schmitt de> - 1.1.3-1
- New upstream release
- Get Source from http://ftp.debian.org
- Upstream tarball contains verbain license text

* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.1-5
- Mass rebuild with perl-5.12.0

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 1.1-4
- rebuild against perl 5.10.1

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Apr 17 2009 Matt Domsch <mdomsch@fedoraproject.org> - 1.1-2
- add BRs so %%check succeeds
- drop upstream's outdated copy of pgpring. mutt provides a newer
  version, so require mutt.

* Fri Apr 17 2009 Matt Domsch <mdomsch@fedoraproject.org> - 1.1-1
- update to 1.1
  adds gpgdir, gpgwrap, keyanalyze

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue May 20 2008 Matt Domsch <Matt_Domsch@dell.com> 1.0-1
- upgrade to 1.0-1
  - gpgsigs: Implement support for LaTeX output and photo ids.
    (Closes: debian #412433, #430607)
  - gpg-key2ps: Mention http://www.debian.org/events/materials/business-cards/
    as an alternative. (Closes: debian #439510)
  - add sig2dot and springgraph

* Tue Feb  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.4.12-2
- rebuild for new perl (and fix license tag)

* Wed Sep 19 2007 Matt Domsch <Matt_Domsch@dell.com> 0.4.12-1
- upgrade to 0.4.12
- cleanup doc installation (BZ#246433)

* Thu Nov 02 2006 Matt Domsch <Matt_Domsch@dell.com> 0.4.9-1
- upgrade to 0.4.9
  - Fix a bug with checking if we have exactly one or more keys that failed downloading.
  - Mention in manpage that keyserver-options is a useful setting in
    .caff/gnupghome/gpg.conf (Closes: debian #392811).
  - q-p-encode From: header (Closes: debian #366745).

* Sat Oct 07 2006 Matt Domsch <Matt_Domsch@dell.com> 0.4.8-1
- upgrade to 0.4.8
  - gpglist: do not die with with-fingerprint (Closes: debian #382019).
  - gpg-key2ps: add --list-key to gpg call (works around debian #382794).
  - caff: when set, use $ENV{'GNUPGHOME'} to find secring.gpg. Suggested by
    Gerfried Fuchs.

* Mon Jul 10 2006 Matt Domsch <Matt_Domsch@dell.com> 0.4.7-1
- upgrade to latest upstream
  - gpg-mailkeys: use right content-type for attached key,
    thanks Wesley Landaker (Closes: debian #370566).
  - upstream releasing tarballs now, so use those

* Thu May 25 2006 Matt Domsch <Matt_Domsch@dell.com> 0.4.6-1.20060525svn
- upgrade to lastest upstream

* Sun Feb 12 2006 Matt Domsch <Matt_Domsch@dell.com> 0.4.4-3.20060212svn
- upgrade to lastest upstream
- rebuild for FC5

* Tue Nov 29 2005 Matt Domsch <Matt_Domsch@dell.com> 0.4.4-3.20051123svn
- require perl(Locale::Recode) for gpgsigs

* Mon Nov 28 2005 Matt Domsch <Matt_Domsch@dell.com> 0.4.4-2.20051123svn
- cleanups based on feedback from dmitry@butskoy.name

* Thu Nov 10 2005 Matt Domsch <Matt_Domsch@dell.com> 0.4.4-1
- initial release