commit 677979c277aa06e87f37f473cde11da0d3bc3fa1 Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Tue Nov 27 14:21:37 2012 +0100 Modernize spec file perl-Net-LibIDN.spec | 81 ++++++++++++++++++++++++------------------------- 1 files changed, 40 insertions(+), 41 deletions(-) --- diff --git a/perl-Net-LibIDN.spec b/perl-Net-LibIDN.spec index 1c37338..87f612b 100644 --- a/perl-Net-LibIDN.spec +++ b/perl-Net-LibIDN.spec @@ -1,67 +1,66 @@ -# Filter the Perl extension module -%{?perl_default_filter} - -%define pkgname Net-LibIDN - -Summary: Perl bindings for GNU LibIDN -Name: perl-Net-LibIDN -Version: 0.12 -Release: 12%{?dist} -License: GPL+ or Artistic -Group: Development/Libraries -URL: http://search.cpan.org/dist/%{pkgname}/ -Source: http://search.cpan.org/CPAN/authors/id/T/TH/THOR/%{pkgname}-%{version}.tar.gz -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -BuildRequires: libidn-devel >= 0.4.0 -BuildRequires: perl >= 5.8.0 -BuildRequires: perl(ExtUtils::MakeMaker) -BuildRequires: perl(Getopt::Long) +%global pkgname Net-LibIDN + +Summary: Perl bindings for GNU LibIDN +Name: perl-Net-LibIDN +Version: 0.12 +Release: 13%{?dist} +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/%{pkgname}/ +Source: http://search.cpan.org/CPAN/authors/id/T/TH/THOR/%{pkgname}-%{version}.tar.gz +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +BuildRequires: libidn-devel >= 0.4.0 +BuildRequires: perl >= 5.8.0 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Getopt::Long) # Run-time: -BuildRequires: perl(AutoLoader) -BuildRequires: perl(Carp) -BuildRequires: perl(Exporter) +BuildRequires: perl(AutoLoader) +BuildRequires: perl(Carp) +BuildRequires: perl(Exporter) # Tests: -BuildRequires: perl(Test) -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: perl(Test) + +# Filter the Perl extension module +%{?perl_default_filter} %description -Provides perl bindings for GNU Libidn, a C library for -handling Internationalized Domain Names according to -IDNA (RFC 3490), in a way very much inspired by Turbo -Fredriksson's PHP-IDN. +Provides perl bindings for GNU Libidn, a C library for handling +Internationalized Domain Names according to IDNA (RFC 3490), in +a way very much inspired by Turbo Fredriksson's PHP-IDN. %prep %setup -q -n %{pkgname}-%{version} +# Change man page encoding into UTF-8 +for F in _LibIDN.pm; do + iconv -f latin1 -t utf-8 < "$F" > "${F}.utf" + sed -i -e '/^=encoding\s/ s/latin1/utf-8/' "${F}.utf" + touch -r "$F" "${F}.utf" + mv "${F}.utf" "$F" +done; %build -perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} -# Change man page encoding into UTF-8 -iconv -f latin1 -t utf-8 -o "blib/man3/Net::LibIDN.3pm.utf8" "blib/man3/Net::LibIDN.3pm" -mv -f "blib/man3/Net::LibIDN.3pm.utf8" "blib/man3/Net::LibIDN.3pm" - %install -rm -rf $RPM_BUILD_ROOT -%makeinstall -find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -f {} \; -find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';' -chmod -R u+w $RPM_BUILD_ROOT/* +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} + +find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} + +%{_fixperms} $RPM_BUILD_ROOT/* %check make test -%clean -rm -rf $RPM_BUILD_ROOT - %files -%defattr(-,root,root) %doc Artistic Changes README %{_mandir}/man3/*.3pm* %{perl_vendorarch}/Net %{perl_vendorarch}/auto/Net %changelog +* Tue Nov 27 2012 Petr Pisar <ppisar@xxxxxxxxxx> - 0.12-13 +- Modernize spec file + * Mon Aug 13 2012 Petr Pisar <ppisar@xxxxxxxxxx> - 0.12-12 - Build-require Carp -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel