various fixes from package review.
This commit is contained in:
parent
976bc2b8d5
commit
db679d989a
@ -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 <rnorwood@redhat.com> - 5.4-3
|
||||
- various specfile fixes
|
||||
|
||||
* Mon Oct 15 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 5.4-2.1
|
||||
- correct license tag
|
||||
- add BR: perl(ExtUtils::MakeMaker)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user