[perl-RPC-XML/f17] Modernize spec file

Petr Pisar ppisar at fedoraproject.org
Tue Sep 4 10:43:23 UTC 2012


commit 96cd05fe208728f435352b8145e674537dd376f5
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Sep 4 11:42:05 2012 +0200

    Modernize spec file

 perl-RPC-XML.spec |   39 +++++++++++++++------------------------
 1 files changed, 15 insertions(+), 24 deletions(-)
---
diff --git a/perl-RPC-XML.spec b/perl-RPC-XML.spec
index 4e08805..b647f0a 100644
--- a/perl-RPC-XML.spec
+++ b/perl-RPC-XML.spec
@@ -1,17 +1,14 @@
-%define real_name RPC-XML
+%global cpan_name RPC-XML
 
-Name:    perl-RPC-XML
+Name:    perl-%{cpan_name}
 Version: 0.77
 Release: 1%{?dist}
 Summary: Set of classes for core data, message and XML handling
-
 Group:   Development/Libraries
 License: Artistic 2.0 or LGPLv2
-URL:     http://search.cpan.org/dist/RPC-XML/
-
-Source0:   http://search.cpan.org/CPAN/authors/id/R/RJ/RJRAY/RPC-XML-%{version}.tar.gz
+URL:     http://search.cpan.org/dist/%{cpan_name}/
+Source0:   http://search.cpan.org/CPAN/authors/id/R/RJ/RJRAY/%{cpan_name}-%{version}.tar.gz
 Source1:   README.license
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 
 BuildRequires: perl(Cwd)
@@ -70,27 +67,28 @@ Requires:       perl(XML::LibXML) >= 1.85
 # Remove underspecified symbols
 %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(constant|File::Spec|Scalar::Util|XML::LibXML|XML::Parser\\)\\s*$
 
-%package -n perl-Apache-RPC
-Summary: Companion packages for RPC::XML tuned for mod_perl environments
-Group:   Development/Libraries
-Requires:   perl(File::Spec) >= 0.8
-Requires:   perl(RPC::XML::Server)
-
 %description
 The RPC::XML package is an implementation of XML-RPC. The module provides
 classes for sample client and server implementations, a server designed as an
 Apache location-handler, and a suite of data-manipulation classes that are
 used by them.
 
+
+%package -n perl-Apache-RPC
+Summary: Companion packages for RPC::XML tuned for mod_perl environments
+Group:   Development/Libraries
+Requires:   perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:   perl(File::Spec) >= 0.8
+Requires:   perl(RPC::XML::Server)
+
 %description -n perl-Apache-RPC
 This package contains Apache::RPC::Server and Apache::RPC::Status, useful for
 running RPC::XML under mod_perl.
 
 
 %prep
-%setup -qn %{real_name}-%{version}
+%setup -qn %{cpan_name}-%{version}
 cp -p %{SOURCE1} .
-
 chmod -c -x t/*
 
 %build
@@ -98,21 +96,14 @@ perl Makefile.PL INSTALLDIRS="vendor" PREFIX="%{_prefix}"
 make %{?_smp_mflags}
 
 %install
-rm -rf %{buildroot}
-
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
+make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
-
 %{_fixperms} %{buildroot}/*
 
 %check
 make test
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root,-)
 %doc ChangeLog* README etc/*.dtd README.license ex/ methods/ t/
 %{_mandir}/man3/RPC*
 %{_mandir}/man1/*
@@ -120,7 +111,6 @@ rm -rf %{buildroot}
 %{perl_vendorlib}/RPC
 
 %files -n perl-Apache-RPC
-%defattr(-,root,root,-)
 %doc README.apache2 README.license
 %{_mandir}/man3/Apache*
 %{perl_vendorlib}/Apache
@@ -129,6 +119,7 @@ rm -rf %{buildroot}
 * Tue Sep 04 2012 Petr Pisar <ppisar at redhat.com> - 0.77-1
 - 0.77 bump
 - Specify all dependencies
+- Modernize spec file
 
 * Mon Jan 16 2012 Petr Pisar <ppisar at redhat.com> - 0.76-3
 - Require MODULE_COMPAT because this is Perl package.


More information about the scm-commits mailing list