Creating a php package for Slackware 13.1
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?
still ugly, but symlink?
edit: what does ./configure --help say? can you specify a different location for httpd.conf?
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 httpd.conf.new file. I think I'll take that approach and copy the httpd.conf to the $DESTDIR/etc/httpd.
Maybe you can just do "touch $DESTDIR/etc/httpd/httpd.conf" to see what it actually puts in there... what does the slackbuild do?
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/pgsql.so to /usr/lib/php/extensions/pgsql.so
5. Edit /etc/httpd/php.ini and add line 'extension=pgsql.so'
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 10:54 AM.|