OpenPKG CVS Repository
  http://www.openpkg.org/cvsweb/cvsweb.cgi
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re, openpkg-web, openpkg-src Date:   19-Jul-2002 12:16:32
  Branch: HEAD                             Handle: 2002071911163001

  Added files:
    openpkg-re/vcheck       vc.perforce
    openpkg-src/perforce    perforce.spec rc.perforce
  Modified files:
    openpkg-web             news.txt

  Log:
    new package: perforce 2002.1 (The Perforce SCM System)

  Summary:
    Revision    Changes     Path
    1.1         +9  -0      openpkg-re/vcheck/vc.perforce
    1.1         +140 -0     openpkg-src/perforce/perforce.spec
    1.1         +33 -0      openpkg-src/perforce/rc.perforce
    1.994       +1  -0      openpkg-web/news.txt
  ____________________________________________________________________________

  Index: openpkg-re/vcheck/vc.perforce
  ============================================================
  $ cvs update -p -r1.1 vc.perforce
  config = {
  }
  
  prog perforce = {
    version   = r02.1
    url       = ftp://ftp.perforce.com/perforce/
    regex     = (r0[2-9].\d)
  }
  
  Index: openpkg-src/perforce/perforce.spec
  ============================================================
  $ cvs update -p -r1.1 perforce.spec
  ##
  ##  perforce.spec -- OpenPKG RPM Specification
  ##  Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  ##  Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  ##  Copyright (c) 2000-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
  ##
  ##  Permission to use, copy, modify, and distribute this software for
  ##  any purpose with or without fee is hereby granted, provided that
  ##  the above copyright notice and this permission notice appear in all
  ##  copies.
  ##
  ##  THIS SOFTWARE IS PROVIDED AS IS'' AND ANY EXPRESSED OR IMPLIED
  ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  ##  SUCH DAMAGE.
  ##
  
  #   package information
  Name:         perforce
  Summary:      The Perforce SCM System
  URL:          http://www.perforce.com/
  Vendor:       Perforce Software
  Packager:     The OpenPKG Project
  Distribution: OpenPKG [EXP]
  Group:        SCM
  License:      Commercial
  Version:      2002.1
  Release:      20020719
  
  #   list of sources
  Source0:      perforce-%{version}.tar.bz2
  Source1:      ftp://ftp.perforce.com/perforce/utils/c4/c4.tar.gz
  Source2:      http://www.perforce.com/perforce/doc.021/man/p4.1
  Source3:      http://www.perforce.com/perforce/doc.021/man/p4d.1
  Source4:      http://www.perforce.com/perforce/doc.021/manuals/p4guide/p4guide.pdf
  Source5:      http://www.perforce.com/perforce/doc.021/manuals/p4sag/p4sag.pdf
  Source6:      http://www.perforce.com/perforce/doc.021/manuals/cmdref/cmdref.pdf
  Source7:      http://www.perforce.com/perforce/doc.021/manuals/p4ftp/p4ftp.pdf
  
  #   build information
  Prefix:       %{l_prefix}
  BuildRoot:    %{l_buildroot}
  BuildPreReq:  OpenPKG, openpkg >= 20020206
  PreReq:       OpenPKG, openpkg >= 20020206
  AutoReq:      no
  AutoReqProv:  no
  
  %description
      Perforce (P4) is a commercial (but freely available and useable
      for Open Source projects) Software Configuration Management (SCM)
      system. It is superior to Concurrent Versions System (CVS) and
      even (with the help of an existing CVS to P4 repository conversion
      tool) can operate on the RCS files of CVS. This is the unlicensed
      demo version. It has full time-unlimited functionality, but is
      restricted to 2 users. For a real license one has to contact
      <[EMAIL PROTECTED]>.
  
  %prep
      %setup0 -q -c
      %setup1 -q -T -D -a 1
  
  %build
      ( cd c4-1.6
        %{l_make} %{l_mflags} \
            CC="%{l_cc}" CFLAGS="%{l_cflags -O}"
      )
  
  %install
      rm -rf $RPM_BUILD_ROOT
      %{l_shtool} mkdir -f -p -m 755 \
          $RPM_BUILD_ROOT%{l_prefix}/bin \
          $RPM_BUILD_ROOT%{l_prefix}/sbin \
          $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
          $RPM_BUILD_ROOT%{l_prefix}/libexec/perforce \
          $RPM_BUILD_ROOT%{l_prefix}/share/perforce \
          $RPM_BUILD_ROOT%{l_prefix}/var/perforce/p4d.depot
      subdir="perforce-2002.1/bin"
      case "%{l_target}" in
          *-freebsd* ) subdir="$subdir.freebsd4"   ;;
          *-linux*   ) subdir="$subdir.linux22x86" ;;
          *-solaris* ) subdir="$subdir.solaris26"  ;;
          * ) echo "platform %{l_target} not supported" 1>&2; exit 1 ;;
      esac
      ( cd $subdir
        %{l_shtool} install -c -m 755 \
            p4 $RPM_BUILD_ROOT%{l_prefix}/bin/
        %{l_shtool} install -c -m 755 \
            p4d p4web p4ftpd $RPM_BUILD_ROOT%{l_prefix}/sbin/
        %{l_shtool} install -c -m 644 \
            %{SOURCE p4.1} %{SOURCE p4d.1} $RPM_BUILD_ROOT%{l_prefix}/man/man1/
        %{l_shtool} install -c -m 644 \
            %{SOURCE p4guide.pdf} %{SOURCE p4sag.pdf} \
            %{SOURCE cmdref.pdf} %{SOURCE p4ftp.pdf} \
            $RPM_BUILD_ROOT%{l_prefix}/share/perforce/
      )
      ( cd c4-1.6
        %{l_shtool} install -c -m 755 \
            c4 $RPM_BUILD_ROOT%{l_prefix}/bin/
        %{l_shtool} install -c -m 644 \
            c4-1.6/c4.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
      )
      %{l_shtool} install -c -m 755 \
          -e 's;@l_prefix@;%{l_prefix};g' \
          -e 's;@l_rusr@;%{l_rusr};g' \
          -e 's;@l_rgrp@;%{l_rgrp};g' \
          %{SOURCE rc.perforce} \
          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
      %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
          %{l_files_std} \
          '%dir %attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/perforce' \
          '%dir %attr(700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/perforce/p4d.depot'
  
  %files -f files
  
  %clean
      rm -rf $RPM_BUILD_ROOT
  
  %post
      if [ ".$1" = .1 ]; then
          $RPM_INSTALL_PREFIX/etc/rc perforce start
          sleep 1
          P4PORT=`$RPM_INSTALL_PREFIX/etc/rc -q perforce_port`
          export P4PORT
          ( echo "Protections:"
            echo "    read  user *         *  //..."
            echo "    write user *         *  //..."
            echo "    super user %{l_rusr} *  //..."
          ) | su %{l_rusr} -c "$RPM_INSTALL_PREFIX/bin/p4 protect -i" >/dev/null 2>&1
          $RPM_INSTALL_PREFIX/etc/rc perforce stop
      fi
  
  Index: openpkg-src/perforce/rc.perforce
  ============================================================
  $ cvs update -p -r1.1 rc.perforce
  #!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
  ##
  ##  rc.perforce -- Run-Commands for P4 Daemon
  ##
  
  %config
      perforce_enable="yes"
      perforce_port="localhost:1666"
      perforce_rootdir="@l_prefix@/var/perforce/p4d.depot"
      perforce_journal="@l_prefix@/var/perforce/p4d.journal"
      perforce_logfile="@l_prefix@/var/perforce/p4d.log"
  
  %start -p 100 -u root
      if opServiceEnabled perforce; then
          cmd="@l_prefix@/sbin/p4d" 
          cmd="$cmd -q -d -z"
          cmd="$cmd -p ${perforce_port}"
          cmd="$cmd -r ${perforce_rootdir}"
          cmd="$cmd -J ${perforce_journal}"
          cmd="$cmd -L ${perforce_logfile}"
          umask 077
          su @l_rusr@ -c "nohup $cmd </dev/null >/dev/null 2>&1 &"
      fi
  
  %stop -p 200 -u root
      if opServiceEnabled perforce; then
          cmd="@l_prefix@/bin/p4"
          cmd="$cmd -p ${perforce_port}"
          cmd="$cmd admin stop"
          umask 077
          su @l_rusr@ -c "$cmd"
      fi
  
  Index: openpkg-web/news.txt
  ============================================================
  $ cvs diff -u -r1.993 -r1.994 news.txt
  --- openpkg-web/news.txt      19 Jul 2002 08:05:21 -0000      1.993
  +++ openpkg-web/news.txt      19 Jul 2002 10:16:31 -0000      1.994
  @@ -1,3 +1,4 @@
  +19-Jul-2002: New package: P<perforce-2002.1-20020719>
   19-Jul-2002: Upgraded package: P<geoip-0.2.2-20020719>
   19-Jul-2002: Upgraded package: P<perl-www-20020719-20020719>
   19-Jul-2002: Upgraded package: P<perl-dbi-20020719-20020719>
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to