From db679d989a9d04bbee6e943c7242a233edd1146b Mon Sep 17 00:00:00 2001 From: Robin Norwood Date: Thu, 25 Oct 2007 03:26:37 +0000 Subject: [PATCH] various fixes from package review. --- perl-Date-Calc.spec | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/perl-Date-Calc.spec b/perl-Date-Calc.spec index cc5635b..aed5e05 100644 --- a/perl-Date-Calc.spec +++ b/perl-Date-Calc.spec @@ -1,19 +1,18 @@ Name: perl-Date-Calc Version: 5.4 -Release: 2.1 +Release: 3%{?dist} Summary: A module for extended and efficient date calculations in Perl Group: Development/Libraries License: GPL+ or Artistic URL: http://search.cpan.org/dist/Date-Calc/ -Source0: http://www.cpan.org/authors/id/S/ST/STBEY/Date-Calc-%{version}.tar.gz +Source0: http://www.cpan.org/authors/id/S/ST/STBEY/Date-Calc-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: perl >= 1:5.6.1 -BuildRequires: perl-Bit-Vector >= 6.4 +BuildRequires: perl(Bit::Vector) >= 6.4 BuildRequires: perl(ExtUtils::MakeMaker) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl-Bit-Vector >= 6.4 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Bit::Vector) >= 6.4 %description The library provides all sorts of date calculations based on the @@ -21,14 +20,26 @@ Gregorian calendar (the one used in all western countries today), thereby complying with all relevant norms and standards: ISO/R 2015-1971, DIN 1355 and, to some extent, ISO 8601 (where applicable). + %prep %setup -q -n Date-Calc-%{version} %{__perl} -pi -e 's|^#!perl\b|#!%{__perl}|' examples/*.{pl,cgi} tools/*.pl +# Filter unwanted Provides: +cat << \EOF > %{name}-prov +#!/bin/sh +%{__perl_provides} $* |\ + sed -e '/perl(Date::Calc)/d' +EOF + +%define __perl_provides %{_builddir}/Date-Calc-%{version}/%{name}-prov +chmod +x %{__perl_provides} + %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" make %{?_smp_mflags} + %install rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT @@ -37,13 +48,21 @@ 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/* -file=$RPM_BUILD_ROOT%{_mandir}/man3/Date::Calc.3pm -iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" -mv -f "${file}_" "$file" +for file in $RPM_BUILD_ROOT%{_mandir}/man3/Date::Calc.3pm \ + EXAMPLES.txt \ + CREDITS.txt; do + iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" + mv -f "${file}_" "$file" +done + +dos2unix tools/compile.bat +chmod 644 examples/*.{pl,cgi} tools/*.pl tools/*.sh + %check make test + %clean rm -rf $RPM_BUILD_ROOT @@ -57,7 +76,11 @@ rm -rf $RPM_BUILD_ROOT %{perl_vendorarch}/auto/Date/ %{_mandir}/man3/*.3* + %changelog +* Wed Oct 24 2007 Robin Norwood - 5.4-3 +- various specfile fixes + * Mon Oct 15 2007 Tom "spot" Callaway - 5.4-2.1 - correct license tag - add BR: perl(ExtUtils::MakeMaker)