Skip to content

Instantly share code, notes, and snippets.

@phnessu4
Created May 14, 2013 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phnessu4/5574169 to your computer and use it in GitHub Desktop.
Save phnessu4/5574169 to your computer and use it in GitHub Desktop.
php compile spec
Summary: PHP 5 - A powerful scripting language
Name: php5
Version: 5.4.14
Release: 1
Source0: php-5.4.14.tar.gz
Group: Networking/Daemons
License: GPLv2
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildPrereq: libmcrypt-devel
BuildPrereq: libmcrypt
BuildPrereq: curl-devel
BuildPrereq: openssl-devel
BuildPrereq: libxml2-devel
BuildPrereq: libjpeg
BuildPrereq: libjpeg-devel
BuildPrereq: libpng
BuildPrereq: libpng-devel
BuildPrereq: libXpm
BuildPrereq: libXpm-devel
BuildPrereq: freetype
BuildPrereq: freetype-devel
BuildPrereq: libmemcached
BuildPrereq: libmemcached-devel
BuildPrereq: libXpm
BuildPrereq: libXpm-devel
Requires: webserver
%description
PHP 5 is a powerful apache module that adds scripting and database connection
capabilities to the apache server. This version includes the "php_cgi" binary
for suExec and stand alone php scripts too.
%prep
%setup -q -n php-5.4.14
%build
./configure --with-config-file-path=/apps/php/conf \
--enable-fpm \
--with-fpm-user=php-fpm \
--with-fpm-group=php-fpm \
--with-libxml-dir=/usr \
--enable-xml \
--with-iconv \
--disable-debug \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-curl \
--disable-short-tags \
--enable-mbstring \
--enable-sockets \
--with-pcre-regex \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-zip \
--with-pdo-mysql \
--with-mysql \
--with-mysqli \
--with-pear \
--with-freetype-dir \
--with-png-dir \
--with-jpeg-dir \
--with-xpm-dir \
--with-gd
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 0755 sapi/cli/php $RPM_BUILD_ROOT%{_bindir}
install -m 0755 sapi/fpm/php-fpm $RPM_BUILD_ROOT%{_bindir}/php-fpm
install -m 0755 sapi/cgi/php-cgi $RPM_BUILD_ROOT%{_bindir}/php-cgi
install -m 0755 scripts/php-config $RPM_BUILD_ROOT%{_bindir}/php-config
install -m 0755 scripts/phpize $RPM_BUILD_ROOT%{_bindir}/phpize
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 0755 sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -m 0755 php.ini-recommended $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
mkdir -p $RPM_BUILD_ROOT%{_libdir}/php/extensions
#install -m 0755 modules/*.so $RPM_BUILD_ROOT%{_libdir}/php/extensions
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/php
%{_bindir}/php-cgi
%{_bindir}/php-fpm
%{_bindir}/php-config
%{_bindir}/phpize
%{_mandir}/man1/php.1*
%{_sysconfdir}/php.ini
#%{_libdir}/php/extensions/*.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment