>From 42ec1dc9a2c06862b24efcf88d51001c8228ce32 Mon Sep 17 00:00:00 2001
From: Lionel Cons <lionel.c...@cern.ch>
Date: Thu, 3 Dec 2015 10:44:00 +0100
Subject: Spec file cleanup

---
 perl-Authen-Credential.spec | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/perl-Authen-Credential.spec b/perl-Authen-Credential.spec
index 7191d0f..16f7c31 100644
--- a/perl-Authen-Credential.spec
+++ b/perl-Authen-Credential.spec
@@ -1,11 +1,14 @@
-Name:           perl-Authen-Credential
+%global cpan_name Authen-Credential
+
+Name:           perl-%{cpan_name}
 Version:        1.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Abstraction of a credential
 License:        GPL+ or Artistic
 Group:          Development/Libraries
-URL:            http://search.cpan.org/dist/Authen-Credential/
-Source0:        
http://search.cpan.org/CPAN/authors/id/L/LC/LCONS/Authen-Credential-%{version}.tar.gz
+URL:            http://search.cpan.org/dist/%{cpan_name}/
+Source0:        
http://search.cpan.org/CPAN/authors/id/L/LC/LCONS/%{cpan_name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -25,8 +28,8 @@ BuildRequires:  perl(Test::More)
 BuildRequires:  perl(Pod::Coverage) >= 0.18
 BuildRequires:  perl(Test::Pod) >= 1.22
 BuildRequires:  perl(Test::Pod::Coverage) >= 1.08
-Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 Requires:       perl(No::Worries::Die) >= 1.1
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
 
 # Remove under-specified dependencies
 %global __requires_exclude 
%{?__requires_exclude:%{__requires_exclude}|}^perl\\(No::Worries::Die\\)$
@@ -42,26 +45,35 @@ be stored in structured configuration files or using JSON) 
and
 well known targets.
 
 %prep
-%setup -q -n Authen-Credential-%{version}
+%setup -q -n %{cpan_name}-%{version}
 
 %build
-perl Makefile.PL INSTALLDIRS=vendor
+%{__perl} Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
+%check
+make test
+
 %install
+rm -fr $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 -depth -type d -exec rmdir {} 2>/dev/null \;
 %{_fixperms} $RPM_BUILD_ROOT/*
 
-%check
-make test
+%clean
+rm -fr $RPM_BUILD_ROOT
 
 %files
-%doc Changes README VERSION
+%defattr(-,root,root,-)
+%doc Changes README
 %{perl_vendorlib}/*
 %{_mandir}/man3/*
 
 %changelog
+* Thu Dec  3 2015 Lionel Cons <lionel.c...@cern.ch> 1.1-2
+- Spec file cleanup.
+
 * Fri Sep 11 2015 Petr Pisar <ppi...@redhat.com> - 1.1-1
 - 1.1 bump
 
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-Authen-Credential.git/commit/?h=el6&id=42ec1dc9a2c06862b24efcf88d51001c8228ce32
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to