%define _use_internal_dependency_generator 0

Name: perl-PDL
Version: 2.3.4
Release: 4
Packager: cturner@redhat.com
Summary: PDL Perl module
License: distributable
Group: Development/Libraries
URL: http://search.cpan.org/search?mode=module&query=PDL
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: perl >= 0:5.00503
Source0: PDL-%{version}.tar.gz
Patch0: perl-PDL-settings.patch

Provides: perl(PDL::Config) perl(PDL::PP::CType) perl(PDL::PP::Dims) perl(PDL::PP::PDLCode) perl(PDL::PP::SymTab) perl(PDL::PP::XS) perl(PDL::Slatec) perl(PGPLOT) perl(PDL::LiteF) perl(PDL::Lite)


%description
PDL ("Perl Data Language") gives standard Perl the ability to
compactly store and speedily manipulate the large N-dimensional data
arrays which are the bread and butter of scientific computing.  PDL
turns perl in to a free, array-oriented, numerical language similar to
such commerical packages as IDL and MatLab.

%prep
%setup -q -n PDL-%{version}
%patch0 -p1 -b .settings

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

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

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

%changelog
* Wed Jan 29 2003 Chip Turner <cturner@redhat.com>
- bump

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

* Wed Nov 20 2002 Chip Turner <cturner@redhat.com>
- move to 2.3.4

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

* Tue Jul 16 2002 Chip Turner <cturner@redhat.com>
- updated %description

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

* Fri Jun 07 2002 cturner@redhat.com
- Specfile autogenerated