Hi. I have tampered some more with php. If for some reason a installed module is faulty, we get the error below in %install. The fix plus some other fixes are applied to this mail. I have rebuilt all php stuff on my ML9.0 WS at home and it seems to work ok (except php-recode?), the packages can be found here: http://d-srv.com/9.0/
Also please do try this funny script (with php-cpdf): http://d-srv.com/9.0/pdf_clock.php Here's my current phpinfo.html page: http://d-srv.com/9.0/phpinfo.html The error: Installing PHP SAPI module Installing shared extensions: /home/root/RPM/temp/php-4.3.0/usr/lib/php/extensions/ Installing PEAR environment: /home/root/RPM/temp/php-4.3.0/usr/share/pear/ Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry Failed to find local cache entry [PEAR] Archive_Tar - installed: 0.9 [PEAR] Console_Getopt - installed: 1.0 Failed to find local cache entry [PEAR] PEAR - installed: 1.0b3 make[1]: *** [install-pear-installer] Segmentation fault make: *** [install-pear] Error 2 error: Bad exit status from /home/root/RPM/temp/rpm-tmp.80297 (%install) Chears. -- Regards // Oden Eriksson, Deserve-IT.com
--- php.spec 2003-01-12 19:29:00.000000000 +0100 +++ php.spec.oden 2003-01-12 22:23:33.000000000 +0100 @@ -1,8 +1,32 @@ +# OE: conditional switches +# +#(ie. use with rpm --rebuild): +# +# --with debug Compile with debugging code +# +# enable build with debugging code: will _not_ strip away any debugging code, +# will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to +# configure. + +%define build_debug 0 + +# commandline overrides: +# rpm -ba|--rebuild --with 'xxx' +%{?_with_debug: %{expand: %%define build_debug 1}} + +%if %{build_debug} +# disable build root strip policy +%define __spec_install_post %{_libdir}/rpm/brp-compress || : + +# This gives extra debuggin and huge binaries +%{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')} +%endif + %define phpdir %{_libdir}/php %define peardir %{_datadir}/pear %define libversion 430 %define phpversion 4.3.0 -%define phprelease 3mdk +%define phprelease 4mdk #The external_modules definition has been put in the %%build section #to clean things a bit @@ -47,6 +71,12 @@ systems, so writing a database-enabled script with PHP is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts. +You can build %{name} with some conditional build swithes; + +(ie. use with rpm --rebuild): +--with debug Compile with debugging code + + %package cli Group: Development/Other Summary: Command-line interface to PHP @@ -162,7 +192,6 @@ SELF-CONTAINED-EXTENSIONS. %prep -[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %setup -q %patch0 -p1 @@ -197,6 +226,12 @@ rm -f php-devel/extensions/skeleton/EXPERIMENTAL rm -f php-devel/extensions/ncurses/EXPERIMENTAL +# don't ship MS Windows source +rm -rf php-devel/extensions/com +rm -rf php-devel/extensions/dotnet +rm -rf php-devel/extensions/printer +rm -rf php-devel/extensions/w32api + cp -dpR sapi/* php-devel/sapi/ rm -f php-devel/sapi/thttpd/stub.c rm -f php-devel/sapi/cgi/php.sym @@ -208,16 +243,15 @@ cat > php-devel/buildext <<EOF #!/bin/bash gcc -fPIC -shared %{optflags} \\ - -I. \\ - -I/usr/include/php \\ - -I/usr/include/php/Zend \\ - -I/usr/include/php/TSRM \\ - -I/usr/include/php/main \\ + -I. \`%{_bindir}/php-config --includes\` \\ -I/usr/include/freetype \\ + -I/usr/include/openssl \\ -I/usr/include/\$1 \\ \$4 \$2 -o \$1.so \$3 -lc EOF +chmod 755 php-devel/buildext + cat > php-devel/PHP_BUILD <<EOF %%global phpdir %{phpdir} %%global peardir %{peardir} @@ -226,8 +260,6 @@ %%global phprelease %{phprelease} EOF -chmod 755 php-devel/buildext - %build # OE: we should run buildconf if applied patches changes the configure stuff... @@ -249,7 +281,7 @@ ############################################################################# # Yes I know..., some of these names are mandrake specific. # JMD: put mysql, pgsql ... ldap first, so people will see them first. -%define external_modules mysql pgsql gd imap ldap bcmath bz2 calendar com cpdf crack curl cyrus db dba_bundle dbase dbx dio domxml dotnet exif fbsql fdftk filepro fribidi gmp hwapi hyperwave iconv informix ingres_ii interbase ircg java mcrypt mbstring mhash mime_magic ming mnogosearch msession msql mssql ncurses notes oci8 odbc oracle ovrimos pcntl pdf pfpro pspell qtdom readline recode rpc shmop snmp sockets swf sybase sybase_ct sysvmsg wddx xml xmlrpc xslt yaz zip +%define external_modules mysql pgsql gd imap ldap bcmath bz2 calendar cpdf crack curl cyrus db dba dba_bundle dbase dbx dio domxml exif fbsql fdf filepro fribidi gmp hwapi hyperwave iconv imagick informix ingres_ii interbase ircg java mbstring mcal mcrypt mcve mhash mime_magic ming mnogosearch msession msql mssql ncurses notes oci8 odbc oracle overload ovrimos pam_auth pcntl pdf pfpro pgsql posix pspell qtdom readline recode shmop snmp sockets swf sybase sybase_ct sysvmsg tokenizer wddx xml xmlrpc xslt yaz zip #DO NOT PUT THESE EXTENSIONS AS EXTERNAL: # Here are reasons for each extension @@ -307,8 +339,10 @@ --with-config-file-scan-dir=%{_sysconfdir}/php \ --with-pear=%{peardir} \ --enable-magic-quotes \ +%if %{build_debug} + --enable-maintainer-mode \ +%endif --enable-debugger \ - --with-openssl \ --enable-track-vars \ --with-exec-dir=%{_bindir} \ --with-versioning \ @@ -317,23 +351,20 @@ --enable-track-vars \ --enable-trans-sid \ --enable-safe-mode \ - --with-ctype \ - --with-ttf \ - --with-freetype-dir=%{_prefix} \ - --with-zlib \ + --enable-ctype \ + --enable-ftp \ + --enable-gettext=%{_prefix} \ + --enable-posix \ + --enable-session \ --enable-sysvsem \ --enable-sysvshm \ --enable-yp \ - --enable-ftp \ - --with-gettext \ - --without-aspell \ + --with-openssl=%{_prefix} \ --without-kerberos \ - --without-dba \ - --without-db2 \ - --without-db3 \ - --without-db4 \ + --with-ttf --with-freetype-dir=%{_prefix} --with-zlib=%{_prefix} \ + --with-zlib=%{_prefix} --with-zlib-dir=%{_prefix} \ `for i in %{external_modules}; do echo --without-${i} --disable-${i}; done` \ - --without-gdbm + --without-dba --without-gdbm --without-ndbm --without-db2 --without-db3 --without-db4 --without-dbm --without-cdb --without-flatfile ### This configuration makes a dependency on those libs: # -ldl -lpam -lcrypt -lresolv -lm -lz @@ -357,14 +388,21 @@ ./php-killrpath sapi/cli/php ./php-killrpath sapi/cgi/php + %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} -mv libphp_common.so libphp_common.so.430 -ln -s libphp_common.so.430 libphp_common.so +# OE: make this somewhat short-circuitable +if ! [ -f libphp_common.so.430 ]; then + mv libphp_common.so libphp_common.so.430 + ln -s libphp_common.so.430 libphp_common.so +fi + export LD_LIBRARY_PATH="." export INSTALL_ROOT="$RPM_BUILD_ROOT" export PHP_PEAR_INSTALL_DIR="%{peardir}" +touch php.ini +export PHPRC="." make install mkdir -p %{buildroot}%{_libdir} @@ -390,6 +428,7 @@ ln -s extensions ext rm -rf %{buildroot}%{peardir} +rm -f %{buildroot}%{_bindir}/pear %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} @@ -433,7 +472,7 @@ %files -n php%{libversion}-devel %defattr(-,root,root) -%doc SELF-CONTAINED-EXTENSIONS CODING_STANDARDS README.* TODO +%doc SELF-CONTAINED-EXTENSIONS CODING_STANDARDS README.* TODO EXTENSIONS %doc Zend/ZEND_* %{_bindir}/php-config %{_bindir}/phpextdist @@ -448,6 +487,16 @@ %{_libdir}/*.so %changelog +* Sun Jan 12 2003 Oden Eriksson <[EMAIL PROTECTED]> 4.3.0-4mdk +- added overload, imagick, pam_auth and tokenizer to the EXTENSIONS HACK, + this prevents overload and tokenizer to be built in. +- enable build with debugging code, used ideas from the apache2 package +- fix the buildext script +- remove aspell (it's gone) +- ignore all MS stuff +- force php to load dummy php.ini in %%install +- misc spec file fixes + * Thu Jan 09 2003 Oden Eriksson <[EMAIL PROTECTED]> 4.3.0-3mdk - added P7 (db4 support from CVS) Yihaa!