* Fri Aug 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 5.2.3-7
- add php-embedded sub-package
This commit is contained in:
parent
534a341039
commit
39f5d835fa
41
php-5.2.3-embed.patch
Normal file
41
php-5.2.3-embed.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
diff -up php-5.2.3/sapi/embed/config.m4.embed php-5.2.3/sapi/embed/config.m4
|
||||||
|
--- php-5.2.3/sapi/embed/config.m4.embed 2005-05-07 04:51:53.000000000 +0200
|
||||||
|
+++ php-5.2.3/sapi/embed/config.m4 2007-08-10 13:46:30.000000000 +0200
|
||||||
|
@@ -11,7 +11,7 @@ AC_ARG_ENABLE(embed,
|
||||||
|
case $enableval in
|
||||||
|
yes|shared)
|
||||||
|
PHP_EMBED_TYPE=shared
|
||||||
|
- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
|
||||||
|
+ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(INSTALL) -m 0755 libs/libphp5-$PHP_VERSION.$SHLIB_DL_SUFFIX_NAME \$(INSTALL_ROOT)\$(libdir); \$(LN_S) libphp5-$PHP_VERSION.$SHLIB_DL_SUFFIX_NAME \$(INSTALL_ROOT)\$(libdir)/libphp5.$SHLIB_DL_SUFFIX_NAME"
|
||||||
|
;;
|
||||||
|
static)
|
||||||
|
PHP_EMBED_TYPE=static
|
||||||
|
diff -up php-5.2.3/Makefile.global.embed php-5.2.3/Makefile.global
|
||||||
|
--- php-5.2.3/Makefile.global.embed 2007-08-10 13:19:04.000000000 +0200
|
||||||
|
+++ php-5.2.3/Makefile.global 2007-08-10 13:27:27.000000000 +0200
|
||||||
|
@@ -14,7 +14,7 @@ all: $(all_targets)
|
||||||
|
build-modules: $(PHP_MODULES)
|
||||||
|
|
||||||
|
libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||||
|
- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||||
|
+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) -release $(PHP_VERSION) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
|
||||||
|
-@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1
|
||||||
|
|
||||||
|
libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
|
||||||
|
@@ -25,13 +25,9 @@ install: $(all_targets) $(install_target
|
||||||
|
install-sapi: $(OVERALL_TARGET)
|
||||||
|
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
|
||||||
|
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
|
||||||
|
- -@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); then \
|
||||||
|
- for i in 0.0.0 0.0 0; do \
|
||||||
|
- if test -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i; then \
|
||||||
|
- $(LN_S) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
|
||||||
|
- break; \
|
||||||
|
- fi; \
|
||||||
|
- done; \
|
||||||
|
+ -@if test ! -r $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME) -a \
|
||||||
|
+ -r $(phptempdir)/libphp5-$(PHP_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
|
||||||
|
+ $(LN_S) $(phptempdir)/libphp5-$(PHP_VERSION).$(SHLIB_DL_SUFFIX_NAME) $(phptempdir)/libphp5.$(SHLIB_DL_SUFFIX_NAME); \
|
||||||
|
fi
|
||||||
|
@$(INSTALL_IT)
|
||||||
|
|
42
php.spec
42
php.spec
@ -6,7 +6,7 @@
|
|||||||
Summary: The PHP HTML-embedded scripting language
|
Summary: The PHP HTML-embedded scripting language
|
||||||
Name: php
|
Name: php
|
||||||
Version: 5.2.3
|
Version: 5.2.3
|
||||||
Release: 6
|
Release: 7
|
||||||
License: PHP
|
License: PHP
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
URL: http://www.php.net/
|
URL: http://www.php.net/
|
||||||
@ -21,6 +21,7 @@ Patch2: php-4.3.3-install.patch
|
|||||||
Patch3: php-5.0.4-norpath.patch
|
Patch3: php-5.0.4-norpath.patch
|
||||||
Patch5: php-5.0.2-phpize64.patch
|
Patch5: php-5.0.2-phpize64.patch
|
||||||
Patch8: php-5.2.0-includedir.patch
|
Patch8: php-5.2.0-includedir.patch
|
||||||
|
Patch9: php-5.2.3-embed.patch
|
||||||
|
|
||||||
# Fixes for extension modules
|
# Fixes for extension modules
|
||||||
Patch21: php-4.3.1-odbc.patch
|
Patch21: php-4.3.1-odbc.patch
|
||||||
@ -332,6 +333,17 @@ add MSSQL database support to PHP. It uses the TDS (Tabular
|
|||||||
DataStream) protocol through the freetds library, hence any
|
DataStream) protocol through the freetds library, hence any
|
||||||
database server which supports TDS can be accessed.
|
database server which supports TDS can be accessed.
|
||||||
|
|
||||||
|
%package embedded
|
||||||
|
Summary: PHP library for embedding in applications
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: php-common = %{version}-%{release}
|
||||||
|
# doing a real -devel package for just the .so symlink is a bit overkill
|
||||||
|
Provides: php-embedded-devel = %{version}-%{release}
|
||||||
|
|
||||||
|
%description embedded
|
||||||
|
The php-embedded package contains a library which can be embedded
|
||||||
|
into applications to provide PHP scripting language support.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .gnusrc
|
%patch1 -p1 -b .gnusrc
|
||||||
@ -339,6 +351,7 @@ database server which supports TDS can be accessed.
|
|||||||
%patch3 -p1 -b .norpath
|
%patch3 -p1 -b .norpath
|
||||||
%patch5 -p1 -b .phpize64
|
%patch5 -p1 -b .phpize64
|
||||||
%patch8 -p1 -b .includedir
|
%patch8 -p1 -b .includedir
|
||||||
|
%patch9 -p1 -b .embed
|
||||||
|
|
||||||
%patch21 -p1 -b .odbc
|
%patch21 -p1 -b .odbc
|
||||||
%patch22 -p1 -b .shutdown
|
%patch22 -p1 -b .shutdown
|
||||||
@ -357,8 +370,9 @@ cp TSRM/LICENSE TSRM_LICENSE
|
|||||||
cp regex/COPYRIGHT regex_COPYRIGHT
|
cp regex/COPYRIGHT regex_COPYRIGHT
|
||||||
cp ext/gd/libgd/README gd_README
|
cp ext/gd/libgd/README gd_README
|
||||||
|
|
||||||
# Source is built twice: once for /usr/bin/php, once for the Apache DSO.
|
# Source is built trice: once for /usr/bin/php, once for the Apache DSO
|
||||||
mkdir build-cgi build-apache
|
# and once for inclusion as embedded script language into other programs
|
||||||
|
mkdir build-cgi build-apache build-embedded
|
||||||
|
|
||||||
# Remove bogus test; position of read position after fopen(, "a+")
|
# Remove bogus test; position of read position after fopen(, "a+")
|
||||||
# is not defined by C standard, so don't presume anything.
|
# is not defined by C standard, so don't presume anything.
|
||||||
@ -521,6 +535,17 @@ build --with-apxs2=%{_sbindir}/apxs \
|
|||||||
--disable-json
|
--disable-json
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Build for inclusion as embedded script language into applications,
|
||||||
|
# /usr/lib[64]/libphp5.so
|
||||||
|
pushd build-embedded
|
||||||
|
build --enable-embed \
|
||||||
|
--without-mysql --without-gd \
|
||||||
|
--without-odbc --disable-dom \
|
||||||
|
--disable-dba --without-unixODBC \
|
||||||
|
--disable-pdo --disable-xmlreader --disable-xmlwriter \
|
||||||
|
--disable-json
|
||||||
|
popd
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd build-apache
|
cd build-apache
|
||||||
# Run tests, using the CLI SAPI
|
# Run tests, using the CLI SAPI
|
||||||
@ -547,6 +572,9 @@ make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT
|
|||||||
# Install the Apache module
|
# Install the Apache module
|
||||||
make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
|
make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Install the version for embedded script language in applications
|
||||||
|
make -C build-embedded install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Install the default configuration file and icons
|
# Install the default configuration file and icons
|
||||||
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/
|
install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||||
install -m 644 $RPM_SOURCE_DIR/php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
|
install -m 644 $RPM_SOURCE_DIR/php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
|
||||||
@ -659,6 +687,11 @@ rm files.* macros.php
|
|||||||
%{_mandir}/man1/phpize.1*
|
%{_mandir}/man1/phpize.1*
|
||||||
%config %{_sysconfdir}/rpm/macros.php
|
%config %{_sysconfdir}/rpm/macros.php
|
||||||
|
|
||||||
|
%files embedded
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/libphp5.so
|
||||||
|
%{_libdir}/libphp5-%{version}.so
|
||||||
|
|
||||||
%files pgsql -f files.pgsql
|
%files pgsql -f files.pgsql
|
||||||
%files mysql -f files.mysql
|
%files mysql -f files.mysql
|
||||||
%files odbc -f files.odbc
|
%files odbc -f files.odbc
|
||||||
@ -680,6 +713,9 @@ rm files.* macros.php
|
|||||||
%files mssql -f files.mssql
|
%files mssql -f files.mssql
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 5.2.3-7
|
||||||
|
- add php-embedded sub-package
|
||||||
|
|
||||||
* Fri Aug 10 2007 Joe Orton <jorton@redhat.com> 5.2.3-6
|
* Fri Aug 10 2007 Joe Orton <jorton@redhat.com> 5.2.3-6
|
||||||
- fix build with new glibc
|
- fix build with new glibc
|
||||||
- fix License
|
- fix License
|
||||||
|
Loading…
Reference in New Issue
Block a user