OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 27-Nov-2003 13:49:48
Branch: HEAD Handle: 2003112712494701
Modified files:
openpkg-src/php php.spec
openpkg-web news.txt
Log:
Completely overhaul PHP packaging:
- use vendor installation procedure to simplify packaging
- add CLI and CGI support and install both binaries
- fix file attribute adjustments
- enable with_xml on with_pear to fix building
- fix path to pear.conf
Summary:
Revision Changes Path
1.64 +38 -40 openpkg-src/php/php.spec
1.7559 +1 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/php/php.spec
============================================================================
$ cvs diff -u -r1.63 -r1.64 php.spec
--- openpkg-src/php/php.spec 4 Nov 2003 09:37:01 -0000 1.63
+++ openpkg-src/php/php.spec 27 Nov 2003 12:49:48 -0000 1.64
@@ -33,7 +33,7 @@
Group: Language
License: PHP
Version: 4.3.4
-Release: 20031104
+Release: 20031127
# package options (analog to apache.spec)
%option with_calendar no
@@ -70,6 +70,10 @@
%option with_snmp no
# fixing implicit inter-module dependencies and correlations
+%if "%{with_pear}" == "yes"
+%undefine with_xml
+%define with_xml yes
+%endif
%if "%{with_freetype}" == "yes"
%undefine with_gd
%define with_gd yes
@@ -194,14 +198,17 @@
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.
+ This is the Command Line Interface (CLI) and Common Gateway
+ Interface (CGI) version of PHP, intended for use in the "shebang"
+ line ("#!%{l_prefix}/bin/php") of stand-alone PHP based programs
+ and for use in the "shebang" line ("#!%{l_prefix}/cgi/php") of
+ stand-alone webserver-independent CGI scripts.
%prep
%setup -q
%build
+ # configure package
cflags="%{l_cflags -O}"
ldflags=""
libs=""
@@ -237,6 +244,7 @@
PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
./configure \
--prefix=%{l_prefix} \
+ --sysconfdir=%{l_prefix}/etc/php \
--with-config-file-path=%{l_prefix}/etc/php \
%if "%{with_calendar}" == "yes"
--enable-calendar \
@@ -345,7 +353,6 @@
%if "%{with_versioning}" == "yes"
--enable-versioning \
%endif
- --enable-cli \
%if "%{with_pear}" == "yes"
--with-pear \
%else
@@ -354,54 +361,45 @@
%if "%{with_snmp}" == "yes"
--with-snmp=%{l_prefix} \
%endif
+ --enable-cli \
+ --enable-cgi \
--enable-force-cgi-redirect \
--enable-discard-path \
--enable-track-vars
+
+ # build package
%{l_make} %{l_mflags}
%install
+ # install package
rm -rf $RPM_BUILD_ROOT
+ %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
+
+ # install CLI version
+ # ("make install" incorrectly installs the CGI version into bin/php!)
%{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
+ $RPM_BUILD_ROOT%{l_prefix}/man/man1
%{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
+ sapi/cli/php $RPM_BUILD_ROOT%{l_prefix}/bin/
+ %{l_shtool} install -c -m 644 \
+ sapi/cli/php.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
+
+ # (re)install CGI version
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/cgi
+ %{l_shtool} install -c -s -m 755 \
+ sapi/cgi/php $RPM_BUILD_ROOT%{l_prefix}/cgi/
+
+ # install default configuration file
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/php
%{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/php-%{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
+
+ # determine installation files
%{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'
+ '%config %{l_prefix}/etc/php/*'
%files -f files
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.7558 -r1.7559 news.txt
--- openpkg-web/news.txt 27 Nov 2003 12:06:37 -0000 1.7558
+++ openpkg-web/news.txt 27 Nov 2003 12:49:47 -0000 1.7559
@@ -1,3 +1,4 @@
+27-Nov-2003: Upgraded package: P<php-4.3.4-20031127>
27-Nov-2003: Upgraded package: P<apache-1.3.29-20031127>
27-Nov-2003: New package: P<distcc-2.11.2-20031127>
27-Nov-2003: Upgraded package: P<gcc34-3.4s20031126-20031127>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]