Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
105 magnus 1
How to build new template packages for Prayer Webmail
2
=================================================
3
 
4
Prayer uses its own macro expansion language, which is documented in
5
TEMPLATES. The templates (filename extension .t) are first translated
6
into C code (actually no executable code, merely data structures),
7
which is then compiled to object form. Originally, the object files
8
had to be linked with the prayer executables, but as a Debian
9
extension they can be assembled in shared libraries and loaded
10
dynamically.
11
 
12
This package contains the programs and scripts needed to build
13
template libraries, as well as a makefile to facilitate the process.
14
 
15
 
16
template-set.make
17
-----------------
18
 
19
/usr/share/prayer/template-set.make can be used directly (via make -f)
20
or included from an ordinary Makefile.
21
 
22
The variable NAME defines the name of the template set. By default
23
it's set to the name of the current directory. NAME must be set on the
24
command line or *before* including template-set.make. An alternative
25
is to follow chapter 3.8 in the GNU Make documentation and _delegate_
26
certain or all targets to template-set.make:
27
 
28
  %: force
29
   	@$(MAKE) -f /usr/share/prayer/template-set.make NAME=foobar
30
  force: ;
31
 
32
The variables TEMPLATES and TEMPLATES_FRONTEND list the top-level
33
templates that Prayer is known to use, and which should be defined
34
lest the user be met with a page saying nothing but "Template not
35
found". Unless all those templates are defined, or you redefine the
36
variables, the build will fail, but you can set VPATH to a directory
37
containing an existing template set to take the missing templates from
38
there. Just be sure that there are no intermediate files lying around!
39
 
40
Templates can call other templates by means of the CALL macro. They
41
are scanned recursively to make sure that all referenced templates are
42
included in the respective library.
43
 
44
A complete template package should consist of two libraries: one for
45
the session daemon and one for the front-end. The latter contains the
46
templates for the login screen and certain messages when no session
47
exists or none can be found, and since the users can't choose the
48
front-end template set it can be considered pretty much optional. To
49
skip building the front-end library, set TEMPLATE_LIBS = $(SESSION_LIB)
50
(also on the command line or before including template-set.make).
51
 
52
 
53
Installing
54
----------
55
 
56
To help build separate architecture-independent and architecture-
57
specific packages (as well as to avoid conflicts with the "install"
58
target you may want to use yourself), template-set.make provides two
59
install targets, "install-sources" and "install-libs", which do the
60
right thing. The standard DESTDIR variable is supported (instead of
61
BROOT, which is used in Prayer's own makefiles).
62
 
63
 
64
Images and CSS files
65
--------------------
66
 
67
This package contains no tools to organise static files. Those should
68
simply be installed in /usr/share/prayer/icons and
69
/usr/share/prayer/static. Note that Prayer doesn't support sub-
70
directories, so files should be named in a way that avoids conflicts.
71
 
72
 
73
 -- Magnus Holmgren <holmgren@debian.org>, Sun, 25 Oct 2009 18:36:44 +0100