| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- ##
- ## php3.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## 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: php3
- Summary: Personal HomePage (PHP)
- URL: http://www.php.net/
- Vendor: The PHP Project
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: EVAL
- Group: Language
- License: PHP
- Version: 3.0.18
- Release: 20040203
- # package options
- %option with_mysql no
- %option with_pgsql no
- %option with_gd no
- %option with_bdb no
- %option with_zlib no
- %option with_ssl no
- %option with_ftp no
- # fixing implicit inter-module dependencies and correlations
- %if "%{with_mysql}" == "yes" || "%{with_gd}" == "yes"
- %undefine with_zlib
- %define with_zlib yes
- %endif
- %if "%{with_pgsql}" == "yes"
- %undefine with_ssl
- %define with_ssl yes
- %endif
- # list of sources
- Source0: http://www.php.net/distributions/php-%{version}.tar.gz
- Patch0: http://static.php.net/www.php.net/distributions/mime.c.diff-3.0.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, flex, bison
- PreReq: OpenPKG, openpkg >= 20040130, MTA
- BuildPreReq: gdbm
- PreReq: gdbm
- %if "%{with_mysql}" == "yes"
- BuildPreReq: mysql
- PreReq: mysql
- %endif
- %if "%{with_pgsql}" == "yes"
- BuildPreReq: postgresql
- PreReq: postgresql
- %endif
- %if "%{with_gd}" == "yes"
- BuildPreReq: gd, jpeg, png
- PreReq: gd, jpeg, png
- %endif
- %if "%{with_bdb}" == "yes"
- BuildPreReq: db
- PreReq: db
- %endif
- %if "%{with_zlib}" == "yes"
- BuildPreReq: zlib
- PreReq: zlib
- %endif
- %if "%{with_ssl}" == "yes"
- BuildPreReq: openssl
- PreReq: openssl
- %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 Common Gateway Interface (CGI) version of PHP, intended
- for use in the "shebang" line ("#!%{l_prefix}/cgi/php") of
- stand-alone webserver-independent CGI scripts.
- THIS IS THE ALREADY DEPRECATED VERSION 3.x OF PHP.
- USE IT IN A PRODUCTION ENVIRONMENT ON YOUR OWN RISK ONLY.
- %track
- prog php3 = {
- version = 3.0.18
- url = http://www.php.net/releases.php
- regex = php-(3.\d+\.\d+)\.tar\.gz
- }
- %prep
- %setup -q -n php-%{version}
- cd functions
- %patch -p0
- %build
- # configure package
- cflags="%{l_cflags -O}"
- cppflags="%{l_cppflags}"
- ldflags="%{l_ldflags}"
- libs="-lgdbm"
- %if "%{with_gd}" == "yes"
- libs="$libs -lpng -lz"
- %endif
- %if "%{with_bdb}" == "yes"
- libs="$libs -ldb"
- %endif
- CC="%{l_cc}" \
- CFLAGS="$cflags" \
- CPPFLAGS="$cppflags" \
- LDFLAGS="$ldflags" \
- LIBS="$libs" \
- PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
- ./configure \
- --prefix=%{l_prefix} \
- --sysconfdir=%{l_prefix}/etc/php3 \
- --with-config-file-path=%{l_prefix}/etc/php3 \
- %if "%{with_mysql}" == "yes"
- --with-mysql=%{l_prefix} \
- %else
- --without-mysql \
- %endif
- %if "%{with_pgsql}" == "yes"
- --with-pgsql=%{l_prefix} \
- %else
- --without-pgsql \
- %endif
- %if "%{with_gd}" == "yes"
- --with-gd=%{l_prefix} \
- --with-jpeg-dir=%{l_prefix} \
- --with-png-dir=%{l_prefix} \
- %endif
- %if "%{with_bdb}" == "yes"
- --with-db4=%{l_prefix} \
- %endif
- %if "%{with_zlib}" == "yes"
- --with-zlib=%{l_prefix} \
- --with-zlib-dir=%{l_prefix} \
- %endif
- %if "%{with_ssl}" == "yes"
- --with-openssl=%{l_prefix} \
- %endif
- %if "%{with_ftp}" == "yes"
- --enable-ftp \
- %else
- --disable-ftp \
- %endif
- --without-apache \
- --enable-force-cgi-redirect \
- --enable-discard-path \
- --enable-track-vars \
- --enable-memory-limit
- # build package
- %{l_make} %{l_mflags -O}
- %install
- # install package
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/cgi \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php3
- %{l_shtool} install -c -s -m 755 \
- php $RPM_BUILD_ROOT%{l_prefix}/cgi/php3
- # install default configuration file
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php3
- %{l_shtool} install -c -m 644 /dev/null \
- $RPM_BUILD_ROOT%{l_prefix}/etc/php3/php.ini
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
- '%config %{l_prefix}/etc/php3/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|