Rev 105 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 105 | Rev 167 | ||
---|---|---|---|
1 | How to build new template packages for Prayer Webmail |
1 | How to build new template packages for Prayer Webmail |
2 | ================================================= |
2 | ================================================= |
3 | 3 | ||
4 | Prayer uses its own macro expansion language, which is documented in |
4 | Prayer uses its own macro expansion language, which is documented in |
5 | TEMPLATES. The templates (filename extension .t) are first translated |
5 | TEMPLATES. The templates (filename extension .t) are first translated |
6 | into C code (actually no executable code, merely data structures), |
6 | into C code (actually no executable code, merely data structures), |
7 | which is then compiled to object form. Originally, the object files |
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 |
8 | had to be linked with the prayer executables, but as a Debian |
9 | extension they can be assembled in shared libraries and loaded |
9 | extension they can be assembled in shared libraries and loaded |
10 | dynamically. |
10 | dynamically. |
11 | 11 | ||
12 | This package contains the programs and scripts needed to build |
12 | This package contains the programs and scripts needed to build |
13 | template libraries, as well as a makefile to facilitate the process. |
13 | template libraries, as well as a makefile to facilitate the process. |
14 | 14 | ||
15 | 15 | ||
16 | template-set.make |
16 | template-set.make |
17 | ----------------- |
17 | ----------------- |
18 | 18 | ||
19 | /usr/share/prayer/template-set.make can be used directly (via make -f) |
19 | /usr/share/prayer/template-set.make can be used directly (via make -f) |
20 | or included from an ordinary Makefile. |
20 | or included from an ordinary Makefile. |
21 | 21 | ||
22 | The variable NAME defines the name of the template set. By default |
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 |
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 |
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_ |
25 | is to follow chapter 3.8 in the GNU Make documentation and _delegate_ |
26 | certain or all targets to template-set.make: |
26 | certain or all targets to template-set.make: |
27 | 27 | ||
28 | %: force |
28 | %: force |
29 | @$(MAKE) -f /usr/share/prayer/template-set.make NAME=foobar |
29 | @$(MAKE) -f /usr/share/prayer/template-set.make NAME=foobar |
30 | force: ; |
30 | force: ; |
31 | 31 | ||
32 | The variables TEMPLATES and TEMPLATES_FRONTEND list the top-level |
32 | The variables TEMPLATES and TEMPLATES_FRONTEND list the top-level |
33 | templates that Prayer is known to use, and which should be defined |
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 |
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 |
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 |
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 |
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! |
38 | there. Just be sure that there are no intermediate files lying around! |
39 | 39 | ||
40 | Templates can call other templates by means of the CALL macro. They |
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 |
41 | are scanned recursively to make sure that all referenced templates are |
42 | included in the respective library. |
42 | included in the respective library. |
43 | 43 | ||
44 | A complete template package should consist of two libraries: one for |
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 |
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 |
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 |
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 |
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) |
49 | skip building the front-end library, set TEMPLATE_LIBS = $(SESSION_LIB) |
50 | (also on the command line or before including template-set.make). |
50 | (also on the command line or before including template-set.make). |
51 | 51 | ||
52 | 52 | ||
53 | Installing |
53 | Installing |
54 | ---------- |
54 | ---------- |
55 | 55 | ||
56 | To help build separate architecture-independent and architecture- |
56 | To help build separate architecture-independent and architecture- |
57 | specific packages (as well as to avoid conflicts with the "install" |
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 |
58 | target you may want to use yourself), template-set.make provides two |
59 | install targets, "install-sources" and "install-libs", which do the |
59 | install targets, "install-sources" and "install-libs", which do the |
60 | right thing. The standard DESTDIR variable is supported (instead of |
60 | right thing. The standard DESTDIR variable is supported (instead of |
61 | BROOT, which is used in Prayer's own makefiles). |
61 | BROOT, which is used in Prayer's own makefiles). |
62 | 62 | ||
63 | 63 | ||
64 | Images and CSS files |
64 | Images and CSS files |
65 | -------------------- |
65 | -------------------- |
66 | 66 | ||
67 | This package contains no tools to organise static files. Those should |
67 | This package contains no tools to organise static files. Those should |
68 | simply be installed in /usr/share/prayer/icons and |
68 | simply be installed in /usr/share/prayer/icons and |
69 | /usr/share/prayer/static. Note that Prayer doesn't support sub- |
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. |
70 | directories, so files should be named in a way that avoids conflicts. |
71 | 71 | ||
72 | 72 | ||
73 | -- Magnus Holmgren <holmgren@debian.org>, Sun, 25 Oct 2009 18:36:44 +0100 |
73 | -- Magnus Holmgren <holmgren@debian.org>, Sun, 25 Oct 2009 18:36:44 +0100 |