]> git.pld-linux.org Git - packages/nagios.git/blobdiff - nagios.spec
- cleanups
[packages/nagios.git] / nagios.spec
index 53ccb913c38b5ff2b3ef5c55169889969a337514..0dc0a58390fb0ca08c56f9f7a0622718a951654e 100644 (file)
@@ -8,19 +8,19 @@ Summary:      Host/service/network monitoring program
 Summary(pl.UTF-8):     Program do monitorowania serwerów/usług/sieci
 Summary(pt_BR.UTF-8):  Programa para monitoração de máquinas e serviços
 Name:          nagios
-Version:       3.1.2
-Release:       7
+Version:       3.2.0
+Release:       6
 License:       GPL v2
 Group:         Networking
 Source0:       http://dl.sourceforge.net/nagios/%{name}-%{version}.tar.gz
-# Source0-md5: f3c60428cba14264c709749182b8d93e
+# Source0-md5: 3566167cc60ddeaad34e7d2e26ed4a58
 Source1:       %{name}-apache.conf
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
 Source4:       http://www.nagios.org/images/favicon.ico
 # Source4-md5: 1c4201c7da53d6c7e48251d3a9680449
-Source5:       %{name}-config-20090803.tar.bz2
-# Source5-md5: e4c42ebadecef32cfe14cc3085f5bae4
+Source5:       %{name}-config-20090914.tar.bz2
+# Source5-md5: 605f1cd28c00db961dad6f529d849f16
 Source6:       %{name}-lighttpd.conf
 Patch0:                %{name}-resources.patch
 Patch1:                %{name}-iconv-in-libc.patch
@@ -38,13 +38,11 @@ BuildRequires:      libpng-devel
 %endif
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
-BuildRequires: tar >= 1:1.15.1
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      /bin/mail
-Requires:      nagios-notify >= 0.13
 Requires:      rc-scripts
 Requires:      sh-utils
+Suggests:      nagios-notify >= 0.13
 Provides:      nagios-core
 Obsoletes:     netsaint
 Conflicts:     iputils-ping < 1:ss020124
@@ -106,8 +104,8 @@ Requires(pre):      /usr/sbin/groupadd
 Requires(pre): /usr/sbin/groupmod
 Requires(pre): /usr/sbin/useradd
 Requires(pre): /usr/sbin/usermod
-Provides:      group(nagios)
 Provides:      group(nagcmd)
+Provides:      group(nagios)
 Provides:      user(nagios)
 
 %description common
@@ -182,11 +180,14 @@ aplicativos para o Nagios.
 %patch4 -p1
 %patch5 -p1
 
-find -name .cvsignore | xargs rm
+find -name .cvsignore -o -name .gitignore | xargs rm
 
 mv nagios-config-*/objects/*.cfg sample-config/template-object
 mv nagios-config-*/*.cfg sample-config
 
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+
 sed -i -e '
        s,".*/var/rw/nagios.cmd,"%{_localstatedir}/rw/nagios.cmd,
        s,".*/libexec/eventhandlers,"%{_libdir}/%{name}/eventhandlers,
@@ -210,7 +211,7 @@ cp -f /usr/share/automake/config.sub .
 %{__aclocal}
 %{__autoconf}
 %configure \
-       --datarootdir=%{_datadir} \
+       CFLAGS="%{rpmcflags} %{rpmcppflags}" \
        --with-nagios-user=%{name} \
        --with-nagios-grp=%{name} \
        --with-command-user=%{name} \
@@ -237,7 +238,7 @@ install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_webapps}/%{_webapp}}
 %endif
 
 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
-install include/*.h    $RPM_BUILD_ROOT%{_includedir}/%{name}
+cp -a include/*.h      $RPM_BUILD_ROOT%{_includedir}/%{name}
 
 %{__make} install-unstripped \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -245,9 +246,9 @@ install include/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}
        INIT_OPTS="" \
        COMMAND_OPTS=""
 
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}
 
 # install templated configuration files
 for a in nagios.cfg resource.cfg commands.cfg contactgroups.cfg contacts.cfg templates.cfg timeperiods.cfg; do
@@ -255,9 +256,9 @@ for a in nagios.cfg resource.cfg commands.cfg contactgroups.cfg contacts.cfg tem
 done
 
 # webserver files
-install apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
-install apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
-install lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
+cp -a apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
+cp -a apache.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
+cp -a lighttpd.conf $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf
 cp -a sample-config/cgi.cfg $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
 > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/passwd
 echo 'nagios:' > $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/group
@@ -362,8 +363,8 @@ done
 %files
 %defattr(644,root,root,755)
 %doc Changelog README* UPGRADING INSTALLING LICENSE
-%attr(640,root,nagcmd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nagios.cfg
-%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/[!n]*.cfg
+%attr(750,root,nagios) %dir %{_sysconfdir}/objects
+%attr(640,root,nagios) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.cfg
 
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
@@ -391,8 +392,7 @@ done
 %files common
 %defattr(644,root,root,755)
 %attr(750,root,nagcmd) %dir %{_sysconfdir}
-%attr(2750,root,nagios) %dir %{_sysconfdir}/plugins
-%attr(2750,root,nagios) %dir %{_sysconfdir}/objects
+%attr(750,root,nagios) %dir %{_sysconfdir}/plugins
 %dir %{_libdir}/%{name}
 %dir %{_libdir}/%{name}/plugins
 %dir %{_libdir}/%{name}/eventhandlers
This page took 0.055165 seconds and 4 git commands to generate.