File perl-Sysadm-Install.spec of Package perl-Sysadm-Install

#
# spec file for package perl-Sysadm-Install (Version 0.35)
#
# Copyright (c) 2010 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

%bcond_with opt

Name:           perl-Sysadm-Install
%define cpan_name Sysadm-Install
Summary:        Typical installation tasks for system administrators
Version:        0.35
Release:        2
License:        GPL+ or Artisitic
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Sysadm-Install/
#Source:         http://www.cpan.org/modules/by-module/Sysadm/Sysadm-Install-%{version}.tar.gz
Source:         %{cpan_name}-%{version}.tar.bz2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Cwd)
BuildRequires:  perl(File::Basename)
BuildRequires:  perl(File::Copy)
BuildRequires:  perl(File::Path)
BuildRequires:  perl(File::Temp) >= 0.16
BuildRequires:  perl(Log::Log4perl) >= 1.28
BuildRequires:  perl(LWP::Simple)
BuildRequires:  perl(Term::ReadKey)
%if %{with opt}
BuildRequires:  perl(Expect)
%endif
Requires:       perl(Cwd)
Requires:       perl(File::Basename)
Requires:       perl(File::Copy)
Requires:       perl(File::Path)
Requires:       perl(File::Temp) >= 0.16
Requires:       perl(Log::Log4perl) >= 1.28
Requires:       perl(LWP::Simple)
Requires:       perl(Term::ReadKey)
#
Recommends:     perl(Expect)

%description
Have you ever wished for your installation shell scripts to run
reproducably, without much programming fuzz, and even with optional logging
enabled? Then give up shell programming, use Perl.

"Sysadm::Install" executes shell-like commands performing typical
installation tasks: Copying files, extracting tarballs, calling "make".
It has a "fail once and die" policy, meticulously checking the result of
every operation and calling "die()" immeditatly if anything fails.

Authors:
--------
    Mike Schilli <m@perlmeister.com>

%prep
%setup -q -n %{cpan_name}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README

%changelog
openSUSE Build Service is sponsored by