%define _use_internal_dependency_generator 0

Name: perl-Digest-HMAC
Version: 1.02
Release: 1%{_dist_release}
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)
BuildRequires: perl(Digest::MD5)
Requires: perl(Digest::SHA1) perl(Digest::MD5)

Vendor: Project Vine
Distribution: Vine Linux

%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 INSTALLDIRS=vendor
make

%clean
rm -rf $RPM_BUILD_ROOT

%install
rm -rf $RPM_BUILD_ROOT
#eval `perl '-V:installarchlib'`
#mkdir -p $RPM_BUILD_ROOT/$installarchlib
make DESTDIR=$RPM_BUILD_ROOT 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

%check
make test

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

%changelog
* Mon Mar 28 2011 IWAI, Masaharu <iwai@alib.jp> 1.02-1
- new upstream release
- add Vendor and Distribution tags

* Tue Apr 29 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> - 1.01-14
- built with perl-5.10.0.

* Tue Sep 25 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.01-13vl4
- added %check
- changed Group to Development/Libraries

* Mon Oct 09 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 1.01-13vl3
- rebuild for VineSeed / Vine 4.0
- changed Group to Development/Languages
- installs to vendor_arch directory

* Thu Oct 05 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 1.01-13vl2
- change install dir (remove vender)

* Thu Oct 05 2006 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 1.01-13vl1
- rebuild fot Vine 3.2

* Wed Sep 22 2004 Chip Turner <cturner@redhat.com> 1.01-13
- rebuild

* Fri Apr 23 2004 Chip Turner <cturner@redhat.com> 1.01-12
- bump

* Mon Jan 27 2003 Chip Turner <cturner@redhat.com>
- version bump and rebuild

* 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

