Filter Win32::TieRegistry dependency. Do the provides filter like we do in
cpanspec. Drop some macro usage.
This commit is contained in:
parent
be5181a046
commit
42ea8298d4
6
DateTime-filter-provides.sh
Normal file
6
DateTime-filter-provides.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Remove redundant unversioned provides of
|
||||||
|
# perl(DateTime) and perl(DateTime::TimeZone).
|
||||||
|
|
||||||
|
@@PERL_PROV@@ "$@" | sed -e '/^perl(DateTime\(::TimeZone\)\?)$/d'
|
3
DateTime-filter-requires.sh
Normal file
3
DateTime-filter-requires.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
@@PERL_REQ@@ "$@" | sed -e '/^perl(Win32::.*$/d'
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: perl-DateTime
|
Name: perl-DateTime
|
||||||
Version: 0.37
|
Version: 0.37
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: Date and time objects
|
Summary: Date and time objects
|
||||||
License: GPL or Artistic
|
License: GPL or Artistic
|
||||||
@ -31,6 +31,14 @@ Provides: perl(DateTime::TimeZoneCatalog)
|
|||||||
Provides: perl(DateTimePP)
|
Provides: perl(DateTimePP)
|
||||||
Provides: perl(DateTimePPExtra)
|
Provides: perl(DateTimePPExtra)
|
||||||
|
|
||||||
|
Source98: DateTime-filter-requires.sh
|
||||||
|
%global real_perl_requires %{__perl_requires}
|
||||||
|
%define __perl_requires %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-requires
|
||||||
|
|
||||||
|
Source99: DateTime-filter-provides.sh
|
||||||
|
%global real_perl_provides %{__perl_provides}
|
||||||
|
%define __perl_provides %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-provides
|
||||||
|
|
||||||
%description
|
%description
|
||||||
DateTime is a class for the representation of date/time combinations, and
|
DateTime is a class for the representation of date/time combinations, and
|
||||||
is part of the Perl DateTime project. For details on this project please
|
is part of the Perl DateTime project. For details on this project please
|
||||||
@ -47,13 +55,11 @@ cd DateTime-%{version}
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
cat > filter-provides.sh << EOF
|
sed -e 's,@@PERL_REQ@@,%{real_perl_requires},' %{SOURCE98} > %{__perl_requires}
|
||||||
#!/bin/sh
|
chmod +x %{__perl_requires}
|
||||||
# Remove redundant unversioned provides of perl(DateTime) and perl(DateTime::TimeZone)
|
|
||||||
exec %{__perl_provides} $* | egrep -v '^perl[(]DateTime(::TimeZone)?[)]$'
|
sed -e 's,@@PERL_PROV@@,%{real_perl_provides},' %{SOURCE99} > %{__perl_provides}
|
||||||
EOF
|
chmod +x %{__perl_provides}
|
||||||
%define __perl_provides %{_builddir}/DateTimeBundle/filter-provides.sh
|
|
||||||
chmod 755 filter-provides.sh
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd DateTime-Locale-%{DTLocale_version}
|
cd DateTime-Locale-%{DTLocale_version}
|
||||||
@ -70,30 +76,30 @@ cd DateTime-%{version}
|
|||||||
PERLLIB=../DateTime-Locale-%{DTLocale_version}/blib/lib
|
PERLLIB=../DateTime-Locale-%{DTLocale_version}/blib/lib
|
||||||
PERLLIB=$PERLLIB:../DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
|
PERLLIB=$PERLLIB:../DateTime-TimeZone-%{DTTimeZone_version}/blib/lib
|
||||||
export PERLLIB
|
export PERLLIB
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
cd DateTime-Locale-%{DTLocale_version}
|
cd DateTime-Locale-%{DTLocale_version}
|
||||||
./Build install destdir=%{buildroot}
|
./Build install destdir=$RPM_BUILD_ROOT
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
cd DateTime-TimeZone-%{DTTimeZone_version}
|
cd DateTime-TimeZone-%{DTTimeZone_version}
|
||||||
./Build install destdir=%{buildroot}
|
./Build install destdir=$RPM_BUILD_ROOT
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
cd DateTime-%{version}
|
cd DateTime-%{version}
|
||||||
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
|
||||||
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
|
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
|
||||||
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
|
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||||
|
|
||||||
%{_fixperms} %{buildroot}/*
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||||
|
|
||||||
# Move documentation into bundle area
|
# Move documentation into bundle area
|
||||||
mkdir DT::Locale DT::TimeZone
|
mkdir DT::Locale DT::TimeZone
|
||||||
@ -120,7 +126,7 @@ cd -
|
|||||||
make -C DateTime-%{version} test
|
make -C DateTime-%{version} test
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf $RPM_BUILD_ROOT %{__perl_requires} %{__perl_provides}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
@ -134,6 +140,11 @@ rm -rf %{buildroot}
|
|||||||
%{perl_vendorarch}/DateTime*.pm
|
%{perl_vendorarch}/DateTime*.pm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 02 2007 Steven Pritchard <steve@kspei.com> 1:0.37-2
|
||||||
|
- Filter Win32::TieRegistry dependency.
|
||||||
|
- Do the provides filter like we do in cpanspec.
|
||||||
|
- Drop some macro usage.
|
||||||
|
|
||||||
* Sat Mar 31 2007 Steven Pritchard <steve@kspei.com> 1:0.37-1
|
* Sat Mar 31 2007 Steven Pritchard <steve@kspei.com> 1:0.37-1
|
||||||
- Update to DateTime 0.37.
|
- Update to DateTime 0.37.
|
||||||
- Update to DateTime::TimeZone 0.63.
|
- Update to DateTime::TimeZone 0.63.
|
||||||
|
Loading…
Reference in New Issue
Block a user