Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # spec file for package SFEphp54
- #
- # includes module(s): php
- #
- %include Solaris.inc
- Name: SFEphp54
- Version: 5.4.0
- Source: http://www.php.net/distributions/php-%{version}.tar.bz2
- URL: http://www.php.net/
- #SUNW_BaseDir: %{_basedir}
- BuildRoot: %{_tmppath}/%{name}-%{version}-build
- %include default-depend.inc
- BuildRequires: gnu-gettext
- BuildRequires: web/server/apache-22
- BuildRequires: mysql-51
- %define phpsuffix php/5.4
- %define _sysconfdir /etc/%{phpsuffix}
- %define _prefix /usr/%{phpsuffix}
- %define _libexecdir %{_prefix}/modules
- %package php
- Summary: php - Hypertext Preprocessor - general-purpose scripting language for Web development
- IPS_package_name: web/php-54
- SUNW_Pkg: php
- Requires: gnu-gettext
- Requires: SUNWpostrun-root
- %package modphp
- Summary: PHP Apache Module
- IPS_package_name: web/server/apache-22/module/apache-php54
- SUNW_Pkg: modphp
- Requires: web/server/apache-22
- Requires: web/php-54
- %prep
- %setup -q -c -n php-%version
- %build
- CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
- if test "x$CPUS" = "x" -o $CPUS = 0; then
- CPUS=1
- fi
- export LDFLAGS="%{_ldflags}"
- export CFLAGS="%optflags"
- cd php-%version
- ./configure \
- --prefix=%{_prefix} \
- --bindir=%{_prefix}/bin \
- --datadir=%{_datadir} \
- --includedir=%{_includedir} \
- --libdir=%{_libdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --sbindir=%{_sbindir} \
- --sysconfdir=%{_sysconfdir} \
- --localstatedir=%{_localstatedir} \
- --with-apxs2 \
- --enable-fpm \
- --with-config-file-path=%{_sysconfdir}/php.ini \
- --with-config-file-scan-dir=%{_sysconfdir}/conf.d \
- --with-pcre-regex \
- --with-zlib \
- --enable-bcmath \
- --with-bz2 \
- --with-gd \
- --enable-mbstring \
- --with-mysql \
- --with-mysqli \
- --with-pdo-mysql \
- --enable-sockets \
- --with-pear \
- --with-tsrm-pthreads
- make -j$CPUS
- %install
- rm -rf $RPM_BUILD_ROOT
- # Create a dummy httpd.conf that apxs will populate.
- mkdir -p ${RPM_BUILD_ROOT}`apxs -q SYSCONFDIR`/conf.d
- mkdir -p ${RPM_BUILD_ROOT}%{_libexecdir}
- echo >${RPM_BUILD_ROOT}`apxs -q SYSCONFDIR`/conf.d/modules-32.load
- echo "LoadModule "`apxs -q LIBEXECDIR`"/dummy.so" >> ${RPM_BUILD_ROOT}`apxs -q SYSCONFDIR`/conf.d/modules-32.load
- cd php-%version
- make install INSTALL_ROOT=${RPM_BUILD_ROOT}
- cp php.ini-production ${RPM_BUILD_ROOT}%{_sysconfdir}/php.ini
- export modules32load="${RPM_BUILD_ROOT}`apxs -q SYSCONFDIR`/conf.d/modules-32.load"
- # Remove the dummy line and rename the file.
- export loadmodule="$(awk '!/dummy/ {print}' $modules32load | grep -vE '^$' | sed -e "s:${RPM_BUILD_ROOT}::g")"
- echo $loadmodule > $modules32load
- # Remove the generated files.
- #rm -rf ${RPM_BUILD_ROOT}`apxs -q SYSCONFDIR`/conf.d
- # Remove files and dirs that should probably be re-generated on the destination
- # machine and not simply installed.
- rm ${RPM_BUILD_ROOT}%{_sysconfdir}/pear.conf
- rm -r ${RPM_BUILD_ROOT}/.registry
- rm -r ${RPM_BUILD_ROOT}/.channels
- rm -r ${RPM_BUILD_ROOT}/.filemap
- rm -r ${RPM_BUILD_ROOT}/.lock
- rm -r ${RPM_BUILD_ROOT}/.depdblock
- rm -r ${RPM_BUILD_ROOT}/.depdb
- %clean
- #rm -rf $RPM_BUILD_ROOT
- %files php
- %defattr (-, root, bin)
- %dir %attr (0755, root, bin) %{_bindir}
- %{_bindir}/*
- %dir %attr (0755, root, bin) %{_libdir}
- %{_libdir}/*
- %dir %attr (0755, root, bin) %{_sysconfdir}
- %{_sysconfdir}/php.ini
- %{_sysconfdir}/php-fpm.conf.default
- %dir %attr (0755, root, bin) %dir %{_includedir}
- %{_includedir}/*
- %dir %attr (0755, root, bin) %{_datadir}
- %dir %attr (0755, root, bin) %{_datadir}/fpm
- %{_datadir}/fpm/*
- #%{_prefix}/php-fpm.conf.default
- %dir %attr (0755, root, bin) %{_sbindir}
- %{_sbindir}/*
- %dir %attr (0755, root, bin) %{_mandir}
- %{_mandir}/*
- %dir %attr (0755, root, bin) %{_libexecdir}
- %dir %attr (0755, root, bin) %{_localstatedir}
- %{_localstatedir}/*
- %files modphp
- %%dir %attr (0755, webservd, webservd) %(apxs -q LIBEXECDIR)
- %(apxs -q LIBEXECDIR)/*
- %%dir %attr (0755, webservd, webservd) %(apxs -q SYSCONFDIR)
- %(apxs -q SYSCONFDIR)/*
- %changelog
- * Fri Oct 14 2011 - Ken Mays <kmays2000@gmail.com>
- - Bump to 5.3.8
- * Wed Jun 8 2011 - Ken Mays <kmays2000@gmail.com>
- - Bump to 5.3.6
- * Sat Nov 17 2007 - daymobrew@users.sourceforge.net
- - Enable building with either SUNWgnu-gettext or SFEgettext.
- * Sat May 5 2007 - Thomas Wagner
- - Bump: to 5.2.2 (mainly security fixes)
- * Wed Mar 28 2007 - Eric Boutilier
- - add --enable-mbstring and --with-gettext=/usr/gnu
- * Mon Mar 26 2007 - Eric Boutilier
- - Work-around: Remove MySQL dependencies and --with-mysql
- - Add: --with-pgsql=/usr --with-bz2 --with-zlibs
- - Add: cp php.ini-recommended $RPM_BUILD_ROOT%{_libdir}/php.ini
- - Bump: to 5.2.1
- * Fri Jan 19 2007 - daymobrew@users.sourceforge.net
- - Initial spec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement