参考
/etc/yum.repos.d/CentOS-Source.repo
[source]
name=CentOS-$releasever - source
baseurl=http://vault.centos.org/6.8/os/Source/
enabled=0
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
使い方
yum install yum-utils
yumdownloader --source php --enablerepo=source
rpm展開
mkdir src
cd src
rpm2cpio ../php-5.3.3-47.el6.src.rpm | cpio -id
php.spec編集してみる
--with-libxml-dir=%{_prefix} \
--enable-xml \
--with-system-tzdata \
+ --enable-zend-multibyte \
$*
if test $? != 0; then
tail -500 config.log
ビルド
rpmbuild -ba php.spec
phpのビルドオプション確認
php -i | grep configure | sed -e 's/ /\n/g'