LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dba-centreon-engine-137.spec of Package dba-centreon-engine-137 (Project home:csbuild:Monitoring)

%define real_name centreon-engine
%define version 1.3.7
%define vers 137
%define release 1
%define prefix          /DBA/%{real_name}/%{version}
%define maketest        0

Name:           dba-%{real_name}-%{vers}
Summary:	Centreon Engine is an network monitoring application version 1.3.7
Version:	%{version}
Release:	%{release}
Source:		http://download.centreon.com/%{real_name}/%{real_name}-%{version}.tar.gz
Source1:        %{real_name}-rpmlintrc
Patch1:		remove_chown.patch
License:        GPL-2.0+
Group:          System/Monitoring
Url:		http://www.centreon.com
BuildRoot:	%{_tmppath}/%{real_name}-%{version}-%{release}-buildroot

%if 0%{?suse_version} >= 1100
BuildRequires:  -post-build-checks

BuildRequires:  gcc-c++ cmake >= 2.8 make
BuildRequires:  gsoap-devel
BuildRequires:  dba-centreon-clib-120
BuildRequires:  xerces-c-devel

%if 0%{?centos_version} >= 600 && 0%{?centos_version} <= 699 || 0%{?rhel_version} >= 600 && 0%{?rhel_version} <= 699
BuildRequires:  qt47-devel
#!BuildIgnore:  qt4-devel
Requires:       qt47
BuildRequires:  qt-devel

Centreon Engine is an Open Source system and network monitoring application. It watches hosts and services
that you specify, alerting you when things go bad and when they get better.

Some of the many features of Centreon Engine include:
- monitoring of network services (SMTP, IMAP, HTTP, NNTP, PING ...).
- monitoring of host resources (processor load, disk usage ...).
- simple plugin design that allows users to easily develop their own service checks.
- parallelized service checks.
- ability to define network host hierarchy using .parent. hosts, allowing detection of and distinction between hosts that are down and those that are unreachable.
- contact notifications when service or host problems occur and get resolved (via email, page, or user-defined method).
- ability to define event handlers to be run during service or host events for proactive problem resolution.
- automatic log file rotation.
- support for implementing redundant monitoring hosts.

%setup -q -n %{real_name}-%{version}
%patch1 -p0

cd build
cmake \
     -DWITH_PREFIX=%{prefix} \
     -DWITH_USER=abuild \
     -DWITH_GROUP=abuild \
     -DWITH_CENTREON_CLIB_INCLUDE_DIR=/DBA/centreon-clib/1.2.0/include \
     -DWITH_CENTREON_CLIB_LIBRARY_DIR=/DBA/centreon-clib/1.2.0/lib \

#    -DWITH_USER=centreon-engine \
#    -DWITH_GROUP=centreon-engine \


%if %maketest
%{__make} check

%if 0%{?suse_version:1}
# disable rpath checking
export NO_BRP_CHECK_RPATH=true

# not working in suse buildservice
# cd build
# %{__make} DESTDIR=%{buildroot} install
# make %{?_smp_mflags} DESTDIR=%{buildroot} install

%{__mkdir_p} %{buildroot}%{prefix}/include/centreon-engine
%{__cp} -r inc/* %{buildroot}%{prefix}/include/centreon-engine

%{__mkdir_p} %{buildroot}%{prefix}/etc
%{__cp} -r conf/* %{buildroot}%{prefix}/etc

%{__mkdir_p} %{buildroot}%{prefix}/lib/centreon-engine/
%{__install} -m 0755 build/modules/external_commands/externalcmd.so %{buildroot}%{prefix}/lib/centreon-engine/
%{__install} -m 0755 build/modules/webservice/server/webservice.so %{buildroot}%{prefix}/lib/centreon-engine/
%{__mkdir_p} %{buildroot}%{prefix}/lib/centreon-engine/pkgconfig
%{__install} -m 0644 scripts/centengine.pc %{buildroot}%{prefix}/lib/centreon-engine/pkgconfig

%{__mkdir_p} %{buildroot}%{prefix}/bin
%{__install} -m 0755 build/centengine %{buildroot}%{prefix}/bin
%{__install} -m 0755 build/centenginestats %{buildroot}%{prefix}/bin
%{__install} -m 0755 build/modules/webservice/client/centenginews %{buildroot}%{prefix}/bin

# %{__mv} %{buildroot}/etc/init.d/centengine %{buildroot}%{prefix}/etc/centengine.init.d
# %{__mv} %{buildroot}/etc/logrotate.d/centengine %{buildroot}%{prefix}/etc/centengine.logrotate.d

# add empty log and lib dirs
%{__mkdir_p} %{buildroot}%{prefix}/var/lib/centreon
%{__mkdir_p} %{buildroot}%{prefix}/var/log

# %{__rm} -fr %{buildroot}/usr/lib/debug
find %{buildroot} -name "*.cfg.in" -o -name "*.la" | xargs -i rm -vf {}

[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

cd %{prefix}/..
%{__rm} -f 1.latest
%{__ln_s} -f %{version} 1.latest

# add centengine.pc to pkgconfig directory
if [ -d %{_libdir}/pkgconfig ]; then
  cd %{_libdir}/pkgconfig
  if [ -e centengine.pc ]; then
    %{__rm} -f centengine.pc
  %{__ln_s} -f %{prefix}/lib/centreon-engine/pkgconfig/centengine.pc .

%dir %{prefix}

* Thu Feb 20 2014 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version