Rebuild php: An easier way?

Andreas Thienemann andreas at dicp.ghb.fh-furtwangen.de
Tue Jun 22 17:52:31 UTC 2004


On Tue, 22 Jun 2004, Bert Buckley - Uniq Software/Systems wrote:

> However, I also need gd, jpeg, mysql, and png. So, in order
> to rebuild php, I have to download, untar, configure, make and
> install packages for php, lib png, lib jpeg, mysql, gd, freetype2,
> at least.  I even have to reinstall apache, since apxs is needed
> for the php build.
doubtful.

> Am I missing something simple?
Jepp. There are -devel packages. That means, if you want to compile 
something (php in your case) agains libjpeg all you need to do is install 
libjpeg-devel and the header files will be found.
No need to build everything from source.


Furthermore, you do not even have to build php from source again.

Just install the php-$VERSION.src.rpm from the ftpsite. In my case that 
would be http://wftp.tu-chemnitz.de/pub/linux/fedora-core/development/SRPMS/php-4.3.7-3.src.rpm
and rpm -i php-4.3.7-3.src.rpm.

You can then edit /usr/src/redhat/SPECS/php.spec to your liking and add 
--with-mcrypt.

After that, just rpmbuild -ba this specfile and you have your own php rpm 
with mcrypt support lying in /usr/src/redhat/RPMS/i386.

Do not forget to bump up the release number in the specfile by adding a 
.mcrypt tag.

bye,
  andreas





More information about the fedora-list mailing list