%define pkg_name Scalar-Util-Clone %define pkg_version 0.04 %define rpm_pkg_version 0.04 %define rpm_pkg_release 1.n0i.1 Summary: Recursively copy datatypes using perl's builtin 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: GPL or Artistic URL: http://search.cpan.org/dist/%{pkg_name}/ Source0: ftp://ftp.cpan.org/authors/id/C/CH/CHOCOLATE/%{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(Scalar::Util) >= 1.01 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)"') %{!?_without_test:BuildRequires: perl(Test::More)} %{!?_without_test:BuildRequires: perl(Scalar::Util) >= 1.01} %{!?_without_test:BuildRequires: perl(IO::Handle)} %{!?_without_test:BuildRequires: perl(Data::Dumper)} %{!?_without_test:BuildRequires: perl(Tie::Hash)} %description This module exports a clone() function which unlocks the builtin functionality perl uses to clone a new interpreter and its values. As such, it is capable of cloning all perl datatypes, including weak references, hashes with shared keys, hashes with UTF8 keys, restricted hashes, tied variables, regex objects, and other curios lurking in Perl's intestines. Because the clone operation is performed at the lowest level, copying the datatype's internals rather than reconstructing it via the public API, the operation is fast and comprehensive, and produces values that exactly match their original (for instance, Data::Dumper dumps of hashes are always guaranteed to be the same as those of the original). %prep %setup -n %{pkg_name}-%{pkg_version} find . -type f | xargs -r chmod 0644 %build PERL_MM_USE_DEFAULT=1 CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS" %{!?_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 $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}/* %{_mandir}/man*/* %changelog * Wed Jul 27 2005 Marius Feraru 0.04-1.n0i.1 - spec file (re)created using N0i::CPAN::RPMizer/1.01 - rebuild on perl 5.8.7