Update to upstream 1.0.1
[profile/ivi/gsignond.git] / docs / building.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3                "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 ]>
5 <refentry id="gsignond-building">
6   <refmeta>
7     <refentrytitle>Building and installing the gsignond daemon</refentrytitle>
8     <manvolnum>3</manvolnum>
9     <refmiscinfo>GSignond</refmiscinfo>
10   </refmeta>
11
12   <refsect1 id="building">
13     <title>Building gsignond</title>
14     <para>
15       GSignond uses the standard GNU build system,
16       using <application>autoconf</application> for package
17       configuration and resolving portability issues,
18       <application>automake</application> for building makefiles
19       that comply with the GNU Coding Standards, and
20       <application>libtool</application> for building shared
21       libraries on multiple platforms.  The normal sequence for
22       compiling and installing gsignond from distribution tarballs is thus:
23
24       <literallayout>
25         <userinput>./configure</userinput>
26         <userinput>make</userinput>
27         <userinput>make install</userinput>
28       </literallayout>
29       
30       If you have obtained the source code directly from git repository,
31       execute the <command>./autogen.sh</command> script 
32       before the steps above.
33     </para>
34
35     <para>
36       The standard options provided by <application>GNU
37       autoconf</application> may be passed to the
38       <command>configure</command> script.  Please see the
39       <application>autoconf</application> documentation or run
40       <command>./configure --help</command> for information about
41       the standard options.
42     </para>
43     
44   </refsect1>
45   <refsect1 id="dependencies">
46     <title>Dependencies</title>
47     <para>
48       Before you can compile GSignond, you need to have
49       various other tools and libraries installed on your
50       system. The two tools needed during the build process
51       are <command>pkg-config</command> and
52       <ulink url="http://www.gnu.org/software/make">GNU make</ulink>.
53     </para>
54     <itemizedlist>
55       <listitem>
56         <para>
57           <ulink url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
58           is a tool for tracking the compilation flags needed for
59           libraries that are used by the GSignond. (For each
60           library, a small <literal>.pc</literal> text file is
61           installed in a standard location that contains the compilation
62           flags needed for that library along with version number
63           information.) 
64         </para>
65       </listitem>
66     </itemizedlist>
67     <para>
68       GSignond depends on a number of other libraries.
69     </para>
70     <itemizedlist>
71       <listitem>
72         <para>
73             The <ulink url="https://developer.gnome.org/glib/">GLib
74             library</ulink> is the development framework that GSignond is built on.
75         </para>
76       </listitem>
77       <listitem>
78         <para>
79             The <ulink url="http://www.sqlite.org/">SQLite library</ulink>
80             provides a database implementation that GSignond is using for
81             storing data.
82         </para>
83       </listitem>
84       <listitem>
85         <para>
86             The <ulink url="http://check.sourceforge.net/">check library</ulink>
87             provides a unit testing framework. It is needed only if you would
88             like to run unit tests with <command>make check</command>.
89         </para>
90       </listitem>
91       <listitem>
92         <para>
93             For building Tizen extension module that integrates gsignond into
94             the Tizen platform, the 
95             <ulink url="http://schaufler-ca.com/">libsmack</ulink> and 
96             <ulink url="http://ecryptfs.org/">ecryptfs</ulink> are required. 
97             They are not needed otherwise.
98         </para>
99       </listitem>
100     </itemizedlist>
101
102   </refsect1>
103   <refsect1 id="extra-configuration-options">
104     <title>Extra Configuration Options</title>
105
106     <para>
107       In addition to the normal options, the
108       <command>configure</command> script supports these additional arguments:
109     </para>
110
111     <formalpara>
112       <title><systemitem>--enable-debug</systemitem></title>
113
114       <para>
115         Turns on debugging support. This enables unit tests and allows setting 
116         environment variables to influence the runtime behaviour of GSignond
117         (see <link linkend="GSignondConfig">GSignondConfig</link> and
118         <link linkend="GSignondAccessControlManager">GSignondAccessControlManager</link>).
119         Also, the daemon will exit in case of critical errors.
120       </para>
121     </formalpara>
122
123     <formalpara>
124       <title><systemitem>--enable-sql-log</systemitem></title>
125
126       <para>
127           Turns on SQL statement logging. For this, also 
128           <systemitem>--enable-debug</systemitem> must be used.
129       </para>
130     </formalpara>
131
132     <formalpara>
133       <title><systemitem>--enable-dbus-type=dbus-type</systemitem></title>
134
135       <para>
136           Sets the way in which GSignond is using DBus to communicate with 
137           the client library. <systemitem>dbus-type</systemitem> can be one of
138         <itemizedlist>
139           <listitem>
140             <para>
141               <systemitem>'p2p'</systemitem> which is the default and recommended
142               value. GSignond will use direct connection over a UNIX domain socket
143               with the client library without involving the DBus daemon.
144             </para>
145           </listitem>
146           <listitem>
147             <para>
148               <systemitem>'session'</systemitem> which will use the session bus.
149               This is not recommended to use because session bus isn't secure
150               against eavesdropping, but it can be used for debugging purposes,
151               as it allows the use of standard tools such as
152               <command>dbus-monitor</command>, <command>d-feet</command> and
153               so on.
154             </para>
155           </listitem>
156           <listitem>
157             <para>
158               <systemitem>'system'</systemitem> which will use the system bus.
159               Can be used on a single-user systems, but 'p2p' is preferred.
160             </para>
161           </listitem>
162         </itemizedlist>
163       </para>
164     </formalpara>
165
166     <formalpara>
167         <title><systemitem>--enable-keychain=sysctx</systemitem></title>
168         
169         <para>
170             Sets the system security context of keychain UI process as returned by
171             the default <link linkend="GSignondAccessControlManager">
172             GSignondAccessControlManager</link>. This value becomes written to the
173             gsignond.conf in addition to being encoded as default value
174             through config.h.
175         </para>
176     </formalpara>
177     
178     <formalpara>
179         <title><systemitem>--enable-storagedir=path</systemitem></title>
180         
181         <para>
182             Sets the base path for user specific storage directories where
183             database files will be located as utilised by 
184             <link linkend="GSignondStorageManager">
185             GSignondStorageManager</link>.
186             Default location is <filename>/var/db</filename>
187         </para>
188     </formalpara>
189
190   </refsect1>
191   <refsect1 id="building-packages">
192     <title>Building distribution packages</title>
193
194     <para>
195         Instead of running <command>make install</command> to install gsignond
196         into a system location it is possible to build distribution-specific
197         packages. <filename>dists/</filename> directory in the source tree
198         contains a number of package confuguration files, and to use them also
199         a distribution tarball is needed. If you are building from a git tree,
200         use <command>make dist</command> to create such a tarball.
201     </para>
202   </refsect1>
203
204 </refentry>