Name: icli Version: 0.48 %if %{_vendor} == "suse" Release: 01.%{_distro} %else Release: 1%{?dist} %endif Summary: Nagios/Icinga commandline interface Group: System/Monitoring License: GPL URL: http://derf.homelinux.org/ Source0: %{name}-%{version}.tgz BuildRequires: perl-Module-Build perl-Test-Command perl-Test-Compile perl-autodie BuildRequires: perl-Test-Pod perl-Term-Size perl-autodie perl-List-MoreUtils Requires: perl-Term-Size Requires: icinga %if %{_vendor} == "suse" BuildRoot: %{_tmppath}/%{name}-%{version}-build %endif %define debug_package %{nil} %define idir %{_datadir}/%{name} %description icli is a command line interface to Icinga. By default it lists all services and their states. Note that when supplying custom config and status file paths, icli also works with Nagios. 100% compatibility is not guaranteed, however. icli only works when executed on the host running the Icinga daemon. To use it on another host, shell aliases (like alias icli='ssh $icingahost icli') or similar are recommended. You can narrow down the list of services you want displayed either using filters (like icli -z!o), the -h/-s arguments (icli -h aneurysm -s Libraries,Websites) or commandline args (icli aneurysm/{Libraries,Websites} with shell expansion). %prep %setup -q -n %{name}-%{version} %build %if %{_vendor} == "suse" %{__perl} Build.PL --destdir %{buildroot} --install_base %{_prefix} \ --installdirs vendor --icli-object-file=/var/lib/icinga/objects.cache \ --icli-status-file=/var/lib/icinga/status.dat --icli-command-file=/var/spool/icinga/icinga.cmd %else %if %{_vendor} == "redhat" %{__perl} Build.PL --destdir %{buildroot} --install_base %{_prefix} \ --installdirs vendor --icli-object-file=/var/spool/icinga/objects.cache \ --icli-status-file=/var/spool/icinga/status.dat --icli-command-file=/var/spool/icinga/cmd/icinga.cmd %else %{__perl} Build.PL --destdir %{buildroot} --install_base %{_prefix} --installdirs vendor %endif %endif ./Build %install ./Build install %{__install} -d %{buildroot}%{_mandir} # the installer installs the module into /usr/lib/perl5 directly, but this is not found, when using icli: %{__install} -d %{buildroot}%{perl_vendorlib} mv %{buildroot}%{_prefix}/lib/perl5/App %{buildroot}%{perl_vendorlib} mv %{buildroot}%{_prefix}/man/man1 %{buildroot}%{_mandir} mv %{buildroot}%{_prefix}/man/man3 %{buildroot}%{_mandir} rmdir %{buildroot}%{_prefix}/man rm -rf %{buildroot}%{_prefix}/lib/perl5/x86_64-linux-thread-multi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}/* [ "${RPM_BUILD_DIR}" != "/" ] && rm -rf ${RPM_BUILD_DIR}/* %files %defattr(0644,root,root,0755) %doc Changelog COPYING README %attr(0755,icinga,icinga) %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.gz %{_mandir}/man3/App::Icli.3pm.gz %{_mandir}/man3/App::Icli::ConfigData.3pm.gz %{perl_vendorlib}/App/Icli.pm %{perl_vendorlib}/App/Icli/ConfigData.pm %changelog * Wed Jun 18 2014 - Upgraded to 0.48 release * Mon Jan 13 2014 - Upgraded to git version of package. * Sat Jan 11 2014 - New package.