1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY json-c-download-http "https://s3.amazonaws.com/json-c_releases/releases/json-c-&json-c-version;.tar.gz">
|
---|
8 | <!ENTITY json-c-download-ftp " ">
|
---|
9 | <!ENTITY json-c-md5sum "e6593766de7d8aa6e3a7e67ebf1e522f">
|
---|
10 | <!ENTITY json-c-size "396 KB">
|
---|
11 | <!ENTITY json-c-buildsize "7.9 MB">
|
---|
12 | <!ENTITY json-c-time "0.2 SBU (with tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="json-c" xreflabel="JSON-C-&json-c-version;">
|
---|
16 | <?dbhtml filename="json-c.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>JSON-C-&json-c-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="json-c">
|
---|
22 | <primary sortas="a-JSON-C">JSON-C</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to JSON-C</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>JSON-C</application> implements a reference counting
|
---|
30 | object model that allows you to easily construct JSON objects in C,
|
---|
31 | output them as JSON formatted strings and parse JSON formatted strings
|
---|
32 | back into the C representation of JSON objects.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs122_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): <ulink url="&json-c-download-http;"/>
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (FTP): <ulink url="&json-c-download-ftp;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download MD5 sum: &json-c-md5sum;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download size: &json-c-size;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated disk space required: &json-c-buildsize;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated build time: &json-c-time;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect3">JSON-C Dependencies</bridgehead>
|
---|
72 |
|
---|
73 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
74 | <para role="required">
|
---|
75 | <xref linkend="cmake"/>
|
---|
76 | </para>
|
---|
77 |
|
---|
78 | <bridgehead renderas="sect4">Optional (for documentation)</bridgehead>
|
---|
79 | <para role="optional">
|
---|
80 | <xref linkend="doxygen"/> and
|
---|
81 | <xref linkend="graphviz"/> (for dot tool)
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | </sect2>
|
---|
85 |
|
---|
86 | <sect2 role="installation">
|
---|
87 | <title>Installation of JSON-C</title>
|
---|
88 | <!--
|
---|
89 | <note>
|
---|
90 | <para>
|
---|
91 | This package does not support parallel build.
|
---|
92 | </para>
|
---|
93 | </note>
|
---|
94 | -->
|
---|
95 | <para>
|
---|
96 | Install <application>JSON-C</application> by running the following
|
---|
97 | commands:
|
---|
98 | </para>
|
---|
99 |
|
---|
100 | <screen><userinput>mkdir build &&
|
---|
101 | cd build &&
|
---|
102 |
|
---|
103 | cmake -D CMAKE_INSTALL_PREFIX=/usr \
|
---|
104 | -D CMAKE_BUILD_TYPE=Release \
|
---|
105 | -D BUILD_STATIC_LIBS=OFF \
|
---|
106 | .. &&
|
---|
107 | make</userinput></screen>
|
---|
108 |
|
---|
109 | <para>
|
---|
110 | If you have installed <xref linkend="doxygen" role="nodep"/> and
|
---|
111 | <xref linkend="graphviz" role="nodep"/>, you can build the documentation
|
---|
112 | by running the following command:
|
---|
113 | </para>
|
---|
114 |
|
---|
115 | <screen remap="doc"><userinput>doxygen doc/Doxyfile</userinput></screen>
|
---|
116 |
|
---|
117 | <para>
|
---|
118 | To test the results, issue: <command>make test</command>.
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <para>
|
---|
122 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
123 | </para>
|
---|
124 |
|
---|
125 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
126 |
|
---|
127 | <para>
|
---|
128 | If you built the documentation, install it by running the following
|
---|
129 | commands as the &root; user:
|
---|
130 | </para>
|
---|
131 |
|
---|
132 | <screen role="root" remap="doc"><userinput>install -d -vm755 /usr/share/doc/json-c-&json-c-version; &&
|
---|
133 | install -v -m644 doc/html/* /usr/share/doc/json-c-&json-c-version;</userinput></screen>
|
---|
134 |
|
---|
135 | </sect2>
|
---|
136 |
|
---|
137 | <sect2 role="commands">
|
---|
138 | <title>Command Explanations</title>
|
---|
139 |
|
---|
140 | <para>
|
---|
141 | <parameter>-D CMAKE_BUILD_TYPE=Release</parameter>: This switch is
|
---|
142 | used to apply a higher level of compiler optimizations.
|
---|
143 | </para>
|
---|
144 |
|
---|
145 | </sect2>
|
---|
146 |
|
---|
147 | <sect2 role="content">
|
---|
148 | <title>Contents</title>
|
---|
149 |
|
---|
150 | <segmentedlist>
|
---|
151 | <segtitle>Installed Programs</segtitle>
|
---|
152 | <segtitle>Installed Libraries</segtitle>
|
---|
153 | <segtitle>Installed Directories</segtitle>
|
---|
154 |
|
---|
155 | <seglistitem>
|
---|
156 | <seg>
|
---|
157 | None
|
---|
158 | </seg>
|
---|
159 | <seg>
|
---|
160 | libjson-c.so
|
---|
161 | </seg>
|
---|
162 | <seg>
|
---|
163 | /usr/include/json-c
|
---|
164 | </seg>
|
---|
165 | </seglistitem>
|
---|
166 | </segmentedlist>
|
---|
167 |
|
---|
168 | <variablelist>
|
---|
169 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
170 | <?dbfo list-presentation="list"?>
|
---|
171 | <?dbhtml list-presentation="table"?>
|
---|
172 |
|
---|
173 | <varlistentry id="libjson-c">
|
---|
174 | <term><filename class="libraryfile">libjson-c.so</filename></term>
|
---|
175 | <listitem>
|
---|
176 | <para>
|
---|
177 | contains the <application>JSON-C</application> API functions
|
---|
178 | </para>
|
---|
179 | <indexterm zone="json-c libjson-c">
|
---|
180 | <primary sortas="c-libjson-c">libjson-c.so</primary>
|
---|
181 | </indexterm>
|
---|
182 | </listitem>
|
---|
183 | </varlistentry>
|
---|
184 |
|
---|
185 | </variablelist>
|
---|
186 |
|
---|
187 | </sect2>
|
---|
188 |
|
---|
189 | </sect1>
|
---|