| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- ##
- ## php.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.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
- Summary: Personal HomePage (PHP)
- URL: http://www.php.net/
- Vendor: The PHP Project
- Packager: The OpenPKG Project
- Distribution: OpenPKG [BASE]
- Group: Language
- License: PHP
- Version: 4.3.2
- Release: 20030702
- # package options (analog to apache.spec)
- %option with_calendar no
- %option with_mysql no
- %option with_gd no
- %option with_db no
- %option with_debug no
- %option with_pdflib no
- %option with_zlib no
- %option with_bzip2 no
- %option with_openssl no
- %option with_openldap no
- %option with_openldapsasl no
- %option with_mm no
- %option with_pcre no
- %option with_ftp no
- %option with_java no
- %option with_oci7 no
- %option with_oci8 no
- %option with_freetype no
- %option with_gettext no
- %option with_imap no
- %option with_xml no
- %option with_dom no
- %option with_bc no
- %option with_transsid no
- %option with_curl no
- %option with_mhash no
- %option with_wddx no
- %option with_gdbm no
- %option with_versioning no
- %option with_pear no
- # fixing implicit inter-module dependencies and correlations
- %if "%{with_freetype}" == "yes"
- %undefine with_gd
- %define with_gd yes
- %endif
- %if "%{with_mysql}" == "yes" || "%{with_pdflib}" == "yes" || "%{with_gd}" == "yes" || "%{with_dom}" == "yes"
- %undefine with_zlib
- %define with_zlib yes
- %endif
- # list of sources
- Source0: http://www.php.net/distributions/php-%{version}.tar.gz
- Patch0: php.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20020206, gcc, sed, flex, bison
- PreReq: OpenPKG, openpkg >= 20020206
- %if "%{with_mysql}" == "yes"
- BuildPreReq: MYSQL
- %endif
- %if "%{with_gd}" == "yes"
- BuildPreReq: gd, jpeg, png
- %endif
- %if "%{with_db}" == "yes"
- BuildPreReq: db
- %endif
- %if "%{with_pdflib}" == "yes"
- BuildPreReq: pdflib, jpeg, png
- %endif
- %if "%{with_zlib}" == "yes"
- BuildPreReq: zlib
- %endif
- %if "%{with_bzip2}" == "yes"
- BuildPreReq: bzip2
- %endif
- %if "%{with_openssl}" == "yes"
- BuildPreReq: openssl
- %endif
- %if "%{with_openldap}" == "yes"
- BuildPreReq: openldap
- %if "%{with_openldapsasl}" == "yes"
- BuildPreReq: openldap::with_sasl = yes
- %else
- BuildPreReq: openldap::with_sasl = no
- %endif
- %endif
- %if "%{with_mm}" == "yes"
- BuildPreReq: mm
- %endif
- %if "%{with_pcre}" == "yes"
- BuildPreReq: pcre
- %endif
- %if "%{with_java}" == "yes"
- BuildPreReq: j2se
- %endif
- %if "%{with_freetype}" == "yes"
- BuildPreReq: freetype
- %endif
- %if "%{with_gettext}" == "yes"
- BuildPreReq: gettext, libiconv
- %endif
- %if "%{with_imap}" == "yes"
- BuildPreReq: imap, openssl
- %endif
- %if "%{with_xml}" == "yes"
- BuildPreReq: expat
- %endif
- %if "%{with_dom}" == "yes"
- BuildPreReq: libxml, libxslt
- %endif
- %if "%{with_curl}" == "yes"
- BuildPreReq: curl
- %endif
- %if "%{with_mhash}" == "yes"
- BuildPreReq: mhash
- %endif
- %if "%{with_gdbm}" == "yes"
- BuildPreReq: gdbm, gdbm::with_ndbm = yes
- %endif
- %if "%{with_oci7}" == "yes" || "%{with_oci8}" == "yes"
- BuildPreReq: ORACLE
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- PHP is an HTML-embedded scripting language. Much of its syntax is
- borrowed from C, Java and Perl with a couple of unique PHP-specific
- features thrown in. The goal of the language is to allow web
- developers to write dynamically generated pages quickly.
- This is the Command Line Interface (CLI) version, intended for
- use in the "shebang" line ("#!%{l_prefix}/bin/php") of stand-alone
- webserver-independent CGI scripts.
- %prep
- %setup -q
- %patch -p1
- %build
- cflags="%{l_cflags -O}"
- ldflags=""
- libs=""
- %if "%{with_gdbm}" == "yes"
- cflags="$cflags -I%{l_prefix}/include"
- ldflags="$ldflags -L%{l_prefix}/lib"
- libs="$libs -lndbm -lgdbm"
- %endif
- %if "%{with_oci7}" == "yes" || "%{with_oci8}" == "yes"
- ORACLE_HOME="`%{l_prefix}/etc/rc --query oracle_home`"
- export ORACLE_HOME
- %endif
- %if "%{with_openldap}" == "yes" && "%{with_openldapsasl}" == "yes"
- libs="$libs -lsasl2"
- %endif
- CC="%{l_cc}" \
- CFLAGS="$cflags" \
- LDFLAGS="$ldflags" \
- LIBS="$libs" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-config-file-path=%{l_prefix}/etc/php \
- %if "%{with_calendar}" == "yes"
- --enable-calendar \
- %endif
- %if "%{with_mysql}" == "yes"
- --with-mysql=%{l_prefix} \
- %else
- --without-mysql \
- %endif
- %if "%{with_gd}" == "yes"
- --with-gd=%{l_prefix} \
- --with-jpeg-dir=%{l_prefix} \
- --with-png-dir=%{l_prefix} \
- %endif
- %if "%{with_freetype}" == "yes"
- --enable-gd-imgstrttf \
- --enable-gd-native-ttf \
- --with-freetype-dir=%{l_prefix} \
- %endif
- %if "%{with_db}" == "yes"
- --with-db3=%{l_prefix} \
- %endif
- %if "%{with_debug}" == "yes"
- --with-debug=yes \
- %else
- --with-debug=no \
- %endif
- %if "%{with_zlib}" == "yes"
- --with-zlib=%{l_prefix} \
- --with-zlib-dir=%{l_prefix} \
- %endif
- %if "%{with_bzip2}" == "yes"
- --with-bz2=%{l_prefix} \
- %endif
- %if "%{with_pdflib}" == "yes"
- --with-pdflib=%{l_prefix} \
- --with-jpeg-dir=%{l_prefix} \
- --with-png-dir=%{l_prefix} \
- %endif
- %if "%{with_openssl}" == "yes" || "%{with_openldap}" == "yes"
- --with-openssl=%{l_prefix} \
- %endif
- %if "%{with_openldap}" == "yes"
- --with-ldap=%{l_prefix} \
- %endif
- %if "%{with_mm}" == "yes"
- --with-mm=%{l_prefix} \
- --enable-session \
- %endif
- %if "%{with_pcre}" == "yes"
- --with-pcre=%{l_prefix} \
- %endif
- %if "%{with_ftp}" == "yes"
- --enable-ftp \
- %endif
- %if "%{with_java}" == "yes"
- --with-java=%{l_prefix}/libexec/j2se \
- %endif
- %if "%{with_oci7}" == "yes"
- --with-oracle \
- %endif
- %if "%{with_oci8}" == "yes"
- --with-oci8 \
- %endif
- %if "%{with_gettext}" == "yes"
- --with-gettext=%{l_prefix} \
- %endif
- %if "%{with_imap}" == "yes"
- --with-imap=%{l_prefix} \
- --with-imap-ssl=%{l_prefix} \
- %endif
- %if "%{with_xml}" == "yes"
- --with-xml=%{l_prefix} \
- %endif
- %if "%{with_dom}" == "yes"
- --with-dom=%{l_prefix} \
- --with-dom-xslt=%{l_prefix} \
- --with-dom-exslt=%{l_prefix} \
- %endif
- %if "%{with_wddx}" == "yes"
- --enable-wddx \
- %endif
- %if "%{with_bc}" == "yes"
- --enable-bcmath \
- %endif
- %if "%{with_transsid}" == "yes"
- --enable-trans-sid \
- %endif
- %if "%{with_mhash}" == "yes"
- --with-mhash=%{l_prefix} \
- %endif
- %if "%{with_curl}" == "yes"
- --with-curl=%{l_prefix} \
- %endif
- %if "%{with_gdbm}" == "yes"
- --with-gdbm=%{l_prefix} \
- %endif
- %if "%{with_versioning}" == "yes"
- --enable-versioning \
- %endif
- --enable-cli \
- %if "%{with_pear}" == "yes"
- --with-pear \
- %else
- --without-pear \
- %endif
- --enable-force-cgi-redirect \
- --enable-discard-path \
- --enable-track-vars
- %{l_make} %{l_mflags}
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/cgi \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php \
- $RPM_BUILD_ROOT%{l_prefix}/include/php/main \
- $RPM_BUILD_ROOT%{l_prefix}/include/php/Zend \
- $RPM_BUILD_ROOT%{l_prefix}/include/php/TSRM \
- $RPM_BUILD_ROOT%{l_prefix}/include/php/regex \
- $RPM_BUILD_ROOT%{l_prefix}/lib/php
- %{l_shtool} install -c -s -m 755 \
- sapi/cli/php \
- $RPM_BUILD_ROOT%{l_prefix}/cgi/
- ln $RPM_BUILD_ROOT%{l_prefix}/cgi/php \
- $RPM_BUILD_ROOT%{l_prefix}/bin/php
- %{l_shtool} install -c -m 644 /dev/null \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php/php.ini
- %{l_shtool} install -c -m 644 /dev/null \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php/php.ini
- %{l_shtool} install -c -m 644 \
- *.h include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/php/
- %{l_shtool} install -c -m 644 \
- main/*.h $RPM_BUILD_ROOT%{l_prefix}/include/php/main/
- %{l_shtool} install -c -m 644 \
- Zend/*.h $RPM_BUILD_ROOT%{l_prefix}/include/php/Zend/
- %{l_shtool} install -c -m 644 \
- TSRM/*.h $RPM_BUILD_ROOT%{l_prefix}/include/php/TSRM/
- %{l_shtool} install -c -m 644 \
- regex/*.h $RPM_BUILD_ROOT%{l_prefix}/include/php/regex/
- %if "%{with_pear}" == "yes"
- ( cd $RPM_BUILD_DIR/%{name}-%{version}/pear
- export INSTALL_ROOT=$RPM_BUILD_ROOT
- $RPM_BUILD_ROOT%{l_prefix}/bin/php -n -dsafe_mode=0 \
- install-pear.php package-*.xml
- $RPM_BUILD_ROOT%{l_prefix}/bin/php -n -dsafe_mode=0 \
- install-pear.php packages/*.tar
- ) || exit 1
- %endif
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
- '%config %{l_prefix}/etc/php/php.ini' \
- '%dir %attr(0755,%{l_musr},%{l_mgrp}) %{l_prefix}/lib/php' \
- '%not %dir %attr(0644,%{l_musr},%{l_mgrp}) %{l_prefix}/lib/php'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|