diff --git a/check_postgres.changes b/check_postgres.changes index 0e17af7..aafdf51 100644 --- a/check_postgres.changes +++ b/check_postgres.changes @@ -3,4 +3,4 @@ Mon Feb 21 08:21:03 UTC 2011 - lars@linux-schulserver.de - initial version 2.16.0 - disabled make test as this breaks the build currently - +- create a special nagios package containing just the symlinks diff --git a/check_postgres.spec b/check_postgres.spec index 52d2d85..135940f 100644 --- a/check_postgres.spec +++ b/check_postgres.spec @@ -55,6 +55,16 @@ Author: ------- Greg Sabino Mullane + +%package -n nagios-plugins-postgres +Summary: Postgres monitoring script using check_postgres.pl +Group: System/Monitoring +PreReq: %{name} = %{version} + +%description -n nagios-plugins-postgres +This package contains the symlinks to execute special checks via the standard +Nagios plugins way. + %prep %setup -q @@ -85,6 +95,17 @@ mv %{buildroot}%perl_vendorlib/check_postgres.pl %{buildroot}%{_bindir}/ # remove perllocal.pod file %{__rm} -rf $RPM_BUILD_ROOT%perl_archlib %perl_gen_filelist +# create symlinks for nagios-plugins-postgres package +mkdir -p %{buildroot}%{libexecdir} +pushd %{buildroot}%{libexecdir} +%{buildroot}%{_bindir}/check_postgres.pl --symlinks +# fix symlinks, as they point to the buildroot +for link in *; do + rm $link + ln -s %{_bindir}/check_postgres.pl $link +done +popd + %clean rm -rf %buildroot @@ -92,8 +113,14 @@ rm -rf %buildroot %files -f %{name}.files %defattr(-,root,root) %doc MANIFEST README TODO + +%files -n nagios-plugins-postgres +%defattr(-,root,root) # avoid build dependecy of nagios - own the dirs -#%dir %_prefix/lib/nagios -#%dir %libexecdir +%dir %_prefix/lib/nagios +%dir %libexecdir +%libexecdir/* + + %changelog