%define _use_internal_dependency_generator 0

Summary: A Perl module emulating the file(1) command.
Name: perl-File-MMagic
Version: 1.16
Release: 3
License: distributable
Group: Applications/CPAN
Source0: File-MMagic-%{version}.tar.gz
Url: http://www.cpan.org
BuildRoot: %{_tmppath}/perl-File-MMagic-buildroot/
BuildRequires: perl >= 0:5.00503
Requires: perl >= 0:5.00503
BuildArch: noarch

%description
This module attempts to guess file type from its contents like file(1)
command.

# 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 File-MMagic-%{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
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" > File-MMagic-%{version}-filelist
if [ "$(cat File-MMagic-%{version}-filelist)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi

%files -f File-MMagic-%{version}-filelist
%defattr(-,root,root)

%changelog
* Tue Dec 10 2002 Chip Turner <cturner@redhat.com>
- update to latest version from CPAN

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

* Tue Aug  6 2002 Chip Turner <cturner@localhost.localdomain>
- update to 1.15

* Fri Dec 7 2001 root <root@redhat.com>
- Spec file was autogenerated.