%define module File-LibMagic
%define name perl-%{module}
%define version 0.85
Name: %{name}
Version: %{version}
Release: 3%{?dist}
Summary: Perlwrapper for libmagic
License: GPL+ or Artistic
Group: Development/Libraries
Source: http://search.cpan.org/CPAN/authors/id/F/FI/FITZNER/%{module}-%{version}.tgz
Patch0: tests-0.85.patch
Url: http://www.cpan.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: file-devel
Buildrequires: perl-devel
BuildRequires: perl-Test-Base
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
The File::LibMagic is a simple perlinterface to libmagic from the
file-4.x package
%prep
%setup -q -n %{module}-%{version}
%patch0 -p0 -b .tests
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name LibMagic.bs -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/*
%check || :
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
%{perl_vendorarch}/File/*
%{perl_vendorarch}/auto/File/*
%{_mandir}/man3/*
%changelog
* Sat Mar 01 2008 Josh Kayse <josh.kayse@gtri.gatech.edu> 0.85-3
- add perl Require
- specify specific directories in %files
* Fri Feb 29 2008 Josh Kayse <josh.kayse@gtri.gatech.edu> 0.85-2
- added patch to fix test cases
* Thu Feb 28 2008 Josh Kayse <josh.kayse@gtri.gatech.edu> 0.85-1
- update to 0.85
* Mon Oct 10 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.82-5mdk
- Fix previous mistake
* Fri Sep 30 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.82-4mdk
- buildrequires fix
* Thu Sep 29 2005 Nicolas Lécureuil <neoclust@mandriva.org> 0.82-3mdk
- fix url
- fix buildrequires
* Sun Jun 19 2005 Olivier Thauvin <nanardon@mandriva.org> 0.82-2mdk
- patch0: add search ldflags
- BuildRequires libmagic-devel
* Wed Jun 15 2005 Olivier Thauvin <nanardon@mandriva.org> 0.82-1mdk
- First mandriva spec