perl-Time-Period/perl-Time-Period.spec

64 lines
2.2 KiB
RPMSpec
Raw Normal View History

%define PERL_VERSION %(eval `perl -V:version`; echo $version)
Name: perl-Time-Period
Version: 1.20
Release: 5mamba
Summary: A Perl module that contains code to deal with time periods.
Group: Development/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
Source: http://www.cpan.org/authors/id/P/PR/PRYAN/Period-%{version}.tar.gz
URL: http://www.cpan.org
License: GPL
BuildRoot: %{_tmppath}/perl-root
BuildRequires: perl-devel >= %PERL_VERSION
Requires: perl >= %PERL_VERSION
%description
Period.pm is a Perl module that contains code to deal with time periods.
Currently, there is only a function in this module. That function is called inPeriod().
inPeriod() determines if a given time is within a given time period.
It will return 1 if it is, 0 if not, and -1 if either the time or the period passed to it were malformed. The time is specified in non-leap year seconds past January 1, 1970, as per the time() function. The period is a string which is of the form described in Period's man page.
%prep
%setup -q -n Period-%{version}
%build
perl Makefile.PL
%make
make test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
make pure_install DESTDIR=%{buildroot}
%define PERL_SITEARCH %(eval `perl -V:sitearch`; echo $sitearch)
cat $RPM_BUILD_ROOT%PERL_SITEARCH/auto/Time/Period/.packlist | \
sed "s@$RPM_BUILD_ROOT@@g;s@.*/man/.*@&.gz@g" | \
sort -u > .packlist
rm -f $RPM_BUILD_ROOT%PERL_SITEARCH/auto/Time/Period/.packlist
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f .packlist
%files -f .packlist
%defattr(-,root,root)
%changelog
* Fri Aug 30 2013 Automatic Build System <autodist@mambasoft.it> 1.20-5mamba
- automatic rebuild by autodist
* Wed Nov 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20-4mamba
- automatic rebuild by autodist
* Sat Jun 21 2008 Tiziana Ferro <tiziana.ferro@email.it> 1.20-3mamba
- updated Vendor, Distribution, Packager
* Tue Feb 01 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20-2qilnx
- fixed perl version check
* Fri Apr 30 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 1.20-1qilnx
- First build