OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   22-Oct-2006 17:32:39
  Branch: HEAD                             Handle: 2006102216323900

  Modified files:
    openpkg-src/nagios      nagios.spec

  Log:
    add Perl extension modules

  Summary:
    Revision    Changes     Path
    1.70        +46 -7      openpkg-src/nagios/nagios.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/nagios/nagios.spec
  ============================================================================
  $ cvs diff -u -r1.69 -r1.70 nagios.spec
  --- openpkg-src/nagios/nagios.spec    22 Oct 2006 14:51:58 -0000      1.69
  +++ openpkg-src/nagios/nagios.spec    22 Oct 2006 15:32:39 -0000      1.70
  @@ -23,8 +23,11 @@
   ##
   
   #   package versions
  -%define       V_nagios          2.5
  -%define       V_nagios_plugins  1.4.4
  +%define       V_nagios                   2.5
  +%define       V_nagios_plugins           1.4.4
  +%define       V_perl_nagios_plugin       0.14
  +%define       V_perl_nagios_object       0.12
  +%define       V_perl_nagios_cmd          0.05
   
   #   package information
   Name:         nagios
  @@ -46,16 +49,23 @@
   #   list of sources
   Source0:      
http://switch.dl.sourceforge.net/sourceforge/nagios/nagios-%{V_nagios}.tar.gz
   Source1:      
http://switch.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-%{V_nagios_plugins}.tar.gz
  -Source2:      nagios.txt
  -Source3:      rc.nagios
  -Source4:      fsl.nagios
  +Source2:      
http://www.cpan.org/authors/id/T/TO/TONVOON/Nagios-Plugin-%{V_perl_nagios_plugin}.tar.gz
  +Source3:      
http://www.cpan.org/authors/id/T/TO/TOBEYA/Nagios-Object-%{V_perl_nagios_object}.tar.gz
  +Source4:      
http://www.cpan.org/authors/id/T/TO/TOBEYA/Nagios-Cmd-%{V_perl_nagios_cmd}.tar.gz
  +Source5:      nagios.txt
  +Source6:      rc.nagios
  +Source7:      fsl.nagios
   Patch0:       nagios.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20060823, gcc
  -PreReq:       OpenPKG, openpkg >= 20060823, apache, MTA, perl, perl-net
  +PreReq:       OpenPKG, openpkg >= 20060823, apache, MTA
  +%if "%{with_perl}" == "yes"
  +BuildPreReq:  perl, perl-openpkg
  +%endif
  +PreReq:       perl, perl-net, perl-util
   BuildPreReq:  zlib, jpeg, png, gd
   PreReq:       zlib, jpeg, png, gd
   BuildPreReq:  traceroute, openssl, openssh, coreutils, inetutils, fping, 
nail, snmp
  @@ -83,10 +93,28 @@
           url       = http://prdownloads.sourceforge.net/nagiosplug/
           regex     = nagios-plugins-(\d+(\.\d+)+)\.tar\.gz
       }
  +    prog nagios:Nagios-Plugin = {
  +        version   = %{V_perl_nagios_plugin}
  +        url       = http://www.cpan.org/authors/id/T/TO/TONVOON/
  +        regex     = Nagios-Plugin-(__VER__)\.tar\.gz
  +    }
  +    prog nagios:Nagios-Object = {
  +        version   = %{V_perl_nagios_object}
  +        url       = http://www.cpan.org/authors/id/T/TO/TOBEYA/
  +        regex     = Nagios-Object-(__VER__)\.tar\.gz
  +    }
  +    prog nagios:Nagios-Cmd = {
  +        version   = %{V_perl_nagios_cmd}
  +        url       = http://www.cpan.org/authors/id/T/TO/TOBEYA/
  +        regex     = Nagios-Cmd-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q
       %setup -q -T -D -a 1
  +    %setup -q -T -D -a 2
  +    %setup -q -T -D -a 3
  +    %setup -q -T -D -a 4
       %patch -p0
       %{l_shtool} subst \
           -e 's;/usr/local/nagios/var/;%{l_prefix}/var/nagios/log;' \
  @@ -166,6 +194,17 @@
         %{l_make} install DESTDIR="$RPM_BUILD_ROOT"
       ) || exit $?
   
  +%if "%{with_perl}" == "yes"
  +    #   install Perl modules
  +    %{l_prefix}/bin/perl-openpkg prepare
  +    %{l_prefix}/bin/perl-openpkg -d Nagios-Plugin-%{V_perl_nagios_plugin} 
configure build install
  +    %{l_prefix}/bin/perl-openpkg -d Nagios-Object-%{V_perl_nagios_object} 
configure build install
  +    %{l_prefix}/bin/perl-openpkg -d Nagios-Cmd-%{V_perl_nagios_cmd} 
configure build install
  +    %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  +%else
  +    >perl-openpkg-files
  +%endif
  +
       #   post-adjust installation
   %if "%{with_perl}" == "yes"
       mv  $RPM_BUILD_ROOT%{l_prefix}/bin/p1.pl \
  @@ -196,7 +235,7 @@
   
       #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  -        %{l_files_std} \
  +        %{l_files_std} `cat perl-openpkg-files` \
           '%not %dir %{l_prefix}/etc/fsl' \
           '%config %{l_prefix}/etc/fsl/fsl.nagios' \
           '%config %{l_prefix}/etc/nagios/*' \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to