Ian
Ian

Reputation: 13842

Compile PHP into custom directory

I am compiling an old version of PHP (5.6.6 legacy reasons, we will be later moving to recent system package version, and just looking to create a package).

This will go into a custom RPM, so I am looking to install it all into a temporary folder, which I will make extract into correct directory on install of the rpm (this is all fine).

In most other source compiles, I can do something like...

make DESTINSTALL=/tmp/mytempfolder install

Then I would have the full install structure in a temporary folder.

This doesn't seem to work for PHP though. I have seen 'prefix' parameter, which works for some of the install, but not for the lib, man and build folders.

Is there any way to set a root folder for the whole of the build install, when doing a 'make install' ?

Upvotes: 1

Views: 544

Answers (1)

Ian
Ian

Reputation: 13842

For anyone else trying to do the same, my end solution was to use INSTALL_ROOT eg

make -C /usr/src/somedir INSTALL_ROOT=/tmp/php -f /usr/src/somedir/Makefile install

I did also have to copy cp /usr/local/apache2/modules/libphp5.so into there, as this seemed to avoid it.

Upvotes: 2

Related Questions