File nrun.spec of Package nrun

#
# spec file for package nrun
#
# Copyright (c) 2013 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/
#


%define perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
%define perl_installdirs %(%{__perl} '-V:install.*' | sed 's/\\(.*\\)=/\\U\\1=/;s/\\;/ /' | tr -d '\\n')
%define cpan_name App-nrun

Name:           nrun
Version:        1.1.2
Release:        0
Summary:        Executes a command or script on multiple target servers synchronously
License:        GPL-3.0+
Group:          Productivity/Clustering/Computing
Url:            https://github.com/tbenk/nrun
Source:         nrun-1.1.2.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  make
BuildRequires:  perl
BuildRequires:  perl(Date::Format)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(YAML)
Requires:       perl = %{perl_version}
Requires:       perl(Date::Format)
Requires:       perl(YAML)

%if 0%{?suse_version}
BuildRequires:  gettext-runtime
BuildRequires:  gettext-tools
%endif

%description
nrun will run a single command or script on a multiple of target servers
synchronously. ncopy will copy a file or directory to multiple target servers.

the underlying remote access mechanism is exchangeable. as of now, ssh, nsh, rsh
and local execution modes are implemented.

the return code and all command output will be logged.

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

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{perl_installdirs}
chmod 644 misc/put_pubkey
%{__make}

%check
%{__make} test

%install
%{__make} DESTDIR=$RPM_BUILD_ROOT install_vendor
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT

%files
%defattr(-,root,root,755)
/usr/bin/ncopy
/usr/bin/nrun
%{perl_vendorlib}/NRun
%{_mandir}/man1/nrun.1.gz
%{_mandir}/man1/ncopy.1.gz
%doc LICENSE README misc/put_pubkey
%config /etc/nrunrc

%changelog
openSUSE Build Service is sponsored by