-   Slackware (
-   -   Creating a php package for Slackware 13.1 (

Ramurd 10-13-2010 04:23 AM

Creating a php package for Slackware 13.1
Hi all,

Running against a situation here, for which I have solutions in mind, but for some reason or another they don't really strike me as "good" solutions.

I am making a customized for myself (eg with postgreSQL support) php package. Configure and make run fine; but upon make install the make tries to access httpd.conf in the $DESTDIR/etc/httpd

My first thought is: prior to 'make install' copy the file from /etc/httpd to the target dir; however, this strikes me as an ugly solution.

Do our fellow Slackers have a better idea, or is the thought-up solution the best and safe way to go?

zoran119 10-13-2010 07:09 AM

still ugly, but symlink?

edit: what does ./configure --help say? can you specify a different location for httpd.conf?

Ramurd 10-13-2010 03:39 PM

good idea, but I think it's still ugly.

From what information I gathered, the make install takes the information from apxs2; but I can check out if ./configure gives any options regarding httpd.conf

What I think this utility will do, is enable php in the httpd.conf, which is actually not a bad idea, but would not be such a great idea if you create the package on a "clean" system and install it to an already active, configured server. Now that the file is in /etc, I guess that installpkg/upgradepkg will create an file. I think I'll take that approach and copy the httpd.conf to the $DESTDIR/etc/httpd.

lumak 10-13-2010 05:15 PM

Maybe you can just do "touch $DESTDIR/etc/httpd/httpd.conf" to see what it actually puts in there... what does the slackbuild do?

astrogeek 10-13-2010 06:51 PM


Originally Posted by Ramurd (Post 4125853)
I am making a customized for myself (eg with postgreSQL support) php package.

If you are only trying to add postgreSQL support there is an easier way!

Here are my own notes - I do this occasionally, just last week in fact:

Postgresql and PHP in Slackware
Slackware ships with PHP compiled wihtout Postgresql support.

To enable it you obviously need to build the postgresql package, then...

You can rebuild PHP using the --with-pgsql=shared,/usr directive, but all you really need is the module, so an easy way is to rebuild PHP using ONLY the --with-pgsql... directive, copy the module to the php extensions path and possibly edit the /etc/httpd/php.ini to enable it's use... like this:

1. Untar the php source that ships with Slackware, cd to the directory
2. ./configure --with-pgsql=shared,/usr
3. make (DO NOT RUN make install!)
4. copy .../modules/ to /usr/lib/php/extensions/
5. Edit /etc/httpd/php.ini and add line ''

Restart apache and you should be done!

(NOTE: It is NOT necessary to edit /etc/php/php.ini to use the module!)

All times are GMT -5. The time now is 12:22 AM.