--On Monday, November 21, 2005 8:21 AM +0100 Andy Pieters
<mailings@xxxxxxxxxxxxxxxx> wrote:
I wish more PHP packagers paid attention to this. I salute you for
researching this. I'd recommend the fedora-packaging list and the rpm
developers list for more help.
1. The location of where the files in the package are installed is fixed
in the rpm
That's a Good Thing. It standardizes the install so support is easy. Site
customization should NOT be in the installation directory. Site-wide
customization can be in a subdirectory of /etc or /var and per-user
customization can go in one's home directory. Ideally a single copy of your
package can serve many virtual hosts by simply changing a config variable
in Apache's virtual host stanza to point at a different set of config files.
2. Many packages require updates to the database, which means that a php
cli with mysql support must be available on the system.
The package should include a Requires on the MySQL package that contains
the components you need. Then use a %post script to apply the changes.
You could also design your DB update to be initiated by the admin interface
of the site's web page, which would allow each virtual host to update its
own database. How you trigger this depends on your app.
3. In case of a first install, information needs to be collected about
the environment and user/password stuff.
RPM is not intended to be interactive. It is used to load packages when the
entire system is installed without an admin present. It can also be used to
automatically update a system in the middle of the night (eg. via yum or
Red Hat up2date). If you need first-time customization, it should be done
after installation and before or during first use. See the Mozilla package
for one example of the latter.
For an example of a package that does what you want, look at Mailman. It's
web-based and supplies most of the initial configuration, but the admin
must still finalize it before deployment.