apache-php/apache-php.spec

Tue, 28 Aug 2012 18:29:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:29:30 +0200
changeset 534
d2d0020cfafa
parent 503
80cfd6ca244d
child 671
f82939c12e5f
permissions
-rw-r--r--

Update from Drupal 6.x to 7.x and introduce several new HTML5 themes. Because
many themes from Drupal 6.x have since been abandoned, left unmaintained, or
not ported to Drupal 7.x, this package has changed in size and utility.

michael@503 1 ##
michael@503 2 ## apache-php.spec -- OpenPKG RPM Package Specification
michael@503 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@503 4 ##
michael@503 5 ## Permission to use, copy, modify, and distribute this software for
michael@503 6 ## any purpose with or without fee is hereby granted, provided that
michael@503 7 ## the above copyright notice and this permission notice appear in all
michael@503 8 ## copies.
michael@503 9 ##
michael@503 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@503 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@503 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@503 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@503 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@503 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@503 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@503 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@503 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@503 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@503 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@503 21 ## SUCH DAMAGE.
michael@503 22 ##
michael@503 23
michael@503 24 # package information
michael@503 25 Name: apache-php
michael@503 26 Summary: Apache Extension: PHP Scripting Language
michael@503 27 URL: http://www.php.net/
michael@503 28 Vendor: The PHP Project
michael@503 29 Packager: OpenPKG Foundation e.V.
michael@503 30 Distribution: OpenPKG Community
michael@503 31 Class: BASE
michael@503 32 Group: Web
michael@503 33 License: PHP
michael@503 34 Version: 5.4.5
michael@504 35 Release: 20120800
michael@503 36
michael@503 37 # package options
michael@503 38 %option with_bc no
michael@503 39 %option with_bdb no
michael@503 40 %option with_bzip2 no
michael@503 41 %option with_calendar no
michael@503 42 %option with_ctype no
michael@503 43 %option with_curl no
michael@503 44 %option with_debug no
michael@503 45 %option with_dom no
michael@503 46 %option with_exif no
michael@503 47 %option with_freetype no
michael@503 48 %option with_ftp no
michael@503 49 %option with_gd no
michael@503 50 %option with_gdbm no
michael@503 51 %option with_gettext no
michael@503 52 %option with_iconv no
michael@503 53 %option with_imap no
michael@503 54 %option with_json no
michael@503 55 %option with_tokenizer no
michael@503 56 %option with_mbregex no
michael@503 57 %option with_mbstring no
michael@503 58 %option with_mcrypt no
michael@503 59 %option with_mhash no
michael@503 60 %option with_mm no
michael@503 61 %option with_mysql no
michael@503 62 %option with_mysqlnd no
michael@503 63 %option with_oci8 no
michael@503 64 %option with_odbc no
michael@503 65 %option with_openldap no
michael@503 66 %option with_openldapsasl no
michael@503 67 %option with_pear no
michael@503 68 %option with_pgsql no
michael@503 69 %option with_posix no
michael@503 70 %option with_sendmail no
michael@503 71 %option with_session no
michael@503 72 %option with_simplexml no
michael@503 73 %option with_snmp no
michael@503 74 %option with_soap no
michael@503 75 %option with_sqlite no
michael@503 76 %option with_ssl no
michael@503 77 %option with_tidy no
michael@503 78 %option with_versioning no
michael@503 79 %option with_wddx no
michael@503 80 %option with_xml no
michael@503 81 %option with_xslt no
michael@503 82 %option with_zlib no
michael@503 83 %option with_zip no
michael@503 84
michael@503 85 # fixing implicit extension dependencies and correlations
michael@503 86 %if "%{with_mm}" == "yes"
michael@503 87 %undefine with_session
michael@503 88 %define with_session yes
michael@503 89 %endif
michael@503 90 %if "%{with_pear}" == "yes"
michael@503 91 %undefine with_xml
michael@503 92 %define with_xml yes
michael@503 93 %endif
michael@503 94 %if "%{with_freetype}" == "yes"
michael@503 95 %undefine with_gd
michael@503 96 %define with_gd yes
michael@503 97 %endif
michael@503 98 %if "%{with_mysql}" == "yes" || "%{with_gd}" == "yes" || "%{with_dom}" == "yes" || "%{with_zip}" == "yes"
michael@503 99 %undefine with_zlib
michael@503 100 %define with_zlib yes
michael@503 101 %endif
michael@503 102 %if "%{with_xslt}" == "yes"
michael@503 103 %undefine with_dom
michael@503 104 %define with_dom yes
michael@503 105 %endif
michael@503 106 %if "%{with_dom}" == "yes"
michael@503 107 %undefine with_xml
michael@503 108 %define with_xml yes
michael@503 109 %endif
michael@503 110 %if "%{with_soap}" == "yes"
michael@503 111 %undefine with_xml
michael@503 112 %define with_xml yes
michael@503 113 %endif
michael@503 114 %if "%{with_pgsql}" == "yes"
michael@503 115 %undefine with_ssl
michael@503 116 %define with_ssl yes
michael@503 117 %endif
michael@503 118
michael@503 119 # list of sources
michael@503 120 Source0: http://static.php.net/www.php.net/distributions/php-%{version}.tar.bz2
michael@503 121 Source1: apache-php.ini
michael@503 122 Source2: apache-php.conf
michael@503 123 Patch0: apache-php.patch
michael@503 124
michael@503 125 # build information
michael@504 126 BuildPreReq: OpenPKG, openpkg >= 20120101, make, gcc, flex, bison
michael@503 127 PreReq: OpenPKG, openpkg >= 20120101
michael@503 128 BuildPreReq: apache
michael@503 129 PreReq: apache
michael@503 130 BuildPreReq: pcre
michael@503 131 PreReq: pcre
michael@503 132 %if "%{with_sqlite}" == "yes"
michael@503 133 BuildPreReq: sqlite
michael@503 134 PreReq: sqlite
michael@503 135 %endif
michael@503 136 %if "%{with_mysql}" == "yes"
michael@503 137 BuildPreReq: mysql
michael@503 138 PreReq: mysql
michael@503 139 %endif
michael@503 140 %if "%{with_pgsql}" == "yes"
michael@503 141 BuildPreReq: postgresql
michael@503 142 PreReq: postgresql
michael@503 143 %endif
michael@503 144 %if "%{with_gd}" == "yes"
michael@503 145 BuildPreReq: gd >= 2.0.20, jpeg, png
michael@503 146 PreReq: gd >= 2.0.20, jpeg, png
michael@503 147 %endif
michael@503 148 %if "%{with_bdb}" == "yes"
michael@503 149 BuildPreReq: db
michael@503 150 PreReq: db
michael@503 151 %endif
michael@503 152 %if "%{with_zlib}" == "yes"
michael@503 153 BuildPreReq: zlib
michael@503 154 PreReq: zlib
michael@503 155 %endif
michael@503 156 %if "%{with_bzip2}" == "yes"
michael@503 157 BuildPreReq: bzip2
michael@503 158 PreReq: bzip2
michael@503 159 %endif
michael@503 160 %if "%{with_ssl}" == "yes"
michael@503 161 BuildPreReq: openssl
michael@503 162 PreReq: openssl
michael@503 163 %endif
michael@503 164 %if "%{with_openldap}" == "yes"
michael@503 165 BuildPreReq: openldap
michael@503 166 PreReq: openldap
michael@503 167 %if "%{with_openldapsasl}" == "yes"
michael@503 168 BuildPreReq: openldap::with_sasl = yes
michael@503 169 PreReq: openldap::with_sasl = yes
michael@503 170 %else
michael@503 171 BuildPreReq: openldap::with_sasl = no
michael@503 172 PreReq: openldap::with_sasl = no
michael@503 173 %endif
michael@503 174 %endif
michael@503 175 %if "%{with_mm}" == "yes"
michael@503 176 BuildPreReq: mm
michael@503 177 PreReq: mm
michael@503 178 %endif
michael@503 179 %if "%{with_freetype}" == "yes"
michael@503 180 BuildPreReq: freetype
michael@503 181 PreReq: freetype
michael@503 182 %endif
michael@503 183 %if "%{with_gettext}" == "yes"
michael@503 184 BuildPreReq: gettext, libiconv
michael@503 185 PreReq: gettext, libiconv
michael@503 186 %endif
michael@503 187 %if "%{with_iconv}" == "yes"
michael@503 188 BuildPreReq: libiconv
michael@503 189 PreReq: libiconv
michael@503 190 %endif
michael@503 191 %if "%{with_imap}" == "yes"
michael@503 192 BuildPreReq: imap, openssl
michael@503 193 PreReq: imap, openssl
michael@503 194 %endif
michael@503 195 %if "%{with_xml}" == "yes"
michael@503 196 BuildPreReq: libxml
michael@503 197 PreReq: libxml
michael@503 198 %endif
michael@503 199 %if "%{with_xslt}" == "yes"
michael@503 200 BuildPreReq: libxslt
michael@503 201 PreReq: libxslt
michael@503 202 %endif
michael@503 203 %if "%{with_dom}" == "yes"
michael@503 204 BuildPreReq: libxml, libxslt
michael@503 205 PreReq: libxml, libxslt
michael@503 206 %endif
michael@503 207 %if "%{with_curl}" == "yes"
michael@503 208 BuildPreReq: curl
michael@503 209 PreReq: curl
michael@503 210 %endif
michael@503 211 %if "%{with_mhash}" == "yes"
michael@503 212 BuildPreReq: mhash
michael@503 213 PreReq: mhash
michael@503 214 %endif
michael@503 215 %if "%{with_mcrypt}" == "yes"
michael@503 216 BuildPreReq: libmcrypt
michael@503 217 PreReq: libmcrypt
michael@503 218 %endif
michael@503 219 %if "%{with_gdbm}" == "yes"
michael@503 220 BuildPreReq: gdbm, gdbm::with_ndbm = yes
michael@503 221 PreReq: gdbm, gdbm::with_ndbm = yes
michael@503 222 %endif
michael@503 223 %if "%{with_oci8}" == "yes"
michael@503 224 BuildPreReq: oracle
michael@503 225 PreReq: oracle
michael@503 226 %endif
michael@503 227 %if "%{with_snmp}" == "yes"
michael@503 228 BuildPreReq: snmp
michael@503 229 PreReq: snmp
michael@503 230 %endif
michael@503 231 %if "%{with_odbc}" == "yes"
michael@503 232 BuildPreReq: unixodbc
michael@503 233 PreReq: unixodbc
michael@503 234 %endif
michael@503 235 %if "%{with_sendmail}" == "yes"
michael@503 236 BuildPreReq: MTA
michael@503 237 PreReq: MTA
michael@503 238 %endif
michael@503 239 %if "%{with_simplexml}" == "yes"
michael@503 240 BuildPreReq: libxml
michael@503 241 PreReq: libxml
michael@503 242 %endif
michael@503 243 %if "%{with_tidy}" == "yes"
michael@503 244 BuildPreReq: tidy
michael@503 245 PreReq: tidy
michael@503 246 %endif
michael@503 247
michael@503 248 %description
michael@503 249 PHP is an HTML-embedded scripting language. Much of its syntax is
michael@503 250 borrowed from C, Java and Perl with a couple of unique PHP-specific
michael@503 251 features thrown in. The goal of the language is to allow web
michael@503 252 developers to write dynamically generated pages quickly.
michael@503 253
michael@503 254 This package provides a Dynamic Shared Object (DSO) for the Apache
michael@503 255 HTTP 2.2 web server. In general speaking, this module is also known
michael@503 256 as mod_php.
michael@503 257
michael@503 258 %track
michael@503 259 prog apache-php = {
michael@503 260 version = %{version}
michael@503 261 url = http://www.php.net/downloads.php
michael@503 262 regex = php-(5\.\d+\.\d+)\.tar\.(bz2|gz)
michael@503 263 }
michael@503 264
michael@503 265 %prep
michael@503 266 %setup -q -n php-%{version}
michael@503 267 %{l_shtool} subst \
michael@503 268 -e 's;-i -a -n php5;-i -n php5;' \
michael@503 269 configure
michael@503 270 %{l_shtool} subst \
michael@503 271 -e 's;\(/include\)/freetype2;\1;' \
michael@503 272 configure \
michael@503 273 ext/gd/config.m4
michael@503 274 %patch -p0
michael@503 275
michael@503 276 %build
michael@503 277 # configure package
michael@503 278 case "%{l_platform -t}" in
michael@503 279 *-sunos5.10 ) cflags="%{l_cflags}" ;;
michael@503 280 * ) cflags="%{l_cflags -O}" ;;
michael@503 281 esac
michael@503 282 cppflags="%{l_cppflags}"
michael@503 283 ldflags="%{l_ldflags}"
michael@503 284 libs=""
michael@503 285 %if "%{with_gdbm}" == "yes"
michael@503 286 libs="$libs -lndbm -lgdbm"
michael@503 287 %endif
michael@503 288 %if "%{with_gd}" == "yes"
michael@503 289 libs="$libs -lpng -lz"
michael@503 290 %endif
michael@503 291 %if "%{with_gettext}" == "yes"
michael@503 292 libs="$libs -liconv"
michael@503 293 %endif
michael@503 294 %if "%{with_openldap}" == "yes" && "%{with_openldapsasl}" == "yes"
michael@503 295 libs="$libs -lsasl2"
michael@503 296 %endif
michael@503 297 %if "%{with_imap}" == "yes"
michael@503 298 libs="$libs -lssl -lcrypto"
michael@503 299 %endif
michael@503 300 %if "%{with_bdb}" == "yes"
michael@503 301 libs="$libs -ldb"
michael@503 302 %endif
michael@503 303 %if "%{with_pgsql}" == "yes"
michael@503 304 libs="$libs `pg_config --libs`"
michael@503 305 %endif
michael@503 306 %if "%{with_oci8}" == "yes"
michael@503 307 ORACLE_HOME="`%{l_rc} --query oracle_home`"
michael@503 308 export ORACLE_HOME
michael@503 309 %endif
michael@503 310 CC="%{l_cc}" \
michael@503 311 CFLAGS="$cflags" \
michael@503 312 CPPFLAGS="$cppflags" \
michael@503 313 LDFLAGS="$ldflags" \
michael@503 314 LIBS="$libs" \
michael@503 315 %if "%{with_sendmail}" == "yes"
michael@503 316 PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
michael@503 317 %else
michael@503 318 PROG_SENDMAIL="`%{l_shtool} path false`" \
michael@503 319 %endif
michael@503 320 ./configure \
michael@503 321 --prefix=%{l_prefix} \
michael@503 322 --sysconfdir=%{l_prefix}/etc/apache \
michael@503 323 --with-config-file-path=%{l_prefix}/etc/apache \
michael@503 324 --libdir=%{l_prefix}/lib/php \
michael@503 325 --disable-all \
michael@503 326 --enable-pdo \
michael@503 327 --enable-filter \
michael@503 328 --with-pcre-regex=%{l_prefix} \
michael@503 329 %if "%{with_calendar}" == "yes"
michael@503 330 --enable-calendar \
michael@503 331 %endif
michael@503 332 %if "%{with_sqlite}" == "yes"
michael@503 333 --with-sqlite3=%{l_prefix} \
michael@503 334 --with-pdo-sqlite=%{l_prefix} \
michael@503 335 %else
michael@503 336 --without-pdo-sqlite \
michael@503 337 %endif
michael@503 338 %if "%{with_mysql}" == "yes" || "%{with_mysqlnd}" == "yes"
michael@503 339 %if "%{with_mysqlnd}" == "yes"
michael@503 340 --with-mysql=mysqlnd \
michael@503 341 --with-pdo-mysql=mysqlnd \
michael@503 342 %else
michael@503 343 --with-mysql=%{l_prefix} \
michael@503 344 --with-pdo-mysql=%{l_prefix} \
michael@503 345 %endif
michael@503 346 --with-mysqli=mysqlnd \
michael@503 347 --with-mysql-sock=%{l_prefix}/var/mysql/mysql.sock \
michael@503 348 %else
michael@503 349 --without-mysql \
michael@503 350 --without-pdo-mysql \
michael@503 351 %endif
michael@503 352 %if "%{with_pgsql}" == "yes"
michael@503 353 --with-pgsql=%{l_prefix} \
michael@503 354 --with-pdo-pgsql=%{l_prefix} \
michael@503 355 %else
michael@503 356 --without-pgsql \
michael@503 357 %endif
michael@503 358 %if "%{with_posix}" == "yes"
michael@503 359 --enable-posix \
michael@503 360 %endif
michael@503 361 %if "%{with_gd}" == "yes"
michael@503 362 --with-gd=yes \
michael@503 363 --with-jpeg-dir=%{l_prefix} \
michael@503 364 --with-png-dir=%{l_prefix} \
michael@503 365 %endif
michael@503 366 %if "%{with_freetype}" == "yes"
michael@503 367 --enable-gd-native-ttf \
michael@503 368 --with-freetype-dir=%{l_prefix} \
michael@503 369 %endif
michael@503 370 %if "%{with_bdb}" == "yes"
michael@503 371 --with-db4=%{l_prefix} \
michael@503 372 %endif
michael@503 373 %if "%{with_debug}" == "yes"
michael@503 374 --enable-debug \
michael@503 375 %else
michael@503 376 --disable-debug \
michael@503 377 %endif
michael@503 378 %if "%{with_zlib}" == "yes"
michael@503 379 --with-zlib=%{l_prefix} \
michael@503 380 --with-zlib-dir=%{l_prefix} \
michael@503 381 %endif
michael@503 382 %if "%{with_bzip2}" == "yes"
michael@503 383 --with-bz2=%{l_prefix} \
michael@503 384 %endif
michael@503 385 %if "%{with_ssl}" == "yes" || "%{with_openldap}" == "yes"
michael@503 386 --with-openssl=%{l_prefix} \
michael@503 387 %endif
michael@503 388 %if "%{with_openldap}" == "yes"
michael@503 389 --with-ldap=%{l_prefix} \
michael@503 390 %endif
michael@503 391 %if "%{with_session}" == "yes"
michael@503 392 --enable-session \
michael@503 393 %endif
michael@503 394 %if "%{with_mm}" == "yes"
michael@503 395 --with-mm=%{l_prefix} \
michael@503 396 %endif
michael@503 397 %if "%{with_ftp}" == "yes"
michael@503 398 --enable-ftp \
michael@503 399 %endif
michael@503 400 %if "%{with_oci8}" == "yes"
michael@503 401 --with-oci8 \
michael@503 402 %endif
michael@503 403 %if "%{with_gettext}" == "yes"
michael@503 404 --with-gettext=%{l_prefix} \
michael@503 405 %endif
michael@503 406 %if "%{with_imap}" == "yes"
michael@503 407 --with-imap=%{l_prefix} \
michael@503 408 --with-imap-ssl=%{l_prefix} \
michael@503 409 %endif
michael@503 410 %if "%{with_json}" == "yes"
michael@503 411 --enable-json \
michael@503 412 %else
michael@503 413 --disable-json \
michael@503 414 %endif
michael@503 415 %if "%{with_tokenizer}" == "yes"
michael@503 416 --enable-tokenizer \
michael@503 417 %else
michael@503 418 --disable-tokenizer \
michael@503 419 %endif
michael@503 420 %if "%{with_xml}" == "yes"
michael@503 421 --enable-xml \
michael@503 422 --enable-xmlreader \
michael@503 423 --enable-libxml \
michael@503 424 --with-libxml-dir=%{l_prefix} \
michael@503 425 %else
michael@503 426 --disable-xml \
michael@503 427 %endif
michael@503 428 %if "%{with_xslt}" == "yes"
michael@503 429 --with-xsl=%{l_prefix} \
michael@503 430 %else
michael@503 431 --without-xsl \
michael@503 432 %endif
michael@503 433 %if "%{with_dom}" == "yes"
michael@503 434 --enable-dom \
michael@503 435 %else
michael@503 436 --disable-dom \
michael@503 437 %endif
michael@503 438 %if "%{with_wddx}" == "yes"
michael@503 439 --enable-wddx \
michael@503 440 %endif
michael@503 441 %if "%{with_soap}" == "yes"
michael@503 442 --enable-soap \
michael@503 443 %endif
michael@503 444 %if "%{with_bc}" == "yes"
michael@503 445 --enable-bcmath \
michael@503 446 %endif
michael@503 447 %if "%{with_mhash}" == "yes"
michael@503 448 --with-mhash=%{l_prefix} \
michael@503 449 %endif
michael@503 450 %if "%{with_mcrypt}" == "yes"
michael@503 451 --with-mcrypt=%{l_prefix} \
michael@503 452 %endif
michael@503 453 %if "%{with_ctype}" == "yes"
michael@503 454 --enable-ctype \
michael@503 455 %endif
michael@503 456 %if "%{with_curl}" == "yes"
michael@503 457 --with-curl=%{l_prefix} \
michael@503 458 %endif
michael@503 459 %if "%{with_gdbm}" == "yes"
michael@503 460 --with-gdbm=%{l_prefix} \
michael@503 461 %endif
michael@503 462 %if "%{with_versioning}" == "yes"
michael@503 463 --enable-versioning \
michael@503 464 %endif
michael@503 465 %if "%{with_pear}" == "yes"
michael@503 466 --with-pear=%{l_prefix}/lib/php \
michael@503 467 %else
michael@503 468 --without-pear \
michael@503 469 %endif
michael@503 470 %if "%{with_simplexml}" == "yes"
michael@503 471 --enable-simplexml \
michael@503 472 --enable-libxml \
michael@503 473 --with-libxml-dir=%{l_prefix} \
michael@503 474 %else
michael@503 475 --disable-simplexml \
michael@503 476 %endif
michael@503 477 %if "%{with_snmp}" == "yes"
michael@503 478 --with-snmp=%{l_prefix} \
michael@503 479 --with-openssl-dir=%{l_prefix} \
michael@503 480 %endif
michael@503 481 %if "%{with_odbc}" == "yes"
michael@503 482 --with-unixODBC=%{l_prefix} \
michael@503 483 --with-pdo-odbc=unixODBC,%{l_prefix} \
michael@503 484 %endif
michael@503 485 %if "%{with_mbregex}" == "yes"
michael@503 486 --enable-mbregex \
michael@503 487 %endif
michael@503 488 %if "%{with_mbstring}" == "yes"
michael@503 489 --enable-mbstring \
michael@503 490 %endif
michael@503 491 %if "%{with_exif}" == "yes"
michael@503 492 --with-exif \
michael@503 493 %endif
michael@503 494 %if "%{with_iconv}" == "yes"
michael@503 495 --with-iconv=%{l_prefix} \
michael@503 496 %endif
michael@503 497 %if "%{with_tidy}" == "yes"
michael@503 498 --with-tidy=%{l_prefix} \
michael@503 499 %else
michael@503 500 --without-tidy \
michael@503 501 %endif
michael@503 502 %if "%{with_zip}" == "yes"
michael@503 503 --enable-zip \
michael@503 504 %endif
michael@503 505 --with-apxs2=%{l_prefix}/sbin/apxs \
michael@503 506 --disable-cli \
michael@503 507 --disable-cgi
michael@503 508
michael@503 509 # build package
michael@504 510 %{l_make} %{l_mflags -O}
michael@503 511
michael@503 512 %install
michael@503 513 # install package
michael@503 514 %{l_make} %{l_mflags} install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
michael@503 515 mv $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/libphp5.so \
michael@503 516 $RPM_BUILD_ROOT%{l_prefix}/libexec/apache/mod_php.so
michael@503 517
michael@503 518 # install default configuration file
michael@503 519 %{l_shtool} mkdir -f -p -m 755 \
michael@503 520 $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d
michael@503 521 %{l_shtool} install -c -m 644 %{l_value -s -a} \
michael@503 522 %{SOURCE apache-php.ini} \
michael@503 523 $RPM_BUILD_ROOT%{l_prefix}/etc/apache/
michael@503 524 %{l_shtool} install -c -m 644 %{l_value -s -a} \
michael@503 525 %{SOURCE apache-php.conf} \
michael@503 526 $RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
michael@503 527
michael@503 528 # create session storage directory
michael@503 529 %if "%{with_session}" == "yes"
michael@503 530 %{l_shtool} mkdir -f -p -m 755 \
michael@503 531 $RPM_BUILD_ROOT%{l_prefix}/var/apache/run/apache-php.session
michael@503 532 %endif
michael@503 533
michael@503 534 # determine installation files
michael@503 535 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
michael@503 536 %if "%{with_session}" == "yes"
michael@503 537 '%attr(0750,%{l_nusr},%{l_ngrp}) %{l_prefix}/var/apache/run/apache-php.session' \
michael@503 538 %endif
michael@503 539 '%config %{l_prefix}/etc/apache/apache-php.ini' \
michael@503 540 '%config %{l_prefix}/etc/apache/apache.d/apache-php.conf'
michael@503 541
michael@503 542 %files -f files
michael@503 543
michael@503 544 %clean
michael@503 545
michael@503 546 %post
michael@503 547 # after upgrade, restart service
michael@503 548 [ $1 -eq 2 ] || exit 0
michael@503 549 eval `%{l_rc} apache status 2>/dev/null`
michael@503 550 [ ".$apache_active" = .yes ] && %{l_rc} apache restart
michael@503 551 exit 0
michael@503 552

mercurial