I am building PHP 5.3 rpm packages for our custom CentOS 5 yum repo. I am fairly new to building rpms to be honest, but I have had moderate success downloading the SRPMS for a given package and repackaging them using "rpmbuild --rebuild" command.

One thing that is throwing me off though is how to satisfy the php-devel package.. I obviously have the PHP 5.3 source files as I was able to build my php-common and other packages with it. But I am not sure how to actually build the devel package! From what I understand, I already have most of what I need - the latest php 5.3.5 source tarball. However I am not sure how to build the correct .spec file to satisfy what I need.

If you are knowledgeable in this area, would you mind helping a fellow sysadmin out? Sharing a spec file or at least giving me some pointers on how to approach it.

Thanks much serverfault community! -BajaBob


Have you looked at using this build of php53? http://dev.centos.org/centos/5/testing/x86_64/RPMS/php53/

  • Actually no, I somehow missed that when I was scouring the testing channel. It will be quite helpful to use these vs rolling my own. I will give these a shot - however for the sake of this question it would be nice to know how that php-devel package is actually built! – BajaBob Mar 14 '11 at 22:43
  • This helped me out a bit, but still doesn't satisfy the needs of my developers. While they do have a few of the php 5.3 packages in this repo, I am still having to roll my own for things like php-pecl-memcache, php-xdebug, APC, pear, etc. Any other ideas on how to compile a php-devel package from source? – BajaBob Mar 15 '11 at 17:22
  • php-devel is built at the same time php is. The spec file in dev.centos.org/centos/5/testing/SRPMS/php53-5.3.3-1.el5.src.rpm will show you what files go in it. pear is part of the base php install. For additional php packages I'd rebuild a SRPM from EPEL (e.g., download.fedora.redhat.com/pub/epel/5/SRPMS/repoview/… ). If you don't see a needed package you should be able to adapt a spec file from a similar type (pecl, pear) of package. – Mark Wagner Mar 15 '11 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.