File cpanspec.spec of Package cpanspec
#
# spec file for package cpanspec
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: cpanspec
Version: 1.78
Release: 4
%define tar_version 1.78
Summary: Generate a SUSE spec file for a CPAN module
License: GPL+ or Artistic
Group: Development/Languages/Perl
Url: http://sourceforge.net/projects/cpanspec/
Source0: http://www.cpan.org/modules/by-module/cpanspec/cpanspec-%{tar_version}.tar.gz
Patch0: cpanspec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: perl(Archive::Zip)
BuildRequires: perl(File::Basename)
BuildRequires: perl(FileHandle)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(locale)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(Parse::CPAN::Packages)
BuildRequires: perl(POSIX)
BuildRequires: perl(Text::Autoformat)
BuildRequires: perl(YAML)
Requires: perl(Archive::Zip)
Requires: perl(File::Basename)
Requires: perl(FileHandle)
Requires: perl(Getopt::Long)
Recommends: perl(IO::Uncompress::Bunzip2)
Requires: perl(locale)
Requires: perl(LWP::UserAgent)
Requires: perl(Parse::CPAN::Packages)
Requires: perl(Pod::POM)
Requires: perl(POSIX)
Requires: perl(Text::Autoformat)
Requires: perl(YAML)
%description
cpanspec will generate a SUSE spec file to build a rpm from a CPAN-style Perl
module distribution.
%prep
%setup -q -n cpanspec-%{tar_version}
%patch0 -p1
%build
%{__perl} Build.PL installdirs=vendor
./Build
%check
./Build test
%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Artistic BUGS Changes COPYING TODO
%_bindir/cpanget
%_bindir/cpanspec
%_mandir/man1/cpanspec.1.gz
%changelog