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