Centreon Broker: compile build and create an RPM

Centreon Broker: compile build and create an RPM

Centreon Broker: compile build and create an RPM 150 150 Roderick Derks

Let’s build the Centreon Broker!

 

$> wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm $> rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm $> yum update rrdtool-devel $> yum install rrdtool-devel  $> wget http://www.cmake.org/files/v2.8/cmake-2.8.6-Linux-i386.sh $> sh cmake-2.8.6-Linux-i386.sh $> y $> y $> mv cmake-2.8.6-Linux-i386 /usr/local/cmake $> export PATH="$PATH:/usr/local/cmake/bin"   QT 4.6.3 # rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm # yum erase fontconfig-devel # yum install fontconfig fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator  of  # rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm # yum install fontconfig-devel qt4 qt4-devel qt4-doc qt4-postgresql qt4-odbc qt4-sqlite qt-creator  

Installed:
  fontconfig-devel.i386 0:2.4.1-7.el5               fontconfig-devel.x86_64 0:2.5.93-7
  qt-creator.i686 0:2.0.1-0                         qt-creator.x86_64 0:2.0.1-1
  qt4.i686 0:4.7.1-0                                qt4.x86_64 0:4.7.1-0
  qt4-devel.i686 0:4.7.1-0                          qt4-devel.x86_64 0:4.7.1-0
  qt4-doc.x86_64 0:4.7.1-0                          qt4-odbc.i686 0:4.7.1-0
  qt4-odbc.x86_64 0:4.7.1-0                         qt4-postgresql.i686 0:4.7.1-0
  qt4-postgresql.x86_64 0:4.7.1-0                   qt4-sqlite.i686 0:4.7.1-0
  qt4-sqlite.x86_64 0:4.7.1-0

Dependency Installed:
  alsa-lib.i386 0:1.0.17-1.el5                      alsa-lib.x86_64 0:1.0.17-1.el5
  fontconfig.x86_64 0:2.4.1-7.el5                   fontconfig.i386 0:2.5.93-7
  lcms.i386 0:1.18-0.1.beta1.el5_3.2                lcms.x86_64 0:1.18-0.1.beta1.el5_3.2
  libICE.i386 0:1.0.1-2.1                           libICE-devel.x86_64 0:1.0.1-2.1
  libSM.i386 0:1.0.1-3.1                            libSM-devel.x86_64 0:1.0.1-3.1
  libXcursor-devel.x86_64 0:1.1.7-1.1               libXext-devel.x86_64 0:1.0.1-2.1
  libXft-devel.x86_64 0:2.1.10-1.1                  libXi-devel.x86_64 0:1.0.1-4.el5_4
  libXinerama-devel.x86_64 0:1.0.1-2.1              libXrandr-devel.x86_64 0:1.1.1-3.3
  libXrender-devel.x86_64 0:0.9.1-3.1               libXt-devel.x86_64 0:1.0.2-3.2.el5
  libXxf86vm.i386 0:1.0.1-3.1                       libdrm.i386 0:2.0.2-1.1
  libmng.i386 0:1.0.9-5.1                           libmng.x86_64 0:1.0.9-5.1
  libmng-devel.x86_64 0:1.0.9-5.1                   mesa-libGL.i386 0:6.5.1-7.8.el5
  mesa-libGLU.i386 0:6.5.1-7.8.el5                  mesa-libGLU.x86_64 0:6.5.1-7.8.el5
  mesa-libGLU-devel.x86_64 0:6.5.1-7.8.el5          postgresql-libs.i386 0:8.1.23-1.el5_7.3
  unixODBC.i386 0:2.2.11-7.1

Dependency Updated:
  postgresql-libs.x86_64 0:8.1.23-1.el5_7.3

Complete!
 

# yum list|grep  fontconfig

fontconfig.x86_64                          2.4.1-7.el5                 installed
fontconfig.i386                            2.5.93-7                    installed
fontconfig-devel.i386                      2.4.1-7.el5                 installed
fontconfig-devel.x86_64                    2.5.93-7                    installed
fontconfig.x86_64                          2.5.93-7                    software.freivald.com
 

# rpm -e fontconfig-devel-2.4.1-7.el5.i386 ?????

# PATH=”$PATH:/usr/lib64/qt4/bin”

# cmake -DWITH_PREFIX=/usr/local/centreon-broker

When getting the error message CMAKE_CXX_COMPILER-NOTFOUND

# yum install gcc-c++

# make

# make install

 

Make the RPM package:

# yum -y install rpm-build

# vi CMakeLists.txt

# Package.
set(CPACK_PACKAGE_VENDOR “RICT”)
set(CPACK_PACKAGE_VERSION_MAJOR 2)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH “1”)
set(CPACK_PACKAGE_DESCRIPTION
  “Centreon Broker – handles transfer of nagios output to a database.”)
set(CPACK_PACKAGE_FILE_NAME
  “centreon-broker-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}”)
set(CPACK_PACKAGE_INSTALL_DIRECTORY “Centreon-Broker”)
set(CPACK_PACKAGE_CONTACT “Roderick Derks <info@roderick-ict.nl>”)
if (CPACK_BINARY_DEB)
  set(CPACK_DEBIAN_PACKAGE_SECTION “net”)
endif ()
if (CPACK_BINARY_RPM)
  set(CPACK_RPM_PACKAGE_RELEASE 1)
  set(CPACK_RPM_PACKAGE_LICENSE “AGPLv3+”)
endif ()
include(CPack)

# make package

Roderick Derks

Liefhebber van fietsen, van het oplossen van IT puzzels, en van het delen van informatie om anderen te helpen.

All stories by:Roderick Derks

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message