Rev 105 | Blame | Compare with Previous | Last modification | View Log | RSS feed
How to build new template packages for Prayer Webmail=================================================Prayer uses its own macro expansion language, which is documented inTEMPLATES. The templates (filename extension .t) are first translatedinto C code (actually no executable code, merely data structures),which is then compiled to object form. Originally, the object fileshad to be linked with the prayer executables, but as a Debianextension they can be assembled in shared libraries and loadeddynamically.This package contains the programs and scripts needed to buildtemplate libraries, as well as a makefile to facilitate the process.template-set.make-----------------/usr/share/prayer/template-set.make can be used directly (via make -f)or included from an ordinary Makefile.The variable NAME defines the name of the template set. By defaultit's set to the name of the current directory. NAME must be set on thecommand line or *before* including template-set.make. An alternativeis to follow chapter 3.8 in the GNU Make documentation and _delegate_certain or all targets to template-set.make:%: force@$(MAKE) -f /usr/share/prayer/template-set.make NAME=foobarforce: ;The variables TEMPLATES and TEMPLATES_FRONTEND list the top-leveltemplates that Prayer is known to use, and which should be definedlest the user be met with a page saying nothing but "Template notfound". Unless all those templates are defined, or you redefine thevariables, the build will fail, but you can set VPATH to a directorycontaining an existing template set to take the missing templates fromthere. Just be sure that there are no intermediate files lying around!Templates can call other templates by means of the CALL macro. Theyare scanned recursively to make sure that all referenced templates areincluded in the respective library.A complete template package should consist of two libraries: one forthe session daemon and one for the front-end. The latter contains thetemplates for the login screen and certain messages when no sessionexists or none can be found, and since the users can't choose thefront-end template set it can be considered pretty much optional. Toskip building the front-end library, set TEMPLATE_LIBS = $(SESSION_LIB)(also on the command line or before including template-set.make).Installing----------To help build separate architecture-independent and architecture-specific packages (as well as to avoid conflicts with the "install"target you may want to use yourself), template-set.make provides twoinstall targets, "install-sources" and "install-libs", which do theright thing. The standard DESTDIR variable is supported (instead ofBROOT, which is used in Prayer's own makefiles).Images and CSS files--------------------This package contains no tools to organise static files. Those shouldsimply be installed in /usr/share/prayer/icons and/usr/share/prayer/static. Note that Prayer doesn't support sub-directories, so files should be named in a way that avoids conflicts.-- Magnus Holmgren <holmgren@debian.org>, Sun, 25 Oct 2009 18:36:44 +0100