%define _use_internal_dependency_generator 0

Name: perl-Digest-HMAC
Version: 1.01
Release: 11
Packager: cturner@redhat.com
Summary: Digest-HMAC Perl module
License: distributable
Group: Development/Libraries
URL: http://search.cpan.org/search?mode=module&query=Digest%3a%3aHMAC
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: perl >= 0:5.00503
Source0: Digest-HMAC-%{version}.tar.gz
BuildArch: noarch

BuildRequires: perl(Digest::SHA1) perl(Digest::MD5)
Requires: perl(Digest::SHA1) perl(Digest::MD5)

%description
HMAC is used for message integrity checks between two parties that
share a secret key, and works in combination with some other Digest
algorithm, usually MD5 or SHA-1. The HMAC mechanism is described in
RFC 2104.

HMAC follow the common Digest:: interface, but the constructor takes
the secret key and the name of some other simple Digest:: as argument.

%prep
%setup -q -n Digest-HMAC-%{version}

%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor
make
make test

%clean
rm -rf $RPM_BUILD_ROOT
%install

rm -rf $RPM_BUILD_ROOT
eval `perl '-V:installarchlib'`
mkdir -p $RPM_BUILD_ROOT/$installarchlib
make install

[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;

find $RPM_BUILD_ROOT/usr -type f -print | \
        sed "s@^$RPM_BUILD_ROOT@@g" | \
        grep -v perllocal.pod | \
        grep -v "\.packlist" > Digest-HMAC-%{version}-filelist
if [ "$(cat Digest-HMAC-%{version}-filelist)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi

%files -f Digest-HMAC-%{version}-filelist
%defattr(-,root,root)

%changelog
* Tue Aug  6 2002 Chip Turner <cturner@redhat.com>
- automated release bump and build

* Thu Jun 27 2002 Chip Turner <cturner@redhat.com>
- description update

* Wed Jun 26 2002 cturner@redhat.com
- Specfile autogenerated