Import package vendor original specs for necessary manipulations.

Thu, 09 Aug 2012 19:06:57 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 09 Aug 2012 19:06:57 +0200
changeset 503
80cfd6ca244d
parent 502
0bdbde429f77
child 504
bf3bcd187edf

Import package vendor original specs for necessary manipulations.

apache-php/apache-php.conf file | annotate | diff | comparison | revisions
apache-php/apache-php.ini file | annotate | diff | comparison | revisions
apache-php/apache-php.patch file | annotate | diff | comparison | revisions
apache-php/apache-php.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/apache-php/apache-php.conf	Thu Aug 09 19:06:57 2012 +0200
     1.3 @@ -0,0 +1,14 @@
     1.4 +##
     1.5 +##  apache-php.conf -- Apache configuration for PHP
     1.6 +##
     1.7 +
     1.8 +#   load DSO
     1.9 +LoadModule  php5_module @l_prefix@/libexec/apache/mod_php.so
    1.10 +
    1.11 +#   activate PHP handler by file extension
    1.12 +AddType     application/x-httpd-php  .php
    1.13 +
    1.14 +#   configure the PHP initialization file
    1.15 +#   (this directory directive really accepts a file, too!)
    1.16 +PHPINIDir   @l_prefix@/etc/apache/apache-php.ini
    1.17 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/apache-php/apache-php.ini	Thu Aug 09 19:06:57 2012 +0200
     2.3 @@ -0,0 +1,25 @@
     2.4 +;;
     2.5 +;;  apache-php.ini -- PHP Configuration
     2.6 +;;
     2.7 +
     2.8 +[PHP]
     2.9 +
    2.10 +;   Resource Limits
    2.11 +register_globals      = off    ; Global variables are no longer registered for input data
    2.12 +allow_url_fopen       = off    ; Disable the opening of remote URLs
    2.13 +display_errors        = off    ; Errors will NOT be displayed
    2.14 +log_errors            = on     ; Errors will be logged
    2.15 +max_execution_time    = 60     ; Maximum execution time of each script, in seconds
    2.16 +max_input_time        = 60     ; Maximum amount of time each script may spend parsing request data
    2.17 +memory_limit          = 128M   ; Maximum amount of memory a script may consume
    2.18 +post_max_size         = 16M    ; Maximum amount of POST data accepted
    2.19 +realpath_cache_size   = 256K   ; Maximum size of realpath(2) cache
    2.20 +realpath_cache_ttl    = 120    ; Duration of time (in seconds) to cache realpath(2) information
    2.21 +date.timezone         = "UTC"  ; The timezone for date calculations
    2.22 +
    2.23 +;   Include Paths
    2.24 +include_path          = ".:@l_prefix@/lib/php"
    2.25 +
    2.26 +;   Session Paths
    2.27 +session.save_path     = "@l_prefix@/var/apache/run/apache-php.session"
    2.28 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/apache-php/apache-php.patch	Thu Aug 09 19:06:57 2012 +0200
     3.3 @@ -0,0 +1,11 @@
     3.4 +Index: ext/gd/libgd/gd_compat.c
     3.5 +--- ext/gd/libgd/gd_compat.c.orig	2009-08-09 15:15:45 +0200
     3.6 ++++ ext/gd/libgd/gd_compat.c	2010-01-19 21:20:30 +0100
     3.7 +@@ -5,6 +5,7 @@
     3.8 + #endif
     3.9 + 
    3.10 + #ifdef HAVE_GD_JPG
    3.11 ++# include <stdio.h>
    3.12 + # include <jpeglib.h>
    3.13 + #endif
    3.14 + 
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/apache-php/apache-php.spec	Thu Aug 09 19:06:57 2012 +0200
     4.3 @@ -0,0 +1,552 @@
     4.4 +##
     4.5 +##  apache-php.spec -- OpenPKG RPM Package Specification
     4.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4.7 +##
     4.8 +##  Permission to use, copy, modify, and distribute this software for
     4.9 +##  any purpose with or without fee is hereby granted, provided that
    4.10 +##  the above copyright notice and this permission notice appear in all
    4.11 +##  copies.
    4.12 +##
    4.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    4.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    4.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    4.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    4.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    4.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    4.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    4.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    4.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    4.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    4.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    4.24 +##  SUCH DAMAGE.
    4.25 +##
    4.26 +
    4.27 +#   package information
    4.28 +Name:         apache-php
    4.29 +Summary:      Apache Extension: PHP Scripting Language
    4.30 +URL:          http://www.php.net/
    4.31 +Vendor:       The PHP Project
    4.32 +Packager:     OpenPKG Foundation e.V.
    4.33 +Distribution: OpenPKG Community
    4.34 +Class:        BASE
    4.35 +Group:        Web
    4.36 +License:      PHP
    4.37 +Version:      5.4.5
    4.38 +Release:      20120723
    4.39 +
    4.40 +#   package options
    4.41 +%option       with_bc                   no
    4.42 +%option       with_bdb                  no
    4.43 +%option       with_bzip2                no
    4.44 +%option       with_calendar             no
    4.45 +%option       with_ctype                no
    4.46 +%option       with_curl                 no
    4.47 +%option       with_debug                no
    4.48 +%option       with_dom                  no
    4.49 +%option       with_exif                 no
    4.50 +%option       with_freetype             no
    4.51 +%option       with_ftp                  no
    4.52 +%option       with_gd                   no
    4.53 +%option       with_gdbm                 no
    4.54 +%option       with_gettext              no
    4.55 +%option       with_iconv                no
    4.56 +%option       with_imap                 no
    4.57 +%option       with_json                 no
    4.58 +%option       with_tokenizer            no
    4.59 +%option       with_mbregex              no
    4.60 +%option       with_mbstring             no
    4.61 +%option       with_mcrypt               no
    4.62 +%option       with_mhash                no
    4.63 +%option       with_mm                   no
    4.64 +%option       with_mysql                no
    4.65 +%option       with_mysqlnd              no
    4.66 +%option       with_oci8                 no
    4.67 +%option       with_odbc                 no
    4.68 +%option       with_openldap             no
    4.69 +%option       with_openldapsasl         no
    4.70 +%option       with_pear                 no
    4.71 +%option       with_pgsql                no
    4.72 +%option       with_posix                no
    4.73 +%option       with_sendmail             no
    4.74 +%option       with_session              no
    4.75 +%option       with_simplexml            no
    4.76 +%option       with_snmp                 no
    4.77 +%option       with_soap                 no
    4.78 +%option       with_sqlite               no
    4.79 +%option       with_ssl                  no
    4.80 +%option       with_tidy                 no
    4.81 +%option       with_versioning           no
    4.82 +%option       with_wddx                 no
    4.83 +%option       with_xml                  no
    4.84 +%option       with_xslt                 no
    4.85 +%option       with_zlib                 no
    4.86 +%option       with_zip                  no
    4.87 +
    4.88 +#   fixing implicit extension dependencies and correlations
    4.89 +%if "%{with_mm}" == "yes"
    4.90 +%undefine     with_session
    4.91 +%define       with_session       yes
    4.92 +%endif
    4.93 +%if "%{with_pear}" == "yes"
    4.94 +%undefine     with_xml
    4.95 +%define       with_xml           yes
    4.96 +%endif
    4.97 +%if "%{with_freetype}" == "yes"
    4.98 +%undefine     with_gd
    4.99 +%define       with_gd            yes
   4.100 +%endif
   4.101 +%if "%{with_mysql}" == "yes" || "%{with_gd}" == "yes" || "%{with_dom}" == "yes" || "%{with_zip}" == "yes"
   4.102 +%undefine     with_zlib
   4.103 +%define       with_zlib          yes
   4.104 +%endif
   4.105 +%if "%{with_xslt}" == "yes"
   4.106 +%undefine     with_dom
   4.107 +%define       with_dom           yes
   4.108 +%endif
   4.109 +%if "%{with_dom}" == "yes"
   4.110 +%undefine     with_xml
   4.111 +%define       with_xml           yes
   4.112 +%endif
   4.113 +%if "%{with_soap}" == "yes"
   4.114 +%undefine     with_xml
   4.115 +%define       with_xml           yes
   4.116 +%endif
   4.117 +%if "%{with_pgsql}" == "yes"
   4.118 +%undefine     with_ssl
   4.119 +%define       with_ssl           yes
   4.120 +%endif
   4.121 +
   4.122 +#   list of sources
   4.123 +Source0:      http://static.php.net/www.php.net/distributions/php-%{version}.tar.bz2
   4.124 +Source1:      apache-php.ini
   4.125 +Source2:      apache-php.conf
   4.126 +Patch0:       apache-php.patch
   4.127 +
   4.128 +#   build information
   4.129 +BuildPreReq:  OpenPKG, openpkg >= 20120101, gcc, flex, bison
   4.130 +PreReq:       OpenPKG, openpkg >= 20120101
   4.131 +BuildPreReq:  apache
   4.132 +PreReq:       apache
   4.133 +BuildPreReq:  pcre
   4.134 +PreReq:       pcre
   4.135 +%if "%{with_sqlite}" == "yes"
   4.136 +BuildPreReq:  sqlite
   4.137 +PreReq:       sqlite
   4.138 +%endif
   4.139 +%if "%{with_mysql}" == "yes"
   4.140 +BuildPreReq:  mysql
   4.141 +PreReq:       mysql
   4.142 +%endif
   4.143 +%if "%{with_pgsql}" == "yes"
   4.144 +BuildPreReq:  postgresql
   4.145 +PreReq:       postgresql
   4.146 +%endif
   4.147 +%if "%{with_gd}" == "yes"
   4.148 +BuildPreReq:  gd >= 2.0.20, jpeg, png
   4.149 +PreReq:       gd >= 2.0.20, jpeg, png
   4.150 +%endif
   4.151 +%if "%{with_bdb}" == "yes"
   4.152 +BuildPreReq:  db
   4.153 +PreReq:       db
   4.154 +%endif
   4.155 +%if "%{with_zlib}" == "yes"
   4.156 +BuildPreReq:  zlib
   4.157 +PreReq:       zlib
   4.158 +%endif
   4.159 +%if "%{with_bzip2}" == "yes"
   4.160 +BuildPreReq:  bzip2
   4.161 +PreReq:       bzip2
   4.162 +%endif
   4.163 +%if "%{with_ssl}" == "yes"
   4.164 +BuildPreReq:  openssl
   4.165 +PreReq:       openssl
   4.166 +%endif
   4.167 +%if "%{with_openldap}" == "yes"
   4.168 +BuildPreReq:  openldap
   4.169 +PreReq:       openldap
   4.170 +%if "%{with_openldapsasl}" == "yes"
   4.171 +BuildPreReq:  openldap::with_sasl = yes
   4.172 +PreReq:       openldap::with_sasl = yes
   4.173 +%else
   4.174 +BuildPreReq:  openldap::with_sasl = no
   4.175 +PreReq:       openldap::with_sasl = no
   4.176 +%endif
   4.177 +%endif
   4.178 +%if "%{with_mm}" == "yes"
   4.179 +BuildPreReq:  mm
   4.180 +PreReq:       mm
   4.181 +%endif
   4.182 +%if "%{with_freetype}" == "yes"
   4.183 +BuildPreReq:  freetype
   4.184 +PreReq:       freetype
   4.185 +%endif
   4.186 +%if "%{with_gettext}" == "yes"
   4.187 +BuildPreReq:  gettext, libiconv
   4.188 +PreReq:       gettext, libiconv
   4.189 +%endif
   4.190 +%if "%{with_iconv}" == "yes"
   4.191 +BuildPreReq:  libiconv
   4.192 +PreReq:       libiconv
   4.193 +%endif
   4.194 +%if "%{with_imap}" == "yes"
   4.195 +BuildPreReq:  imap, openssl
   4.196 +PreReq:       imap, openssl
   4.197 +%endif
   4.198 +%if "%{with_xml}" == "yes"
   4.199 +BuildPreReq:  libxml
   4.200 +PreReq:       libxml
   4.201 +%endif
   4.202 +%if "%{with_xslt}" == "yes"
   4.203 +BuildPreReq:  libxslt
   4.204 +PreReq:       libxslt
   4.205 +%endif
   4.206 +%if "%{with_dom}" == "yes"
   4.207 +BuildPreReq:  libxml, libxslt
   4.208 +PreReq:       libxml, libxslt
   4.209 +%endif
   4.210 +%if "%{with_curl}" == "yes"
   4.211 +BuildPreReq:  curl
   4.212 +PreReq:       curl
   4.213 +%endif
   4.214 +%if "%{with_mhash}" == "yes"
   4.215 +BuildPreReq:  mhash
   4.216 +PreReq:       mhash
   4.217 +%endif
   4.218 +%if "%{with_mcrypt}" == "yes"
   4.219 +BuildPreReq:  libmcrypt
   4.220 +PreReq:       libmcrypt
   4.221 +%endif
   4.222 +%if "%{with_gdbm}" == "yes"
   4.223 +BuildPreReq:  gdbm, gdbm::with_ndbm = yes
   4.224 +PreReq:       gdbm, gdbm::with_ndbm = yes
   4.225 +%endif
   4.226 +%if "%{with_oci8}" == "yes"
   4.227 +BuildPreReq:  oracle
   4.228 +PreReq:       oracle
   4.229 +%endif
   4.230 +%if "%{with_snmp}" == "yes"
   4.231 +BuildPreReq:  snmp
   4.232 +PreReq:       snmp
   4.233 +%endif
   4.234 +%if "%{with_odbc}" == "yes"
   4.235 +BuildPreReq:  unixodbc
   4.236 +PreReq:       unixodbc
   4.237 +%endif
   4.238 +%if "%{with_sendmail}" == "yes"
   4.239 +BuildPreReq:  MTA
   4.240 +PreReq:       MTA
   4.241 +%endif
   4.242 +%if "%{with_simplexml}" == "yes"
   4.243 +BuildPreReq:  libxml
   4.244 +PreReq:       libxml
   4.245 +%endif
   4.246 +%if "%{with_tidy}" == "yes"
   4.247 +BuildPreReq:  tidy
   4.248 +PreReq:       tidy
   4.249 +%endif
   4.250 +
   4.251 +%description
   4.252 +    PHP is an HTML-embedded scripting language. Much of its syntax is
   4.253 +    borrowed from C, Java and Perl with a couple of unique PHP-specific
   4.254 +    features thrown in. The goal of the language is to allow web
   4.255 +    developers to write dynamically generated pages quickly.
   4.256 +
   4.257 +    This package provides a Dynamic Shared Object (DSO) for the Apache
   4.258 +    HTTP 2.2 web server. In general speaking, this module is also known
   4.259 +    as mod_php.
   4.260 +
   4.261 +%track
   4.262 +    prog apache-php = {
   4.263 +        version   = %{version}
   4.264 +        url       = http://www.php.net/downloads.php
   4.265 +        regex     = php-(5\.\d+\.\d+)\.tar\.(bz2|gz)
   4.266 +    }
   4.267 +
   4.268 +%prep
   4.269 +    %setup -q -n php-%{version}
   4.270 +    %{l_shtool} subst \
   4.271 +        -e 's;-i -a -n php5;-i -n php5;' \
   4.272 +        configure
   4.273 +    %{l_shtool} subst \
   4.274 +        -e 's;\(/include\)/freetype2;\1;' \
   4.275 +        configure \
   4.276 +        ext/gd/config.m4
   4.277 +    %patch -p0
   4.278 +
   4.279 +%build
   4.280 +    #   configure package
   4.281 +    case "%{l_platform -t}" in
   4.282 +        *-sunos5.10 ) cflags="%{l_cflags}"    ;;
   4.283 +        *           ) cflags="%{l_cflags -O}" ;;
   4.284 +    esac
   4.285 +    cppflags="%{l_cppflags}"
   4.286 +    ldflags="%{l_ldflags}"
   4.287 +    libs=""
   4.288 +%if "%{with_gdbm}" == "yes"
   4.289 +    libs="$libs -lndbm -lgdbm"
   4.290 +%endif
   4.291 +%if "%{with_gd}" == "yes"
   4.292 +    libs="$libs -lpng -lz"
   4.293 +%endif
   4.294 +%if "%{with_gettext}" == "yes"
   4.295 +    libs="$libs -liconv"
   4.296 +%endif
   4.297 +%if "%{with_openldap}" == "yes" && "%{with_openldapsasl}" == "yes"
   4.298 +    libs="$libs -lsasl2"
   4.299 +%endif
   4.300 +%if "%{with_imap}" == "yes"
   4.301 +    libs="$libs -lssl -lcrypto"
   4.302 +%endif
   4.303 +%if "%{with_bdb}" == "yes"
   4.304 +    libs="$libs -ldb"
   4.305 +%endif
   4.306 +%if "%{with_pgsql}" == "yes"
   4.307 +    libs="$libs `pg_config --libs`"
   4.308 +%endif
   4.309 +%if "%{with_oci8}" == "yes"
   4.310 +    ORACLE_HOME="`%{l_rc} --query oracle_home`"
   4.311 +    export ORACLE_HOME
   4.312 +%endif
   4.313 +    CC="%{l_cc}" \
   4.314 +    CFLAGS="$cflags" \
   4.315 +    CPPFLAGS="$cppflags" \
   4.316 +    LDFLAGS="$ldflags" \
   4.317 +    LIBS="$libs" \
   4.318 +%if "%{with_sendmail}" == "yes"
   4.319 +    PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
   4.320 +%else
   4.321 +    PROG_SENDMAIL="`%{l_shtool} path false`" \
   4.322 +%endif
   4.323 +    ./configure \
   4.324 +        --prefix=%{l_prefix} \
   4.325 +        --sysconfdir=%{l_prefix}/etc/apache \
   4.326 +        --with-config-file-path=%{l_prefix}/etc/apache \
   4.327 +        --libdir=%{l_prefix}/lib/php \
   4.328 +        --disable-all \
   4.329 +        --enable-pdo \
   4.330 +        --enable-filter \
   4.331 +        --with-pcre-regex=%{l_prefix} \
   4.332 +%if "%{with_calendar}" == "yes"
   4.333 +        --enable-calendar \
   4.334 +%endif
   4.335 +%if "%{with_sqlite}" == "yes"
   4.336 +        --with-sqlite3=%{l_prefix} \
   4.337 +        --with-pdo-sqlite=%{l_prefix} \
   4.338 +%else
   4.339 +        --without-pdo-sqlite \
   4.340 +%endif
   4.341 +%if "%{with_mysql}" == "yes" || "%{with_mysqlnd}" == "yes"
   4.342 +%if "%{with_mysqlnd}" == "yes"
   4.343 +        --with-mysql=mysqlnd \
   4.344 +        --with-pdo-mysql=mysqlnd \
   4.345 +%else
   4.346 +        --with-mysql=%{l_prefix} \
   4.347 +        --with-pdo-mysql=%{l_prefix} \
   4.348 +%endif
   4.349 +        --with-mysqli=mysqlnd \
   4.350 +        --with-mysql-sock=%{l_prefix}/var/mysql/mysql.sock \
   4.351 +%else
   4.352 +        --without-mysql \
   4.353 +        --without-pdo-mysql \
   4.354 +%endif
   4.355 +%if "%{with_pgsql}" == "yes"
   4.356 +        --with-pgsql=%{l_prefix} \
   4.357 +        --with-pdo-pgsql=%{l_prefix} \
   4.358 +%else
   4.359 +        --without-pgsql \
   4.360 +%endif
   4.361 +%if "%{with_posix}" == "yes"
   4.362 +        --enable-posix \
   4.363 +%endif
   4.364 +%if "%{with_gd}" == "yes"
   4.365 +        --with-gd=yes \
   4.366 +        --with-jpeg-dir=%{l_prefix} \
   4.367 +        --with-png-dir=%{l_prefix} \
   4.368 +%endif
   4.369 +%if "%{with_freetype}" == "yes"
   4.370 +        --enable-gd-native-ttf \
   4.371 +        --with-freetype-dir=%{l_prefix} \
   4.372 +%endif
   4.373 +%if "%{with_bdb}" == "yes"
   4.374 +        --with-db4=%{l_prefix} \
   4.375 +%endif
   4.376 +%if "%{with_debug}" == "yes"
   4.377 +        --enable-debug \
   4.378 +%else
   4.379 +        --disable-debug \
   4.380 +%endif
   4.381 +%if "%{with_zlib}" == "yes"
   4.382 +        --with-zlib=%{l_prefix} \
   4.383 +        --with-zlib-dir=%{l_prefix} \
   4.384 +%endif
   4.385 +%if "%{with_bzip2}" == "yes"
   4.386 +        --with-bz2=%{l_prefix} \
   4.387 +%endif
   4.388 +%if "%{with_ssl}" == "yes" || "%{with_openldap}" == "yes"
   4.389 +        --with-openssl=%{l_prefix} \
   4.390 +%endif
   4.391 +%if "%{with_openldap}" == "yes"
   4.392 +        --with-ldap=%{l_prefix} \
   4.393 +%endif
   4.394 +%if "%{with_session}" == "yes"
   4.395 +        --enable-session \
   4.396 +%endif
   4.397 +%if "%{with_mm}" == "yes"
   4.398 +        --with-mm=%{l_prefix} \
   4.399 +%endif
   4.400 +%if "%{with_ftp}" == "yes"
   4.401 +        --enable-ftp \
   4.402 +%endif
   4.403 +%if "%{with_oci8}" == "yes"
   4.404 +        --with-oci8 \
   4.405 +%endif
   4.406 +%if "%{with_gettext}" == "yes"
   4.407 +        --with-gettext=%{l_prefix} \
   4.408 +%endif
   4.409 +%if "%{with_imap}" == "yes"
   4.410 +        --with-imap=%{l_prefix} \
   4.411 +        --with-imap-ssl=%{l_prefix} \
   4.412 +%endif
   4.413 +%if "%{with_json}" == "yes"
   4.414 +        --enable-json \
   4.415 +%else
   4.416 +        --disable-json \
   4.417 +%endif
   4.418 +%if "%{with_tokenizer}" == "yes"
   4.419 +        --enable-tokenizer \
   4.420 +%else
   4.421 +        --disable-tokenizer \
   4.422 +%endif
   4.423 +%if "%{with_xml}" == "yes"
   4.424 +        --enable-xml \
   4.425 +        --enable-xmlreader \
   4.426 +        --enable-libxml \
   4.427 +        --with-libxml-dir=%{l_prefix} \
   4.428 +%else
   4.429 +        --disable-xml \
   4.430 +%endif
   4.431 +%if "%{with_xslt}" == "yes"
   4.432 +        --with-xsl=%{l_prefix} \
   4.433 +%else
   4.434 +        --without-xsl \
   4.435 +%endif
   4.436 +%if "%{with_dom}" == "yes"
   4.437 +        --enable-dom \
   4.438 +%else
   4.439 +        --disable-dom \
   4.440 +%endif
   4.441 +%if "%{with_wddx}" == "yes"
   4.442 +        --enable-wddx \
   4.443 +%endif
   4.444 +%if "%{with_soap}" == "yes"
   4.445 +        --enable-soap \
   4.446 +%endif
   4.447 +%if "%{with_bc}" == "yes"
   4.448 +        --enable-bcmath \
   4.449 +%endif
   4.450 +%if "%{with_mhash}" == "yes"
   4.451 +        --with-mhash=%{l_prefix} \
   4.452 +%endif
   4.453 +%if "%{with_mcrypt}" == "yes"
   4.454 +        --with-mcrypt=%{l_prefix} \
   4.455 +%endif
   4.456 +%if "%{with_ctype}" == "yes"
   4.457 +        --enable-ctype \
   4.458 +%endif
   4.459 +%if "%{with_curl}" == "yes"
   4.460 +        --with-curl=%{l_prefix} \
   4.461 +%endif
   4.462 +%if "%{with_gdbm}" == "yes"
   4.463 +        --with-gdbm=%{l_prefix} \
   4.464 +%endif
   4.465 +%if "%{with_versioning}" == "yes"
   4.466 +        --enable-versioning \
   4.467 +%endif
   4.468 +%if "%{with_pear}" == "yes"
   4.469 +        --with-pear=%{l_prefix}/lib/php \
   4.470 +%else
   4.471 +        --without-pear \
   4.472 +%endif
   4.473 +%if "%{with_simplexml}" == "yes"
   4.474 +        --enable-simplexml \
   4.475 +        --enable-libxml \
   4.476 +        --with-libxml-dir=%{l_prefix} \
   4.477 +%else
   4.478 +        --disable-simplexml \
   4.479 +%endif
   4.480 +%if "%{with_snmp}" == "yes"
   4.481 +        --with-snmp=%{l_prefix} \
   4.482 +        --with-openssl-dir=%{l_prefix} \
   4.483 +%endif
   4.484 +%if "%{with_odbc}" == "yes"
   4.485 +        --with-unixODBC=%{l_prefix} \
   4.486 +        --with-pdo-odbc=unixODBC,%{l_prefix} \
   4.487 +%endif
   4.488 +%if "%{with_mbregex}" == "yes"
   4.489 +        --enable-mbregex \
   4.490 +%endif
   4.491 +%if "%{with_mbstring}" == "yes"
   4.492 +        --enable-mbstring \
   4.493 +%endif
   4.494 +%if "%{with_exif}" == "yes"
   4.495 +        --with-exif \
   4.496 +%endif
   4.497 +%if "%{with_iconv}" == "yes"
   4.498 +        --with-iconv=%{l_prefix} \
   4.499 +%endif
   4.500 +%if "%{with_tidy}" == "yes"
   4.501 +        --with-tidy=%{l_prefix} \
   4.502 +%else
   4.503 +        --without-tidy \
   4.504 +%endif
   4.505 +%if "%{with_zip}" == "yes"
   4.506 +        --enable-zip \
   4.507 +%endif
   4.508 +        --with-apxs2=%{l_prefix}/sbin/apxs \
   4.509 +        --disable-cli \
   4.510 +        --disable-cgi
   4.511 +
   4.512 +    #   build package
   4.513 +    %{l_make} %{l_mflags}
   4.514 +
   4.515 +%install
   4.516 +    #   install package
   4.517 +    %{l_make} %{l_mflags} install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
   4.518 +    mv  $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/libphp5.so \
   4.519 +        $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/mod_php.so
   4.520 +
   4.521 +    #   install default configuration file
   4.522 +    %{l_shtool} mkdir -f -p -m 755 \
   4.523 +        $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
   4.524 +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
   4.525 +        %{SOURCE apache-php.ini} \
   4.526 +        $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
   4.527 +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
   4.528 +        %{SOURCE apache-php.conf} \
   4.529 +        $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
   4.530 +
   4.531 +    #   create session storage directory
   4.532 +%if "%{with_session}" == "yes"
   4.533 +    %{l_shtool} mkdir -f -p -m 755 \
   4.534 +        $RPM_BUILD_ROOT%{l_prefix}/var/apache/run/apache-php.session
   4.535 +%endif
   4.536 +
   4.537 +    #   determine installation files
   4.538 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
   4.539 +%if "%{with_session}" == "yes"
   4.540 +        '%attr(0750,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/apache/run/apache-php.session' \
   4.541 +%endif
   4.542 +        '%config %{l_prefix}/etc/apache/apache-php.ini' \
   4.543 +        '%config %{l_prefix}/etc/apache/apache.d/apache-php.conf'
   4.544 +
   4.545 +%files -f files
   4.546 +
   4.547 +%clean
   4.548 +
   4.549 +%post
   4.550 +    #   after upgrade, restart service
   4.551 +    [ $1 -eq 2 ] || exit 0
   4.552 +    eval `%{l_rc} apache status 2>/dev/null`
   4.553 +    [ ".$apache_active" = .yes ] && %{l_rc} apache restart
   4.554 +    exit 0
   4.555 +

mercurial