Skip to content

PHP Application Packaging

I spent some time this weekend packaging Gallery2 and Serendipity for rPath based Linux Distributions. As part of that effort, I built a conary recipe superclass to make packaging other PHP applications easier.

This class currently resides in the LAMP repository in the phpapppackage:source trove. The superclass handles creation of the apache configuration file to drop in to /etc/httpd/conf.d, provides stubs for creating empty files and directories for use by the PHP application, and sets up the requirement on PHP.

So, a new recipe for a simple application like gallery looks like the one here.

Notice the calls to MakeWriteableDirs and CreateWriteable. Those create the empty config files and directories needed by the application. These are created with ownership "apache", as which user the stock httpd server runs. Also notice the r.macros.dirconf macro. This data gets inserted into the apache configuration file between <Directory foo> directives so that you can set application specific php configuration values, or even set overrides.

If you use phpapppackage.recipe as a root class to package some other php application, shoot me an e-mail to let me know. I'd love to hear about it.


No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options