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:   15-Nov-2006 20:48:32
  Branch: HEAD                             Handle: 2006111519483200

  Modified files:
    openpkg-src/spread      spread.spec

  Log:
    upgrade contained Perl extension to latest one from CPAN and cleanup
    packaging

  Summary:
    Revision    Changes     Path
    1.45        +45 -10     openpkg-src/spread/spread.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/spread/spread.spec
  ============================================================================
  $ cvs diff -u -r1.44 -r1.45 spread.spec
  --- openpkg-src/spread/spread.spec    13 Oct 2006 17:34:22 -0000      1.44
  +++ openpkg-src/spread/spread.spec    15 Nov 2006 19:48:32 -0000      1.45
  @@ -22,6 +22,10 @@
   ##  SUCH DAMAGE.
   ##
   
  +#   package version
  +%define       V_spread        3.17.3
  +%define       V_spread_perl   3.17.3_108
  +
   #   package information
   Name:         spread
   Summary:      Group Communication Toolkit
  @@ -32,15 +36,16 @@
   Class:        PLUS
   Group:        RPC
   License:      BSD-style
  -Version:      3.17.3
  -Release:      20061013
  +Version:      %{V_spread}
  +Release:      20061115
   
   #   package options
   %option       with_perl   no
   
   #   list of sources
  -Source0:      http://www.spread.org/download/::/spread-src-%{version}.tar.gz
  -Source1:      rc.spread
  +Source0:      http://www.spread.org/download/::/spread-src-%{V_spread}.tar.gz
  +Source1:      
http://www.cpan.org/authors/id/J/JE/JESUS/Spread-%{V_spread_perl}.tar.gz
  +Source2:      rc.spread
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -63,13 +68,26 @@
   
   %track
       prog spread = {
  -        version   = %{version}
  +        version   = %{V_spread}
           url       = http://www.spread.org/download.html
           regex     = spread-src-(\d+(.\d+)+)\.tar\.gz
       }
  +    prog spread:perl = {
  +        version   = %{V_spread_perl}
  +        url       = http://www.cpan.org/authors/id/J/JE/JESUS/
  +        regex     = Spread-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q -n spread-src-%{version}
  +
  +    #   upgrade Perl extension
  +%if "%{with_perl}" == "yes"
  +    %setup -q -n spread-src-%{version} -D -T -a 1
  +    mv Spread-%{V_spread_perl}/* perl/Spread/
  +%endif
  +
  +    #   adjust paths in toolkit
       %{l_shtool} subst \
           -e "s;^[# \t]*\(DaemonUser\).*;\1 = %{l_rusr};" \
           -e "s;^[# \t]*\(DaemonGroup\).*;\1 = %{l_mgrp};" \
  @@ -85,7 +103,10 @@
           log.c
   
   %build
  -    %{l_shtool} subst -e "s;if test ! -d \$piddir;if false;" configure
  +    #   configure toolkit
  +    %{l_shtool} subst \
  +        -e "s;if test ! -d \$piddir;if false;" \
  +        configure
       %{l_shtool} subst \
           -e "s;/usr/bin/perl;%{l_prefix}/bin/perl;g" \
           buildtools/fixpaths \
  @@ -99,34 +120,48 @@
           --with-pid-dir=%{l_prefix}/var/spread \
           --with-mantype=man \
           --disable-shared
  +
  +    #   build toolkit
       %{l_make} %{l_mflags -O}
  +
  +    #   build Perl extension
   %if "%{with_perl}" == "yes"
       %{l_prefix}/bin/perl-openpkg -d perl/Spread prepare configure build
   %endif
   
   %install
       rm -rf $RPM_BUILD_ROOT
  +
  +    #   install Perl extension
   %if "%{with_perl}" == "yes"
       %{l_prefix}/bin/perl-openpkg -d perl/Spread install
       %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
   %else
       >perl-openpkg-files
   %endif
  -    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/spread
  +
  +    #   install toolkit
       %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  +
  +    #   strip down installation
       rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.s[ol]* >/dev/null 2>&1 || true
   
  -    #   install the IP address acl
  +    #   create additional run-time directory
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/spread
  +
  +    #   install the IP address ACL file
       %{l_shtool} install -c -m 644 \
           sample.spread.access_ip \
           $RPM_BUILD_ROOT%{l_prefix}/etc/spread/spread.access_ip
   
  -    #   install the run command file
  +    #   install run command file
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE rc.spread} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
           %{l_files_std} `cat perl-openpkg-files` \
           "%config %{l_prefix}/etc/spread/*"
  @@ -147,7 +182,7 @@
       if [ $1 -eq 1 ]; then
           #   install bogus log file, to avoid first time run failure
           cp /dev/null $RPM_INSTALL_PREFIX/var/spread/spread.log
  -        chmod 0644 $RPM_INSTALL_PREFIX/var/spread/spread.log
  +        chmod 644 $RPM_INSTALL_PREFIX/var/spread/spread.log
           chown %{l_rusr}:%{l_mgrp} $RPM_INSTALL_PREFIX/var/spread/spread.log
       fi
       if [ $1 -eq 2 ]; then
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to