--- php.spec 2005-10-28 04:40:23 +0400 +++ php.my.spec 2005-11-17 00:21:55 +0300 @@ -71,7 +71,7 @@ # Automatically added by buildreq on Fri Oct 28 2005 (-bi) BuildRequires: alternatives chrpath flex libexpat-devel libmm-devel libpcre-devel -BuildRequires: termutils zlib-devel +BuildRequires: termutils zlib-devel sed %description PHP4 is an HTML-embeddable scripting language. PHP offers built-in database @@ -158,6 +158,8 @@ # Build CLI version export oldstyleextdir=yes export EXTENSION_DIR=%php_libdir/extensions +%__subst s@PHP_PCRE_REGEX/lib@PHP_PCRE_REGEX/%_lib@ configure +%__subst s@/lib/libexpat@/%_lib/libexpat@g configure %configure \ --prefix=%_prefix \ @@ -200,6 +202,8 @@ --with-expat-dir=%_usr \ --without-pear +%__subst s@/lib/php/@/%_lib/php/@ Makefile.fragments +%__subst s@/lib/php/@/%_lib/php/@ Makefile # PHP4's configuration system does not respect $prefix, we need to override # all variables in order to install package in a safe manner BUILD_ENV_VARS="top_srcdir=%_builddir/%php_name \ @@ -296,6 +300,15 @@ %__cp -dpR main/internal_functions.c %buildroot%prefix/src/php-devel/sapi/BUILD %__cp -dpR include %buildroot%prefix/src/php-devel/sapi/BUILD +# Fix x86_64 phpize +%__subst s@ix/lib/@ix/%_lib/@ %buildroot%_bindir/phpize + +# Fix library paths for x86_64 +%__subst s@/usr/lib@%_libdir@g %buildroot/%php_sysconfdir/%php_sapi/php.ini +%__subst s@/usr/lib@%_libdir@g %buildroot/%_sysconfdir/control.d/facilities/php4_%php_sapi + + + %triggerpostun -n php -- php < 1:4.3.12-alt0.cvs20050530 if ! grep -qs "\" "%php_sysconfdir/%php_sapi/php.ini"; then printf '\n%%s\n' 'alt_sapi_config_ini_scan_dir = "/etc/php/%php_version/cli/php.d"' >> "%php_sysconfdir/%php_sapi/php.ini"