%define abi 5.10.0
%define perlthread %{?with_threads:-thread-multi}
-%define perl_privlib %{_datadir}/perl5/%{version}
-%define perl_archlib %{_libdir}/perl5/%{version}/%{_target_platform}%{perlthread}
+%define perl_privlib %{_datadir}/perl5/%{ver}
+%define perl_archlib %{_libdir}/perl5/%{ver}/%{_target_platform}%{perlthread}
%define perl_sitelib %{_usr}/local/share/perl5
%define perl_sitearch %{_usr}/local/lib/perl5/%{abi}/%{_target_platform}%{perlthread}
%define perl_vendorlib %{_datadir}/perl5/vendor_perl
%define perl_vendorarch %{_libdir}/perl5/vendor_perl/%{abi}/%{_target_platform}%{perlthread}
# extract module version from source
+%define perl_modver() %([ -f %{SOURCE3} ] && awk -vp=%1 '$1 == p{print $3}' %{SOURCE3} || echo ERROR)
%define perl_modversion() %([ -f %{SOURCE3} ] && awk -vp=%1 '$1 == p{m=$1; gsub(/::/, "-", m); printf("perl-%s = %s\\n", m, $3)}END{if (!m) printf("# Error looking up [%s]\\n", p)}' %{SOURCE3} || echo ERROR)
-%define rel 4
+%define ver 5.10.0
+%define rel 5
Summary: Practical Extraction and Report Language (Perl)
Summary(cs.UTF-8): Programovací jazyk Perl
Summary(da.UTF-8): Programmeringssproget Perl
Summary(tr.UTF-8): Kabuk yorumlama dili
Summary(zh_CN.UTF-8): Perl 编程语言。
Name: perl
-Version: 5.10.0
+Version: %{ver}
Release: %{rel}%{!?with_threads:_nothr}
Epoch: 1
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Source0: http://www.cpan.org/src/%{name}-%{version}.tar.gz
+Source0: http://www.cpan.org/src/%{name}-%{ver}.tar.gz
# Source0-md5: d2c39b002ebfd2c3c5dba589365c5a71
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: de47d7893f49ad7f41ba69c78511c0db
# required for proper Provides generation (older are not supported by spec)
BuildRequires: rpm-build >= 4.3-0.20040107.4
BuildRequires: rpmbuild(macros) >= 1.426
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
-Requires: %{name}-doc-reference = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
+Requires: %{name}-doc-reference = %{epoch}:%{ver}-%{release}
+Requires: %{name}-modules = %{epoch}:%{ver}-%{release}
Requires: perldoc
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define __perl %{_builddir}/perl-%{version}/runperl
+%define __perl %{_builddir}/perl-%{ver}/runperl
%define __perl_provides %{__perl} %{SOURCE2}
%description
Summary: Base Perl components for a minimal installation
Summary(pl.UTF-8): Podstawowe składniki potrzebne do minimalnej instalacji Perla
Group: Development/Languages/Perl
-Requires: %{name}-libs = %{epoch}:%{version}-%{release}
+Requires: %{name}-libs = %{epoch}:%{ver}-%{release}
Requires: perl-dirs(%{_target_cpu})
Provides: perl(largefiles)
Provides: %perl_modversion File::Compare
Perla, nadająca się do użytku. Zaleca się instalację pełnego Perla
(pakietu perl), jeśli to tylko możliwe.
-%package GDBM_File
-Summary: GDBM_File - Perl5 access to the gdbm library
-Summary(pl.UTF-8): GDBM_File - dostęp do biblioteki gdbm w Perlu
-Group: Libraries
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
-# FIXME: Set Version: 1.08 and Release: 1 instead of inheriting
-# values from the main package. Why this causes setting
-# version and release macros up to the end of this spec?
-
-%description GDBM_File
-GDBM_File is a module which allows Perl programs to make use of the
-facilities provided by the GNU gdbm library.
-
-%description GDBM_File -l pl.UTF-8
-GDBM_File jest modułem, który umożliwia programom w Perlu korzystanie
-z biblioteki GNU gdbm.
-
%package devel
Summary: Perl development files
Summary(pl.UTF-8): Pliki potrzebne przy tworzeniu własnych aplikacji w Perlu
Summary(pt_BR.UTF-8): Arquivos de desenvolvimento e cabeçalhos para o Perl
Group: Development/Libraries
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-tools-pod = %{epoch}:%{version}-%{release}
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
+Requires: %{name}-modules = %{epoch}:%{ver}-%{release}
+Requires: %{name}-tools-pod = %{epoch}:%{ver}-%{release}
Provides: %perl_modversion CPAN
Provides: %perl_modversion Devel::DProf
Provides: %perl_modversion Devel::PPPort
Summary: Modules from the core Perl distribution
Summary(pl.UTF-8): Moduły z podstawowej dystrybucji Perla
Group: Libraries
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
Provides: %perl_modversion Attribute::Handlers
Provides: %perl_modversion CGI
Provides: %perl_modversion Class::ISA
Provides: %perl_modversion Unicode::Collate
Provides: %perl_modversion Unicode::Normalize
Provides: %perl_modversion libnet
+Requires: perl-Encode >= %perl_modver Encode
Obsoletes: perl-Encode-compat
Obsoletes: perl-lib
Summary: perldoc - Look up Perl documentation in pod format
Summary(pl.UTF-8): perldoc - przeszukiwanie dokumentacji Perla w formacie pod
Group: Development/Tools
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
-Requires: %{name}-tools-pod = %{epoch}:%{version}-%{release}
-Provides: perldoc = 3.14_02@%{version}
+Requires: %{name}-modules = %{epoch}:%{ver}-%{release}
+Requires: %{name}-tools-pod = %{epoch}:%{ver}-%{release}
+Provides: perldoc = 3.14_02@%{ver}
%description perldoc
perldoc looks up a piece of documentation in .pod format that is
Summary(uk.UTF-8): SUID-версія мови Perl
Summary(zh_CN.UTF-8): sperl,用来与 setuid Perl 脚本一起使用
Group: Development/Languages/Perl
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
Obsoletes: perl-suidperl
%description -n sperl
Summary: Various tools from the core Perl distribution
Summary(pl.UTF-8): Różne narzędzia z podstawowej dystrybucji Perla
Group: Applications
-Requires: %{name}-devel = %{epoch}:%{version}-%{release}
+Requires: %{name}-devel = %{epoch}:%{ver}-%{release}
%description tools
Various tools from the core Perl distribution:
a2p - Awk to Perl translator
find2perl - translate find command lines to Perl code
-piconv - iconv(1), reinvented in Perl
psed, s2p - a stream editor
and others.
Różne narzędzia z podstawowej dystrybucji Perla:
a2p - translator skryptów Awka do Perla
find2perl - tłumaczenie linii poleceń programu find na kod w Perlu
-piconv - iconv(1) napisany w Perlu
psed, s2p - edytor strumieniowy
i inne.
Summary: Developer's tools from the core Perl distribution
Summary(pl.UTF-8): Narzędzia z podstawowej dystrybucji Perla, przeznaczone dla programistów
Group: Development/Tools
-Requires: %{name}-base = %{epoch}:%{version}-%{release}
-Requires: %{name}-devel = %{epoch}:%{version}-%{release}
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
+Requires: %{name}-devel = %{epoch}:%{ver}-%{release}
%description tools-devel
Various tools from the core Perl distribution:
c2ph, pstruct - Dump C structures as generated from C<cc -g -S> stabs
dprofpp - display Perl profile data
-enc2xs - Perl Encode Module Generator
h2ph - convert .h C header files to .ph Perl header files
h2xs - convert .h C header files to Perl extensions
perlcc - generate executables from Perl programs
c2ph, pstruct - zrzucanie struktur C w postaci generowanej z tablic
symboli z cc -g -S
dprofpp - wyświetlanie perlowych danych profilujących
-enc2xs - generator modułów kodujących w Perlu
h2ph - konwerter plików nagłówkowych .h z C na perlowe pliki
nagłówkowe .ph
h2xs - konwerter plików nagłówkowych .h z C na rozszerzenia
Summary: Tools for manipulating files in the POD format
Summary(pl.UTF-8): Narzędzia do przetwarzania plików w formacie POD
Group: Applications
-Requires: %{name}-modules = %{epoch}:%{version}-%{release}
+Requires: %{name}-modules = %{epoch}:%{ver}-%{release}
%description tools-pod
Tools for manipulating files in the POD (Plain Old Documentation)
prawdopodobnie nie powinieneś tego robić. Nie zgłaszaj błędów w
microperlu - popraw je.
+%package Encode
+Summary: Encode - character encodings
+Summary(pl.UTF-8): Encode - kodowania znaków
+Version: %perl_modver Encode
+Group: Libraries
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
+
+%description Encode
+The Encode module provides the interfaces between Perl's strings and
+the rest of the system.
+
+%description Encode -l pl.UTF-8
+Moduł Encode udostępnia interfejs pomiędzy łańcuchami w wewnętrznym
+formacie Perla a resztą systemu.
+
+%package GDBM_File
+Summary: GDBM_File - Perl5 access to the gdbm library
+Summary(pl.UTF-8): GDBM_File - dostęp do biblioteki gdbm w Perlu
+Version: %perl_modver GDBM_File
+Group: Libraries
+Requires: %{name}-base = %{epoch}:%{ver}-%{release}
+
+%description GDBM_File
+GDBM_File is a module which allows Perl programs to make use of the
+facilities provided by the GNU gdbm library.
+
+%description GDBM_File -l pl.UTF-8
+GDBM_File jest modułem, który umożliwia programom w Perlu korzystanie
+z biblioteki GNU gdbm.
+
%prep
%setup -q
%patch0 -p1
cat > runperl <<'EOF'
#!/bin/sh
-LD_PRELOAD="%{_builddir}/%{name}-%{version}/libperl.so.%{abi}" \
+LD_PRELOAD="%{_builddir}/%{name}-%{ver}/libperl.so.%{abi}" \
PERL5LIB="%{buildroot}%{perl_privlib}:%{buildroot}%{perl_archlib}" \
exec %{buildroot}%{_bindir}/perl ${1:+"$@"}
EOF
install -d $RPM_BUILD_ROOT%{_mandir}/{ja,ko,zh_CN,zh_TW}/man1
## use symlinks instead of hardlinks
- %{__ln_s} -f perl%{version} $RPM_BUILD_ROOT%{_bindir}/perl
- %{__ln_s} -f perl%{version} $RPM_BUILD_ROOT%{_bindir}/suidperl
+ %{__ln_s} -f perl%{ver} $RPM_BUILD_ROOT%{_bindir}/perl
+ %{__ln_s} -f perl%{ver} $RPM_BUILD_ROOT%{_bindir}/suidperl
%{__ln_s} -f c2ph $RPM_BUILD_ROOT%{_bindir}/pstruct
%{__ln_s} -f psed $RPM_BUILD_ROOT%{_bindir}/s2p
$RPM_BUILD_ROOT%{_mandir}/man1/perl{qnx,solaris,vmesa,vms,vos,win32}*
## symlink perldelta.1.gz -> perlFOOdelta.1.gz
- [ -e $RPM_BUILD_ROOT%{_mandir}/man1/perl%(echo %{version} | tr -d .)delta.1 ] || exit 1
+ [ -e $RPM_BUILD_ROOT%{_mandir}/man1/perl%(echo %{ver} | tr -d .)delta.1 ] || exit 1
rm $RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
- echo ".so perl%(echo %{version} | tr -d .)delta.1" >$RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
+ echo ".so perl%(echo %{ver} | tr -d .)delta.1" >$RPM_BUILD_ROOT%{_mandir}/man1/perldelta.1
## These File::Spec submodules are for non-Unix systems
%{__rm} $RPM_BUILD_ROOT%{perl_privlib}/File/Spec/[EMOVW]*.pm
fi
# update and check perl-modules file
-echo '# Module versions from Perl %{version} distribution.' > perl-modules
+echo '# Module versions from Perl %{ver} distribution.' > perl-modules
for m in $(awk '!/^#/ && !/^$/{print $1}' %{SOURCE3}); do
case $m in
Devel::DProf)
%defattr(644,root,root,755)
%doc doc-base/*
%attr(755,root,root) %{_bindir}/perl
-%attr(755,root,root) %{_bindir}/perl%{version}
+%attr(755,root,root) %{_bindir}/perl%{ver}
%{_mandir}/man1/perl.1*
%lang(fi) %{_mandir}/fi/man1/perl.1*
%lang(pl) %{_mandir}/pl/man1/perl.1*
%dir %{_datadir}/perl5
%dir %{perl_privlib}
%dir %{_libdir}/perl5
-%dir %{_libdir}/perl5/%{version}
+%dir %{_libdir}/perl5/%{ver}
%dir %{perl_archlib}
%dir %{perl_archlib}/CORE
%attr(755,root,root) %{perl_archlib}/CORE/libperl.so.%{abi}
%attr(755,root,root) %{perl_archlib}/auto/Socket/*.so
%{_mandir}/man3/Socket.*
+%files Encode
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/enc2xs
+%attr(755,root,root) %{_bindir}/piconv
+# FIXME: *.h to devel(?), check out the use for *.e2x files
+%{perl_privlib}/Encode
+%{perl_archlib}/Encode*
+%{perl_archlib}/encoding.pm
+%dir %{perl_archlib}/auto/Encode
+%dir %{perl_archlib}/auto/Encode/*/
+%attr(755,root,root) %{perl_archlib}/auto/Encode/*/*.so
+%{_mandir}/man1/enc2xs.*
+%{_mandir}/man1/piconv.*
+%{_mandir}/man3/Encode*
+%{_mandir}/man3/encoding.*
%if %{with gdbm}
%files GDBM_File
%{_mandir}/man3/GDBM_File.*
%endif
-
%files devel
%defattr(644,root,root,755)
%doc doc-devel/*
%dir %{perl_archlib}/auto/re
%attr(755,root,root) %{perl_archlib}/auto/re/*.so
%{_mandir}/man3/re.*
-%{perl_archlib}/encoding.pm
-%{_mandir}/man3/encoding.*
%{perl_archlib}/ops.pm
%{_mandir}/man3/ops.*
%{perl_privlib}/DBM_Filter*
%{_mandir}/man3/DBM_Filter*
-# FIXME: *.h to devel(?), check out the use for *.e2x files
-%{perl_privlib}/Encode
-%{perl_archlib}/Encode*
-%dir %{perl_archlib}/auto/Encode
-%dir %{perl_archlib}/auto/Encode/*/
-%attr(755,root,root) %{perl_archlib}/auto/Encode/*/*.so
-%{_mandir}/man3/Encode*
-
# FIXME: README and Changes files
%{perl_privlib}/Filter
%{perl_archlib}/Filter
%files -n sperl
%defattr(644,root,root,755)
-%attr(4755,root,root) %{_bindir}/sperl%{version}
+%attr(4755,root,root) %{_bindir}/sperl%{ver}
%attr(755,root,root) %{_bindir}/suidperl
%files tools
%{_mandir}/man1/instmodsh.*
%attr(755,root,root) %{_bindir}/libnetcfg
%{_mandir}/man1/libnetcfg.*
-%attr(755,root,root) %{_bindir}/piconv
-%{_mandir}/man1/piconv.*
%attr(755,root,root) %{_bindir}/psed
%{_mandir}/man1/psed.*
%attr(755,root,root) %{_bindir}/ptar
%{_mandir}/man1/pstruct.*
%attr(755,root,root) %{_bindir}/dprofpp
%{_mandir}/man1/dprofpp.*
-%attr(755,root,root) %{_bindir}/enc2xs
-%{_mandir}/man1/enc2xs.*
%attr(755,root,root) %{_bindir}/h2ph
%{_mandir}/man1/h2ph.*
%attr(755,root,root) %{_bindir}/h2xs