%define pkg_name P5NCI %define pkg_version 0.10 %define rpm_pkg_version 0.10 %define rpm_pkg_release 1.n0i.1 Summary: Perl extension for loading shared libraries and their functions Name: perl-%{pkg_name} Version: %{rpm_pkg_version} %if "%{pkg_version}" == "%{rpm_pkg_version}" Release: %{rpm_pkg_release} %else Release: %{rpm_pkg_release}.%(echo %{pkg_version} | tr - _) %endif Group: Development/Libraries License: Artistic URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: ftp://ftp.cpan.org/authors/id/C/CH/CHROMATIC/%{pkg_name}-%{pkg_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: perl(:MODULE_COMPAT_%(%{__perl} -le 'printf "%%vd", $^V')) Requires: perl(ExtUtils::CBuilder) >= 0.03 Requires: %(perl -MConfig -le '$out = $Config{useithreads} ? "" : "OUT"; print "perl(:WITH${out}_ITHREADS)"') Requires: %(perl -MConfig -le '$out = $Config{usethreads} ? "" : "OUT"; print "perl(:WITH${out}_THREADS)"') Requires: %(perl -MConfig -le '$out = $Config{uselargefiles} ? "" : "OUT"; print "perl(:WITH${out}_LARGEFILES)"') BuildRequires: perl(Module::Build) %{!?_without_test:BuildRequires: perl(ExtUtils::CBuilder) >= 0.03} %{!?_without_test:BuildRequires: perl(Math::BaseCalc)} %{!?_without_test:BuildRequires: perl(Test::Exception) >= 0.19} %{!?_without_test:BuildRequires: perl(Test::Simple) >= 0.47} %description P5NCI provides a bare-bones, stripped down, procedural interface to shared libraries installed on your system. It allows you to call functions in them without writing or compiling any glue code. %prep %setup -n %{pkg_name}-%{pkg_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" %{__make} %{?_smp_mflags} %{!?_without_test:%{__make} test} %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name .packlist -delete || : find $RPM_BUILD_ROOT -type f -name '*.bs' -a -empty -delete || : find $RPM_BUILD_ROOT -depth -type d -a -empty -delete || : %{__chmod} -R u+w,go-w $RPM_BUILD_ROOT/* find $RPM_BUILD_ROOT | xargs -r touch %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes README %{perl_vendorarch}/* %exclude %dir %{perl_vendorarch}/auto %{_mandir}/man*/* %changelog * Tue May 09 2006 Marius Feraru 0.10-1.n0i.1 - spec file (re)created using N0i::CPAN::RPMizer v1.12.1 - rebuild on perl 5.8.8