<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2036/1/7/_/styles/combined.css?spaceKey=TOP&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/TOP/Installation+Structure">Installation Structure</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~dlee">David M. Lee</a>
</h4>
<br/>
<h4>Changes (25)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{toc}</span> <span class="diff-added-words"style="background-color: #dfd;">{numberedheadings}</span> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;"> <br></td></tr>
<tr><td class="diff-unchanged" >{info} <br>Work in progress. <br>{info} <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Defaults: <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">This page describes the installation structure for Asterisk SCF. It is intended to follow the [Filesystem Hierarchy Standard|http://www.pathname.com/fhs/pub/fhs-2.3.html] as closely as possible. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">| {{PREFIX}} | {{/usr/local}} | <br>| Configuration | {{$\{PREFIX}/etc/asterisk-scf}} | <br>| Executables | {{$\{PREFIX}/bin}} | <br>| Libraries | {{$\{PREFIX}/lib}} | <br>| Icebox modules | {{$\{PREFIX}/lib/asterisk-scf/icebox}} | <br>| Runtime data directory | {{$\{PREFIX}/var/lib/asterisk-scf}} | <br>| Logfile | {{$\{PREFIX}/var/log/asterisk-scf.log}} | <br>| Headers | {{$\{PREFIX}/include/AsteriskSCF}} | <br>| Slices | {{$\{PREFIX}/share/asterisk-scf/slice/AsteriskSCF}} | <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{toc} <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Files that are not installed: <br>* Tests <br>** Test executables <br>** Test configuration <br>** Test Icebox modules <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h1. Defaults <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h1. *NUX <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">The installation performed by {{make install}} or {{nmake install}} will follow a set of reasonable defaults. The exceptions listed below are established by the packaging script, not by the cmake scripts. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Follow [Filesystem Hierarchy Standard|http://www.pathname.com/fhs/pub/fhs-2.3.html] <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">The Asterisk SCF cmake scripts provides several configuration variables, which function very similarly to [autoconf's installation directory variables|http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables]. The names are similar, except the are cmake-ified. (They have the prefix {{INSTALL_}}, are all caps, and use underscores for word separators.) The directories are relative to {{INSTALL_PREFIX}}. Except, of course, {{INSTALL_PREFIX}} itself, which would be needlessly recursive. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">| {{INSTALL_PREFIX}} | {{/usr/local}} | <br>| {{INSTALL_SYS_CONF_DIR}} | {{etc}} | <br>| {{INSTALL_BIN_DIR}} | {{bin}} | <br>| {{INSTALL_LIB_DIR}} | {{lib}} | <br>| {{INSTALL_DATA_ROOT_DIR}} | {{share}} | <br>| {{INSTALL_DATA_DIR}} | {{share}} | <br>| {{INSTALL_INCLUDE_DIR}} | {{include}} | <br>| {{INSTALL_LOCAL_STATE_DIR}} | {{var}} | <br> <br>Overriding a default requires specifying the value in the cmake invocation. <br> <br>{code:bash} <br>$ ./cmake/init-cmake.sh INSTALL_PREFIX=~/my-asterisk-scf <br>{code} <br> <br> <br>In addition to the generic variables intended for use by configuration, the cmake scripts provide several variables intended for use within the scripts, which allow cleaner specification of which subdirectories we use within the system directories. <br> <br>| Configuration | {{ASTERISK_SCF_INSTALL_CONF_DIR}} | {{$\{INSTALL_SYS_CONF_DIR}/asterisk-scf}} | <br>| Executables | {{ASTERISK_SCF_INSTALL_BIN_DIR}} | {{$\{INSTALL_BIN_DIR\}}} | <br>| Libraries | {{ASTERISK_SCF_INSTALL_LIB_DIR}} | {{$\{INSTALL_LIB_DIR\}}} | <br>| Icebox modules | {{ASTERISK_SCF_INSTALL_ICEBOX_DIR}} | {{$\{INSTALL_LIB_DIR}/asterisk-scf/icebox}} | <br>| Runtime data directory | {{ASTERISK_SCF_INSTALL_LOCAL_STATE_DIR}} | {{$\{INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf}} | <br>| Logfile | {{ASTERISK_SCF_INSTALL_LOG_FILE}} | {{$\{INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log}} | <br>| Headers | {{ASTERISK_SCF_INSTALL_INCLUDE_DIR}} | {{$\{INSTALL_INCLUDE_DIR\}}}^*^ | <br>| Slices | {{ASTERISK_SCF_INSTALL_SLICE_DIR}} | {{$\{INSTALL_DATA_DIR}/asterisk-scf/slice}}^*^ | <br> <br>^*^ All Asterisk SCF include and slice files must go in an {{AsteriskSCF}} subdirectory. But that's driven by the project structure, not the installation structure. <br> <br>h2. Other notes <br> <br># Files associated with unit and integration tests (executables, icebox modules, configuration files) are not installed. <br># The configuration files that get installed are merely sample configuration files, and as such have a {{.conf.sample}} file extension. <br># Only include files necessary for integration shall be installed. For example, include files used within an Icebox module do not need to be installed, since the interface to the icebox module is described by its {{.ice}} files. <br> <br>h1. *NUX <br> <br></td></tr>
<tr><td class="diff-unchanged" >h2. User installed (defaults) <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{{<span class="diff-added-chars"style="background-color: #dfd;">INSTALL_</span>PREFIX=/usr/local}}</span> (default) <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Of course, the user can override anything they may wish. <br> <br></td></tr>
<tr><td class="diff-unchanged" >h2. Digium provided package <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{PREFIX=/opt/AsteriskSCF-$\{version\}}}</span> <span class="diff-added-words"style="background-color: #dfd;">{{INSTALL_PREFIX=/opt/AsteriskSCF}}</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br>With the following exceptions: <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">| Configuration | {{/etc/opt/AsteriskSCF-$\{version\}}} | <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">| Configuration samples | {{/etc/opt/AsteriskSCF}} | <br></td></tr>
<tr><td class="diff-changed-lines" >| Runtime data directory | <span class="diff-changed-words">{{/var/opt/AsteriskSCF<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">-$\{version\}</span>/lib/asterisk-scf}}</span> | <br></td></tr>
<tr><td class="diff-changed-lines" >| Logfile | <span class="diff-changed-words">{{/var/opt/AsteriskSCF<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">-$\{version\}</span>/log/asterisk-scf.log}}</span> | <br></td></tr>
<tr><td class="diff-unchanged" > <br>h2. System package <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{{<span class="diff-added-chars"style="background-color: #dfd;">INSTALL_</span>PREFIX=/usr}}</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br>With the following exceptions: <br></td></tr>
<tr><td class="diff-changed-lines" >| Configuration <span class="diff-added-words"style="background-color: #dfd;">samples</span> | {{/etc/asterisk-scf}} | <br></td></tr>
<tr><td class="diff-unchanged" >| Runtime data directory | {{/var/lib/asterisk-scf}} | <br>| Logfile | {{/var/log/asterisk-scf.log}} | <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h2. User installed (defaults) <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{{<span class="diff-added-chars"style="background-color: #dfd;">INSTALL_</span>PREFIX=c:\AsteriskSCF-$\{VERSION\}}}</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br>h2. Digium provided installer <br> <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">{{<span class="diff-added-chars"style="background-color: #dfd;">INSTALL_</span>PREFIX=Program</span> Files\AsteriskSCF}} or <span class="diff-changed-words">{{<span class="diff-added-chars"style="background-color: #dfd;">INSTALL_</span>PREFIX=Program</span> Files (x86)\AsteriskSCF}}, as appropriate <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">{numberedheadings} <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>Work in progress.</td></tr></table></div>
<p>This page describes the installation structure for Asterisk SCF. It is intended to follow the <a href="http://www.pathname.com/fhs/pub/fhs-2.3.html" class="external-link" rel="nofollow">Filesystem Hierarchy Standard</a> as closely as possible.</p>
<div>
<ul>
<li><a href='#InstallationStructure-Defaults'>1. Defaults</a></li>
<ul>
<li><a href='#InstallationStructure-Othernotes'>1.1. Other notes</a></li>
</ul>
<li><a href='#InstallationStructure-NUX'>2. *NUX</a></li>
<ul>
<li><a href='#InstallationStructure-Userinstalled%28defaults%29'>2.1. User installed (defaults)</a></li>
<li><a href='#InstallationStructure-Digiumprovidedpackage'>2.2. Digium provided package</a></li>
<li><a href='#InstallationStructure-Systempackage'>2.3. System package</a></li>
</ul>
<li><a href='#InstallationStructure-Windows'>3. Windows</a></li>
<ul>
<li><a href='#InstallationStructure-Userinstalled%28defaults%29'>3.1. User installed (defaults)</a></li>
<li><a href='#InstallationStructure-Digiumprovidedinstaller'>3.2. Digium provided installer</a></li>
</ul>
</ul></div>
<h1><a name="InstallationStructure-Defaults"></a>1. Defaults</h1>
<p>The installation performed by <tt>make install</tt> or <tt>nmake install</tt> will follow a set of reasonable defaults. The exceptions listed below are established by the packaging script, not by the cmake scripts.</p>
<p>The Asterisk SCF cmake scripts provides several configuration variables, which function very similarly to <a href="http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables" class="external-link" rel="nofollow">autoconf's installation directory variables</a>. The names are similar, except the are cmake-ified. (They have the prefix <tt>INSTALL_</tt>, are all caps, and use underscores for word separators.) The directories are relative to <tt>INSTALL_PREFIX</tt>. Except, of course, <tt>INSTALL_PREFIX</tt> itself, which would be needlessly recursive.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <tt>INSTALL_PREFIX</tt> </td>
<td class='confluenceTd'> <tt>/usr/local</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_SYS_CONF_DIR</tt> </td>
<td class='confluenceTd'> <tt>etc</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_BIN_DIR</tt> </td>
<td class='confluenceTd'> <tt>bin</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_LIB_DIR</tt> </td>
<td class='confluenceTd'> <tt>lib</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_DATA_ROOT_DIR</tt> </td>
<td class='confluenceTd'> <tt>share</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_DATA_DIR</tt> </td>
<td class='confluenceTd'> <tt>share</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_INCLUDE_DIR</tt> </td>
<td class='confluenceTd'> <tt>include</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>INSTALL_LOCAL_STATE_DIR</tt> </td>
<td class='confluenceTd'> <tt>var</tt> </td>
</tr>
</tbody></table>
</div>
<p>Overriding a default requires specifying the value in the cmake invocation.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: bash; gutter: false"><![CDATA[
$ ./cmake/init-cmake.sh INSTALL_PREFIX=~/my-asterisk-scf
]]></script>
</div></div>
<p>In addition to the generic variables intended for use by configuration, the cmake scripts provide several variables intended for use within the scripts, which allow cleaner specification of which subdirectories we use within the system directories.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> Configuration </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_CONF_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_SYS_CONF_DIR}/asterisk-scf</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Executables </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_BIN_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_BIN_DIR</tt>} </td>
</tr>
<tr>
<td class='confluenceTd'> Libraries </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_LIB_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_LIB_DIR</tt>} </td>
</tr>
<tr>
<td class='confluenceTd'> Icebox modules </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_ICEBOX_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_LIB_DIR}/asterisk-scf/icebox</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Runtime data directory </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_LOCAL_STATE_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Logfile </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_LOG_FILE</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Headers </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_INCLUDE_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_INCLUDE_DIR</tt>}<sup>*</sup> </td>
</tr>
<tr>
<td class='confluenceTd'> Slices </td>
<td class='confluenceTd'> <tt>ASTERISK_SCF_INSTALL_SLICE_DIR</tt> </td>
<td class='confluenceTd'> <tt>${INSTALL_DATA_DIR}/asterisk-scf/slice</tt><sup>*</sup> </td>
</tr>
</tbody></table>
</div>
<p><sup>*</sup> All Asterisk SCF include and slice files must go in an <tt>AsteriskSCF</tt> subdirectory. But that's driven by the project structure, not the installation structure.</p>
<h2><a name="InstallationStructure-Othernotes"></a>1.1. Other notes</h2>
<ol>
        <li>Files associated with unit and integration tests (executables, icebox modules, configuration files) are not installed.</li>
        <li>The configuration files that get installed are merely sample configuration files, and as such have a <tt>.conf.sample</tt> file extension.</li>
        <li>Only include files necessary for integration shall be installed. For example, include files used within an Icebox module do not need to be installed, since the interface to the icebox module is described by its <tt>.ice</tt> files.</li>
</ol>
<h1><a name="InstallationStructure-NUX"></a>2. *NUX</h1>
<h2><a name="InstallationStructure-Userinstalled%28defaults%29"></a>2.1. User installed (defaults)</h2>
<p><tt>INSTALL_PREFIX=/usr/local</tt> (default)</p>
<p>Of course, the user can override anything they may wish.</p>
<h2><a name="InstallationStructure-Digiumprovidedpackage"></a>2.2. Digium provided package</h2>
<p><tt>INSTALL_PREFIX=/opt/AsteriskSCF</tt></p>
<p>With the following exceptions:</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> Configuration samples </td>
<td class='confluenceTd'> <tt>/etc/opt/AsteriskSCF</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Runtime data directory </td>
<td class='confluenceTd'> <tt>/var/opt/AsteriskSCF/lib/asterisk-scf</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Logfile </td>
<td class='confluenceTd'> <tt>/var/opt/AsteriskSCF/log/asterisk-scf.log</tt> </td>
</tr>
</tbody></table>
</div>
<h2><a name="InstallationStructure-Systempackage"></a>2.3. System package</h2>
<p><tt>INSTALL_PREFIX=/usr</tt></p>
<p>With the following exceptions:</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> Configuration samples </td>
<td class='confluenceTd'> <tt>/etc/asterisk-scf</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Runtime data directory </td>
<td class='confluenceTd'> <tt>/var/lib/asterisk-scf</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> Logfile </td>
<td class='confluenceTd'> <tt>/var/log/asterisk-scf.log</tt> </td>
</tr>
</tbody></table>
</div>
<h1><a name="InstallationStructure-Windows"></a>3. Windows</h1>
<h2><a name="InstallationStructure-Userinstalled%28defaults%29"></a>3.1. User installed (defaults)</h2>
<p><tt>INSTALL_PREFIX=c:\AsteriskSCF-${VERSION</tt>}</p>
<h2><a name="InstallationStructure-Digiumprovidedinstaller"></a>3.2. Digium provided installer</h2>
<p><tt>INSTALL_PREFIX=Program Files\AsteriskSCF</tt> or <tt>INSTALL_PREFIX=Program Files (x86)\AsteriskSCF</tt>, as appropriate</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/TOP/Installation+Structure">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=10650198&revisedVersion=5&originalVersion=4">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Installation+Structure?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>