%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires /usr/lib/rpm/find-requires.perl

Summary: HTML::Tagset - data tables useful in parsing HTML.
Name: perl-HTML-Tagset
Version: 3.20
Release: 2%{?_dist_release}
License: Perl's
Group: Development/Libraries
Source0: HTML-Tagset-%{version}.tar.gz
Url: http://search.cpan.org/~sburke/HTML-Tagset/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: perl >= 1:5.6.0
Requires: perl >= 1:5.6.0
BuildArch: noarch

Vendor: Project Vine
Distribution: Vine Linux

%description
This module contains several data tables useful in various kinds of
HTML parsing operations, such as tag and entity names.

# Provide perl-specific find-{provides,requires}.
%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires /usr/lib/rpm/find-requires.perl

%prep
%setup -q -n HTML-Tagset-%{version} 

%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS="vendor" 
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# make install

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

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

%check
make test

%clean 
rm -rf $RPM_BUILD_ROOT

%files -f HTML-Tagset-%{version}-filelist
%defattr(-,root,root)
%dir %{perl_vendorlib}/HTML

%changelog
* Fri Apr 25 2008 IWAI, Masaharu <iwaim@cc.mbn.or.jp> 3.20-2
- build on perl-5.10.0-1vl5
- update License

* Sat Mar 22 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 3.20-1
- new upstream release
- add Vendor/Distributio tag
- build under new versioning policy

* Tue Jul 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.10-0vl1
- updated 3.10
- installed module files to vendor_perl directory
- changed Group to Development/Libraries

* Sat Dec  4 2004 IWAI, Masaharu <iwai@alib.jp> 3.03-25vl4
- build on perl-5.8.6-0vl1
- update Url value

* Mon Dec 15 2003 IWAI, Masaharu <iwai@alib.jp> 3.03-25vl3
- build with perl-5.8.2
- running make test
- add %%{perl_sitelib}/HTML directory in %%files

* Tue Oct 08 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 3.03-25vl2
- Fix Requires, Buildrequires

* Mon Oct 07 2002 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp>
- 3.03-25vl1
- first build for Vine Linux

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

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Apr 30 2001 Chip Turner <cturner@redhat.com>
- Spec file was autogenerated. 
