Files
perl-URL-Checkout/perl-URL-Checkout.spec

100 lines
2.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-perl-URL-Checkout (Version 1.02)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-URL-Checkout
Version: 1.02
Release: 0%{?dist}
License: GPLv2+ or Artistic
Group: Development/Libraries/Perl
Summary: Get one or multiple files from a remote location
Source: http://search.cpan.org/CPAN/authors/id/J/JN/JNW/URL-Checkout-%{version}.tar.gz
Url: http://search.cpan.org/dist/URL-Checkout
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: perl = %(eval "`%{__perl} -V:version`"; echo $version)
BuildArch: noarch
BuildRequires: perl(Test::More) perl(String::ShellQuote)
BuildRequires: perl(Cwd) perl(File::Path) perl(File::Temp) perl(Carp)
Requires: perl(String::ShellQuote)
Requires: perl(Cwd) perl(File::Path) perl(File::Temp) perl(Carp)
%description
Retrieve contents from a URL, no matter if the URL specifies a simple file via
ftp or http, or a Repository of one of the well known VCS systems, cvs, svn,
git, hg, Unlike LWP, this module makes no attempts to be perlish. We liberally
call shell commands to do the real work. The author especially likes to call
wget.
%prep
%setup -q -n URL-Checkout-%{version}
%build
if [ -f Build.PL ]; then
%{__perl} Build.PL --installdirs vendor
else
%{__perl} Makefile.PL INSTALLDIRS=vendor
fi
if [ -f Build.PL ]; then
./Build build flags=%{?_smp_mflags}
else
%{__make} %{?_smp_mflags}
fi
%install
if [ -f Build.PL ]; then
./Build pure_install --destdir %{buildroot}
else
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
fi
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
find %{buildroot}/%{perl_vendorlib} -type d > %{_tmppath}/file.list.%{name}
find %{buildroot} -type f >> %{_tmppath}/file.list.%{name}
%{__sed} -i -e 's|^%{buildroot}||g' %{_tmppath}/file.list.%{name}
%{__sed} -i -r -e 's|(/share/man/man[1-9]/.*\.[1-9]pm)$|\1.gz|;
s|(/share/man/man[1-9]/.*)(\.[1-9])$|\1\2.gz|' %{_tmppath}/file.list.%{name}
mkdir -p $RPM_BUILD_ROOT/usr/bin
cp url_co.pl $RPM_BUILD_ROOT/usr/bin/url_co
%{_fixperms} %{buildroot}/*
%check
if [ -f Build.PL ]; then
./Build test
else
%{__make} test
fi
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT
%files -f %{_tmppath}/file.list.%{name}
%defattr(-,root,root,-)
%doc Changes
/usr/bin/*
%changelog
* Thu Aug 05 2010 %{packager}
- initial SUSE packaging
- generated with cpan2dist (CPANPLUS::Dist::SUSE version 0.0.8)