The perl specfile template suggests the following for %install:
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
This would be a bit more general than what I use, but doesn't have any
impact on this package's behavior.
Also it suggests the following for make:
make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"
The OPTIMIZE is missing in your spec.
Nope. It is set and is being used:
...
Writing Makefile for Want
+ make
cp Want.pm blib/lib/Want.pm
/usr/bin/perl /usr/lib/perl5/5.8.6/ExtUtils/xsubpp
-typemap /usr/lib/perl5/5.8.6/ExtUtils/typemap Want.xs > Want.xsc && mv
Want.xsc Want
gcc -c -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables
-DVERSION=\"0.08\" -DXS_VERSION=\"0.08\" -fPIC
"-I/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE" Want.c
...