Репозитории ALT
5.1: | 5.2.14.20100721-alt0.M51.1 |
4.1: | 5.2.5-alt1.M41.3 |
4.0: | 5.2.2-alt1 |
3.0: | 5.0.5-alt0.cvs20050729 |
Группа :: Разработка/Прочее
Пакет: php5
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define php5_sapi cli
%def_with interbase
Summary: The PHP5 scripting language
Name: %php5_name
Version: %php5_version
Release: %php5_release
License: PHP
Group: Development/Other
Source0: php5-source.tar.bz2
Source1: php5-control.tar.bz2
Source2: php-packaging.readme
Source3: php.ini
Patch1: php-version.patch
Patch2: php-cli-build.patch
Patch3: php-shared-1.patch
Patch4: php-remove-sendmail.patch
Patch5: php-4.0.0-init.patch
Patch6: php-test-pcntl.patch
Patch7: php5-5.1.3-alt-timelib-headers.patch
Patch9: php-sapi-scandir.patch
# SAPI patch
Patch10: php-alt-remove-hardcoded_ini.patch
Patch11: php-sapi-cli.patch
Patch12: php-devel-scripts-alternatives.patch
Patch13: php-4.3.11-dlopen.patch
# http://www.zend.com/zend/spotlight/error.php#Heading19
Patch14: php-4.3.10-alt-division-by-zero.patch
# http://www.hardened-php.net/suhosin/
Patch15: suhosin-patch-%version-0.9.6.2.patch
Patch16: php5-alt-symbols.patch
Patch17: php5-5.2.5-alt-xml-expat.patch
Patch30: php-4.3.11-libtool.patch
Patch31: php-4.3.4RC3-64bit.patch
Patch32: php-5.2.1-umask.patch
Patch33: php-5.2.5-norpath.patch
Patch34: php-5.1.0b1-cxx.patch
Patch35: php-5.1.0RC4-remove_bogus_iconv_deps.patch
Patch36: php-5.2.5-lib64.patch
Patch37: php5-apache2-filters.patch
PreReq: php5-libs = %version-%release
Requires(post): php5-suhosin
Provides: php-engine = %version-%release
# Automatically added by buildreq on Mon Jul 04 2005
BuildRequires: chrpath control flex libalternatives-devel libmm-devel libxml2-devel libexpat-devel zlib-devel
BuildRequires(pre): rpm-build-php5
%if_with interbase
BuildRequires: firebird-devel
%endif
%description
PHP4 is an HTML-embeddable scripting language. PHP offers built-in database
integration for several commercial and non-commercial database management
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.
%package devel
Group: Development/C
Summary: Development package for PHP5
Requires: php5-libs = %version-%release
Requires: rpm-build-php5 = %php5_version-%php5_release
Requires: libtool, autoconf, automake, tar, gzip, coreutils, zlib-devel
Conflicts: php-devel
Provides: php-engine-devel = %version-%release
AutoReqProv: no
%description devel
The php-devel package lets you compile dynamic extensions to PHP5. Included
here is the source for the php extensions. Instead of recompiling the whole
php binary to add support for, say, oracle, install this package and use the
new self-contained extensions support. For more information, read the file
SELF-CONTAINED-EXTENSIONS.
%package libs
Group: Development/C
Summary: Package with common data for various PHP5 packages
Requires: php-base
%description libs
The php-libs package contains parts of PHP5 distribution which are in use
by other PHP5-related packages.
%prep
%setup -q -n php5-source
%setup -q -n php5-source -T -D -a1
%patch1 -p2
%patch2 -p2
%patch3 -p2
%patch4 -p2
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p2 -b .scandir
%patch10 -p2 -b .hardcoded_ini
%patch11 -p2 -b .sapi-cli
%patch12 -p2 -b .alternatives
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1 -b .sym-fix
%patch17 -p1 -b .expat
%patch30 -p0
%patch31 -p1
%patch32 -p1
%patch33 -p2
%patch34 -p0
%patch35 -p0
%patch36 -p2
%patch37 -p0
%__cp Zend/LICENSE Zend/ZEND_LICENSE
%__cp Zend/ChangeLog Zend/ZEND_ChangeLog
%__mv README.SELF-CONTAINED-EXTENSIONS SELF-CONTAINED-EXTENSIONS
%__cp -dpR %SOURCE2 .
LIBS="$LIBS -lpthread"
CFLAGS="%optflags -fPIC"
export LIBS CFLAGS
%autoreconf -I build
./buildconf --force
%build
%php5_env
%configure \
--prefix=%_prefix \
--enable-inline-optimization \
--with-pic \
\
--enable-cli \
--disable-cgi \
\
--disable-debug \
--enable-safe-mode \
--disable-magic-quotes \
--disable-rpath \
\
--enable-bcmath \
--enable-ctype \
--enable-ftp \
--enable-session \
--enable-shmop \
--enable-sysvsem \
--enable-sysvshm \
--enable-libxml \
--disable-dom \
--disable-simplexml \
--enable-hash \
--enable-xml \
--with-xml-libexpat-dir=%_libdir \
--enable-wddx \
\
--enable-shared=yes \
--enable-static=no \
\
--with-layout=GNU \
--with-exec-dir=%_bindir \
--with-zlib=%_usr \
--with-gettext=%_usr \
--with-iconv \
--without-mysql \
--with-mm=%_usr \
--without-sqlite \
--with-regex=php \
%{subst_with interbase} \
--without-pear \
#
%php5_make
%install
# XXX see https://bugzilla.altlinux.org/show_bug.cgi?id=14726
%add_findreq_skiplist %php5_libdir/build/config.guess
%php5_make_install
# All things already installed, install differences only
%__mkdir_p \
%buildroot/%php5_libdir/extensions \
%buildroot/%_bindir \
%buildroot/%php5_sysconfdir/%php5_sapi/php.d \
%buildroot/%php5_extconf \
%buildroot/%php5_servicedir/%php5_sapi \
%buildroot/%_datadir/php/%_php5_version/modules \
%buildroot/%_sysconfdir/control.d/facilities \
%buildroot/%php5_sysconfdir/%php5_sapi/control.d
%__install -m 644 %SOURCE3 %buildroot/%php5_sysconfdir/%php5_sapi/php.ini
%__install -m 644 php5-control/php.example %buildroot/%php5_sysconfdir/%php5_sapi/control.d/php.example
%__install -m 755 php5-control/php5.cli.control %buildroot/%_sysconfdir/control.d/facilities/php5-%php5_sapi
for f in \
%buildroot/%php5_sysconfdir/%php5_sapi/php.ini \
%buildroot/%_sysconfdir/control.d/facilities/php5-%php5_sapi
do
%__subst 's, at PHP_VERSION at ,%_php5_version,g' "$f"
%__subst 's, at PHP_LIBDIR at ,%_libdir/php,g' "$f"
%__subst 's, at SAPI at ,%php5_sapi,g' "$f"
done
[ -f "%buildroot/%_bindir/phpextdist" ] ||
%__cp -dpR scripts/dev/phpextdist %buildroot/%_bindir/
%__chmod 755 %buildroot/%_bindir/*
# This file is not needed by any program.
%__rm -f %buildroot/%_libdir/libphp-%_php5_version.la
# Remove RPATH
/usr/bin/chrpath --delete %buildroot/%_bindir/php-%_php5_version
# Make alternatives support.
%__install -d %buildroot/%_altdir
php_weight="$(printf %%s "%_php5_version" | sed 's,[^[:digit:]],,g')"
cat << EOF > %buildroot/%_altdir/php5
%_bindir/php %_bindir/php-%_php5_version $php_weight
%_man1dir/php.1 %_man1dir/php-%_php5_version.1 $php_weight
EOF
# Make backup some files to make devel package.
%make clean
find scripts/apache/ -type f | xargs %__chmod 644
%__mkdir_p sapi/apache/apache/
%__cp -dpR scripts/apache/* sapi/apache/apache/
%__mkdir_p %buildroot%_usrsrc/php5-devel/{ext,sapi,conf}
%__cp -dpR php.ini* %buildroot%_usrsrc/php5-devel/conf
%__cp -dpR ext/* %buildroot%_usrsrc/php5-devel/ext
%__cp -dpR sapi/* %buildroot%_usrsrc/php5-devel/sapi
# Add necessary files to build any sapi packages.
%__mkdir_p %buildroot%_usrsrc/php5-devel/sapi/BUILD
%__cp -dpR main/internal_functions.c %buildroot%_usrsrc/php5-devel/sapi/BUILD
%__cp -dpR include %buildroot%_usrsrc/php5-devel/sapi/BUILD
%post
%php5_sapi_postin
%register_alternatives php5
%preun
%php5_sapi_preun
%unregister_alternatives php5
%post libs -p %post_ldconfig
%postun libs -p %postun_ldconfig
%files
%_altdir/php5
%_bindir/php-%_php5_version
%_sysconfdir/control.d/facilities/php5-%php5_sapi
%php5_sysconfdir/%php5_sapi
%config(noreplace) %php5_sysconfdir/%php5_sapi/php.ini
%_man1dir/php-%_php5_version.1*
%doc CODING_STANDARDS CREDITS INSTALL LICENSE
%doc NEWS README.* Zend/ZEND_* TODO php.ini-* EXTENSIONS
%files libs
%dir %_sysconfdir/php/%_php5_version
%_libdir/php/%_php5_version
%_datadir/php/%_php5_version
%_libdir/libphp-%_php5_version.so
%files devel
%_bindir/php-config
%_bindir/phpize
%_bindir/phpextdist
%_includedir/php
%php5_libdir/build
%_usrsrc/php5-devel
%_man1dir/php-config.1*
%_man1dir/phpize.1*
%doc SELF-CONTAINED-EXTENSIONS php-packaging.readme
%doc tests run-tests.php
%changelog
…
Полный changelog можно просмотреть здесь
%def_with interbase
Summary: The PHP5 scripting language
Name: %php5_name
Version: %php5_version
Release: %php5_release
License: PHP
Group: Development/Other
Source0: php5-source.tar.bz2
Source1: php5-control.tar.bz2
Source2: php-packaging.readme
Source3: php.ini
Patch1: php-version.patch
Patch2: php-cli-build.patch
Patch3: php-shared-1.patch
Patch4: php-remove-sendmail.patch
Patch5: php-4.0.0-init.patch
Patch6: php-test-pcntl.patch
Patch7: php5-5.1.3-alt-timelib-headers.patch
Patch9: php-sapi-scandir.patch
# SAPI patch
Patch10: php-alt-remove-hardcoded_ini.patch
Patch11: php-sapi-cli.patch
Patch12: php-devel-scripts-alternatives.patch
Patch13: php-4.3.11-dlopen.patch
# http://www.zend.com/zend/spotlight/error.php#Heading19
Patch14: php-4.3.10-alt-division-by-zero.patch
# http://www.hardened-php.net/suhosin/
Patch15: suhosin-patch-%version-0.9.6.2.patch
Patch16: php5-alt-symbols.patch
Patch17: php5-5.2.5-alt-xml-expat.patch
Patch30: php-4.3.11-libtool.patch
Patch31: php-4.3.4RC3-64bit.patch
Patch32: php-5.2.1-umask.patch
Patch33: php-5.2.5-norpath.patch
Patch34: php-5.1.0b1-cxx.patch
Patch35: php-5.1.0RC4-remove_bogus_iconv_deps.patch
Patch36: php-5.2.5-lib64.patch
Patch37: php5-apache2-filters.patch
PreReq: php5-libs = %version-%release
Requires(post): php5-suhosin
Provides: php-engine = %version-%release
# Automatically added by buildreq on Mon Jul 04 2005
BuildRequires: chrpath control flex libalternatives-devel libmm-devel libxml2-devel libexpat-devel zlib-devel
BuildRequires(pre): rpm-build-php5
%if_with interbase
BuildRequires: firebird-devel
%endif
%description
PHP4 is an HTML-embeddable scripting language. PHP offers built-in database
integration for several commercial and non-commercial database management
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.
%package devel
Group: Development/C
Summary: Development package for PHP5
Requires: php5-libs = %version-%release
Requires: rpm-build-php5 = %php5_version-%php5_release
Requires: libtool, autoconf, automake, tar, gzip, coreutils, zlib-devel
Conflicts: php-devel
Provides: php-engine-devel = %version-%release
AutoReqProv: no
%description devel
The php-devel package lets you compile dynamic extensions to PHP5. Included
here is the source for the php extensions. Instead of recompiling the whole
php binary to add support for, say, oracle, install this package and use the
new self-contained extensions support. For more information, read the file
SELF-CONTAINED-EXTENSIONS.
%package libs
Group: Development/C
Summary: Package with common data for various PHP5 packages
Requires: php-base
%description libs
The php-libs package contains parts of PHP5 distribution which are in use
by other PHP5-related packages.
%prep
%setup -q -n php5-source
%setup -q -n php5-source -T -D -a1
%patch1 -p2
%patch2 -p2
%patch3 -p2
%patch4 -p2
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p2 -b .scandir
%patch10 -p2 -b .hardcoded_ini
%patch11 -p2 -b .sapi-cli
%patch12 -p2 -b .alternatives
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1 -b .sym-fix
%patch17 -p1 -b .expat
%patch30 -p0
%patch31 -p1
%patch32 -p1
%patch33 -p2
%patch34 -p0
%patch35 -p0
%patch36 -p2
%patch37 -p0
%__cp Zend/LICENSE Zend/ZEND_LICENSE
%__cp Zend/ChangeLog Zend/ZEND_ChangeLog
%__mv README.SELF-CONTAINED-EXTENSIONS SELF-CONTAINED-EXTENSIONS
%__cp -dpR %SOURCE2 .
LIBS="$LIBS -lpthread"
CFLAGS="%optflags -fPIC"
export LIBS CFLAGS
%autoreconf -I build
./buildconf --force
%build
%php5_env
%configure \
--prefix=%_prefix \
--enable-inline-optimization \
--with-pic \
\
--enable-cli \
--disable-cgi \
\
--disable-debug \
--enable-safe-mode \
--disable-magic-quotes \
--disable-rpath \
\
--enable-bcmath \
--enable-ctype \
--enable-ftp \
--enable-session \
--enable-shmop \
--enable-sysvsem \
--enable-sysvshm \
--enable-libxml \
--disable-dom \
--disable-simplexml \
--enable-hash \
--enable-xml \
--with-xml-libexpat-dir=%_libdir \
--enable-wddx \
\
--enable-shared=yes \
--enable-static=no \
\
--with-layout=GNU \
--with-exec-dir=%_bindir \
--with-zlib=%_usr \
--with-gettext=%_usr \
--with-iconv \
--without-mysql \
--with-mm=%_usr \
--without-sqlite \
--with-regex=php \
%{subst_with interbase} \
--without-pear \
#
%php5_make
%install
# XXX see https://bugzilla.altlinux.org/show_bug.cgi?id=14726
%add_findreq_skiplist %php5_libdir/build/config.guess
%php5_make_install
# All things already installed, install differences only
%__mkdir_p \
%buildroot/%php5_libdir/extensions \
%buildroot/%_bindir \
%buildroot/%php5_sysconfdir/%php5_sapi/php.d \
%buildroot/%php5_extconf \
%buildroot/%php5_servicedir/%php5_sapi \
%buildroot/%_datadir/php/%_php5_version/modules \
%buildroot/%_sysconfdir/control.d/facilities \
%buildroot/%php5_sysconfdir/%php5_sapi/control.d
%__install -m 644 %SOURCE3 %buildroot/%php5_sysconfdir/%php5_sapi/php.ini
%__install -m 644 php5-control/php.example %buildroot/%php5_sysconfdir/%php5_sapi/control.d/php.example
%__install -m 755 php5-control/php5.cli.control %buildroot/%_sysconfdir/control.d/facilities/php5-%php5_sapi
for f in \
%buildroot/%php5_sysconfdir/%php5_sapi/php.ini \
%buildroot/%_sysconfdir/control.d/facilities/php5-%php5_sapi
do
%__subst 's, at PHP_VERSION at ,%_php5_version,g' "$f"
%__subst 's, at PHP_LIBDIR at ,%_libdir/php,g' "$f"
%__subst 's, at SAPI at ,%php5_sapi,g' "$f"
done
[ -f "%buildroot/%_bindir/phpextdist" ] ||
%__cp -dpR scripts/dev/phpextdist %buildroot/%_bindir/
%__chmod 755 %buildroot/%_bindir/*
# This file is not needed by any program.
%__rm -f %buildroot/%_libdir/libphp-%_php5_version.la
# Remove RPATH
/usr/bin/chrpath --delete %buildroot/%_bindir/php-%_php5_version
# Make alternatives support.
%__install -d %buildroot/%_altdir
php_weight="$(printf %%s "%_php5_version" | sed 's,[^[:digit:]],,g')"
cat << EOF > %buildroot/%_altdir/php5
%_bindir/php %_bindir/php-%_php5_version $php_weight
%_man1dir/php.1 %_man1dir/php-%_php5_version.1 $php_weight
EOF
# Make backup some files to make devel package.
%make clean
find scripts/apache/ -type f | xargs %__chmod 644
%__mkdir_p sapi/apache/apache/
%__cp -dpR scripts/apache/* sapi/apache/apache/
%__mkdir_p %buildroot%_usrsrc/php5-devel/{ext,sapi,conf}
%__cp -dpR php.ini* %buildroot%_usrsrc/php5-devel/conf
%__cp -dpR ext/* %buildroot%_usrsrc/php5-devel/ext
%__cp -dpR sapi/* %buildroot%_usrsrc/php5-devel/sapi
# Add necessary files to build any sapi packages.
%__mkdir_p %buildroot%_usrsrc/php5-devel/sapi/BUILD
%__cp -dpR main/internal_functions.c %buildroot%_usrsrc/php5-devel/sapi/BUILD
%__cp -dpR include %buildroot%_usrsrc/php5-devel/sapi/BUILD
%post
%php5_sapi_postin
%register_alternatives php5
%preun
%php5_sapi_preun
%unregister_alternatives php5
%post libs -p %post_ldconfig
%postun libs -p %postun_ldconfig
%files
%_altdir/php5
%_bindir/php-%_php5_version
%_sysconfdir/control.d/facilities/php5-%php5_sapi
%php5_sysconfdir/%php5_sapi
%config(noreplace) %php5_sysconfdir/%php5_sapi/php.ini
%_man1dir/php-%_php5_version.1*
%doc CODING_STANDARDS CREDITS INSTALL LICENSE
%doc NEWS README.* Zend/ZEND_* TODO php.ini-* EXTENSIONS
%files libs
%dir %_sysconfdir/php/%_php5_version
%_libdir/php/%_php5_version
%_datadir/php/%_php5_version
%_libdir/libphp-%_php5_version.so
%files devel
%_bindir/php-config
%_bindir/phpize
%_bindir/phpextdist
%_includedir/php
%php5_libdir/build
%_usrsrc/php5-devel
%_man1dir/php-config.1*
%_man1dir/phpize.1*
%doc SELF-CONTAINED-EXTENSIONS php-packaging.readme
%doc tests run-tests.php
%changelog
…
Полный changelog можно просмотреть здесь