diff --git a/Makefile b/Makefile index d3d021b..ef587f2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for source rpm: perl-PDL -# $Id$ +# $Id: Makefile,v 1.1 2004/09/09 10:14:29 cvsdist Exp $ NAME := perl-PDL -SPECFILE = $(firstword $(wildcard *.spec)) +SPECFILE = perl-PDL.spec include ../common/Makefile.common diff --git a/perl-PDL.spec b/perl-PDL.spec index 5f538c6..814b3ad 100644 --- a/perl-PDL.spec +++ b/perl-PDL.spec @@ -10,6 +10,7 @@ Source0: http://www.cpan.org/authors/id/C/CS/CSOE/PDL-%{version}.tar.gz Patch0: perl-PDL-settings.patch Patch1: perl-PDL-2.4.2-fix_ia64_sdump.patch Patch2: perl-PDL-2.4.2-fix_64bit_pointers.patch +Patch3: perl-PDL-2.4.2-cleanup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl >= 1:5.6.1 @@ -23,6 +24,8 @@ Provides: perl(PDL::Graphics::TriD), perl(PDL::Graphics::TriD::Contours) Provides: perl(PDL::Graphics::TriD::GL), perl(PDL::Graphics::TriD::Image) Provides: perl(PDL::Graphics::TriD::Tk) +%{?!DEBUG: %define DEBUG 0} + %description PDL ("Perl Data Language") gives standard Perl the ability to compactly store and speedily manipulate the large N-dimensional data @@ -36,6 +39,7 @@ such commercial packages as IDL and MatLab. %patch0 -p1 -b .settings %patch1 -p1 %patch2 -p1 +%patch3 -p1 -b .cleanup # Provides: explicitly filter perl(Inline) cat <<__EOF__ > %{name}-findperlprovides #!/bin/sh @@ -52,13 +56,21 @@ __EOF__ %define __perl_requires %{_builddir}/PDL-%{version}/%{name}-findperlrequires chmod +x %{__perl_requires} +%if %{DEBUG} %define debug_package %{nil} +%endif + %build export PERL5LIB=`pwd`/blib/lib:`pwd`/blib/arch: #^- can no longer build if perl-PDL is not installed without above # -CFLAGS="$RPM_OPT_FLAGS -Wno-unused" %{__perl} Makefile.PL INSTALLDIRS=vendor -make OPTIMIZE="$RPM_OPT_FLAGS -Wno-unused" +%if %{DEBUG} +CFLAGS=`echo "$RPM_OPT_FLAGS -Wno-unused" | sed 's/-O2 -g/-g3 -gdwarf-2/'` +%else +CFLAGS="$RPM_OPT_FLAGS -Wno-unused" +%endif +CFLAGS="$CFLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$CFLAGS" +make OPTIMIZE="$CFLAGS" # smp flags blows up spectacularly (2.4.1-10 May 7th 2005) %install @@ -75,8 +87,10 @@ chmod -R u+w $RPM_BUILD_ROOT/* file=$RPM_BUILD_ROOT%{_mandir}/man3/PDL::Func.3pm iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" mv -f "${file}_" "$file" +%if %{DEBUG} /usr/lib/rpm/brp-compress exit 0 +%endif %check || : export PERL5LIB=`pwd`/blib/lib