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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   28-Dec-2004 20:37:37
  Branch: HEAD                             Handle: 2004122819373700

  Added files:
    openpkg-src/php-eaccelerator
                            php-eaccelerator.patch php-eaccelerator.spec

  Log:
    new package: php-eaccelerator 0.9.2a (Zend/PHP Accelerator)

  Summary:
    Revision    Changes     Path
    1.1         +29 -0      openpkg-src/php-eaccelerator/php-eaccelerator.patch
    1.1         +179 -0     openpkg-src/php-eaccelerator/php-eaccelerator.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/php-eaccelerator/php-eaccelerator.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 php-eaccelerator.patch
  --- /dev/null 2004-12-28 20:37:37 +0100
  +++ php-eaccelerator.patch    2004-12-28 20:37:37 +0100
  @@ -0,0 +1,29 @@
  +Index: eaccelerator.ini
  +--- eaccelerator.ini.orig    2004-12-28 00:29:36 +0100
  ++++ eaccelerator.ini 2004-12-28 20:12:46 +0100
  +@@ -1,23 +1,6 @@
  +-[eaccelerator]
  + 
  +-;;;;;;;;;;;;;;;;;;;
  +-; About this file ;
  +-;;;;;;;;;;;;;;;;;;;
  +-;
  +-; eAccelerator is compatible with Zend Optimizer's loader. Zend Optimizer
  +-; must be installed after eAccelerator in php.ini. If you don't use scripts
  +-; encoded with Zend Encoder then we do not recommend you install Zend 
Optimizer
  +-; with eAccelerator.
  +-
  +-
  +-; You must uncomment one (and only one) line from the following to load
  +-; eAccelerator extension.
  +-;extension="eaccelerator.so"
  +-zend_extension="/usr/lib/php4/eaccelerator.so"
  +-;zend_extension_ts="/usr/lib/php4/eaccelerator.so"
  +-;extension="eaccelerator.dll"
  +-;zend_extension_ts="c:\php4\eaccelerator.dll"
  +-;zend_extension="c:\php4\eaccelerator.dll"
  ++; Load the extension module
  ++zend_extension="eaccelerator.so"
  + 
  + ; The amount of shared memory (in megabytes) that eAccelerator will use.
  + ; "0" means OS default. Default value is "0".
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/php-eaccelerator/php-eaccelerator.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 php-eaccelerator.spec
  --- /dev/null 2004-12-28 20:37:37 +0100
  +++ php-eaccelerator.spec     2004-12-28 20:37:37 +0100
  @@ -0,0 +1,179 @@
  +##
  +##  php-eaccelerator.spec -- OpenPKG RPM Specification
  +##  Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  +##  Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
  +##  Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  +##
  +##  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:         php-eaccelerator
  +Summary:      Zend/PHP Accelerator
  +URL:          http://eaccelerator.sourceforge.net/
  +Vendor:       Dmitry Stogov et al.
  +Packager:     The OpenPKG Project
  +Distribution: OpenPKG
  +Class:        EVAL
  +Group:        Language
  +License:      GPL
  +Version:      0.9.2a
  +Release:      20041228
  +
  +#   package options
  +%option       with_apache  yes
  +
  +#   list of sources
  +Source0:      
http://osdn.dl.sourceforge.net/eaccelerator/eaccelerator-%{version}.tar.gz
  +Patch0:       php-eaccelerator.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20040130, libtool, autoconf, automake
  +PreReq:       OpenPKG, openpkg >= 20040130
  +BuildPreReq:  php
  +PreReq:       php
  +%if "%{with_apache}" == "yes"
  +PreReq:       apache
  +%endif
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    eAccelerator is an accelerator, optimizer, encoder and dynamic
  +    content cache for PHP/Zend. It increases performance of PHP scripts
  +    by caching them in compiled state, so that the overhead of compiling
  +    is almost completely eliminated. Also it uses some optimizations to
  +    speed up execution of PHP scripts. eAccelerator typically reduces
  +    server load and increases the speed of PHP code by 1-10 times.
  +    eAccelerator is a fork of TurckMMCache.
  +
  +%track
  +    prog php-eaccelerator = {
  +        version   = %{version}
  +        url       = http://prdownloads.sourceforge.net/eaccelerator/
  +        regex     = eaccelerator-(__VER__)\.tar\.gz
  +    }
  +
  +%prep
  +    %setup -q -n eaccelerator
  +    %patch -p0
  +
  +%build
  +    #   configure module
  +    %{l_prefix}/bin/phpize
  +    CC="%{l_cc}" \
  +    CFLAGS="%{l_cflags -O}" \
  +    CPPFLAGS="%{l_cppflags}" \
  +    LDFLAGS="%{l_ldflags}" \
  +    ./configure \
  +        --prefix=%{l_prefix} \
  +        --with-php-config=%{l_prefix}/bin/php-config \
  +        --enable-eaccelerator \
  +        --with-eaccelerator-crash-detection \
  +        --with-eaccelerator-optimizer \
  +        --with-eaccelerator-encoder \
  +        --with-eaccelerator-loader \
  +        --with-eaccelerator-sessions \
  +        --with-eaccelerator-content-caching \
  +        --with-eaccelerator-disassembler \
  +        --without-eaccelerator-executor \
  +        --enable-shared \
  +        --disable-static
  +
  +    #   build module
  +    %{l_make} %{l_mflags -O}
  +
  +%install
  +    #   create installation hierarchy
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/bin \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/php-eaccelerator \
  +        $RPM_BUILD_ROOT%{l_prefix}/libexec/php-eaccelerator \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/php-eaccelerator
  +
  +    #   install module
  +    %{l_shtool} install -c -m 755 \
  +        .libs/eaccelerator.so 
$RPM_BUILD_ROOT%{l_prefix}/libexec/php-eaccelerator/
  +
  +    #   install PHP configuration
  +    %{l_shtool} install -c -m 755 \
  +        -e 
's;^\(zend_extension="\)\(eaccelerator\.so.*\)$;\1%{l_prefix}/libexec/php-''eaccelerator/\2;'
 \
  +        -e 's;/tmp/eaccelerator;%{l_prefix}/var/php-''eaccelerator;' \
  +        eaccelerator.ini $RPM_BUILD_ROOT%{l_prefix}/etc/php-eaccelerator/
  +
  +    #   install encoder utility
  +    ( echo "#!/bin/sh"
  +      echo "exec %{l_prefix}/bin/php -q 
%{l_prefix}/libexec/php-eaccelerator/encoder.php \"[EMAIL PROTECTED]""
  +    ) >encoder
  +    %{l_shtool} install -c -m 755 \
  +        encoder $RPM_BUILD_ROOT%{l_prefix}/bin/php-encoder
  +    %{l_shtool} install -c -m 644 \
  +        encoder.php $RPM_BUILD_ROOT%{l_prefix}/libexec/php-eaccelerator/
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%attr(1777,%{l_musr},%{l_mgrp}) %{l_prefix}/var/php-eaccelerator'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    if [ ".$1" = .1 ]; then
  +        #   add hook to PHP configuration
  +        phpini="$RPM_INSTALL_PREFIX/etc/php/php.ini"
  +        if [ -f $phpini ]; then
  +            cat $RPM_INSTALL_PREFIX/etc/php-eaccelerator/eaccelerator.ini |\
  +            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                    -a -i "$RPM_INSTALL_PREFIX:php-eaccelerator" -p ";" 
$phpini
  +        fi
  +%if "%{with_apache}" == "yes"
  +        #   add hook to Apache/PHP configuration
  +        phpini="$RPM_INSTALL_PREFIX/etc/apache/php.ini"
  +        if [ -f $phpini ]; then
  +            cat $RPM_INSTALL_PREFIX/etc/php-eaccelerator/eaccelerator.ini |\
  +            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                    -a -i "$RPM_INSTALL_PREFIX:php-eaccelerator" -p ";" 
$phpini
  +        fi
  +%endif
  +    fi
  +
  +%postun
  +    if [ ".$1" = .0 ]; then
  +        #   remove hook from PHP configuration
  +        phpini="$RPM_INSTALL_PREFIX/etc/php/php.ini"
  +        if [ -f $phpini ]; then
  +            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                -r -i "$RPM_INSTALL_PREFIX:php-eaccelerator" -p ";" $phpini
  +        fi
  +%if "%{with_apache}" == "yes"
  +        #   remove hook from Apache/PHP configuration
  +        phpini="$RPM_INSTALL_PREFIX/etc/apache/php.ini"
  +        if [ -f $phpini ]; then
  +            $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
  +                -r -i "$RPM_INSTALL_PREFIX:php-eaccelerator" -p ";" $phpini
  +        fi
  +%endif
  +    fi
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to