Name: Version: Release: 1%{?dist} Summary: Group: Development/Libraries License: URL: Source0: BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: # Correct for lots of packages, other common choices include eg. Module::Build BuildRequires: perl(ExtUtils::MakeMaker) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %{?perl_default_filter} %description %prep %setup -q %build # Remove OPTIMIZE=... from noarch packages (unneeded) %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' # Remove the next line from noarch packages (unneeded) find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} $RPM_BUILD_ROOT/* %check make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc # For noarch packages: vendorlib %{perl_vendorlib}/* # For arch-specific packages: vendorarch %{perl_vendorarch}/* %exclude %dir %{perl_vendorarch}/auto/ %{_mandir}/man3/*.3* %changelog