Commit 76bb6e9f authored by Andrew Senior's avatar Andrew Senior

Merge branch '2-nec-package-is-missing-in-ubuntu-16-04' into 'master'

Documentation updated for installation without Debian nec package

Closes #2

See merge request !1
parents 956020ac ccba2026
...@@ -28,16 +28,51 @@ package does not permit enough sources to be applied to the antenna structure to ...@@ -28,16 +28,51 @@ package does not permit enough sources to be applied to the antenna structure to
model the HF heating arrays. A patch is supplied in the <code>nec-patch</code> model the HF heating arrays. A patch is supplied in the <code>nec-patch</code>
subdirectory of the ERP model installation.</p> subdirectory of the ERP model installation.</p>
<p>If you are running Debian or Ubuntu, first install the <code>nec</code> <h3>Obtaining the NEC source code</h3>
<em>source</em> package into a location of your choice by doing
<h4>Debian/Ubuntu-based systems</h4>
<p>If you are running Debian or Ubuntu or a distribution derived from them,
first install the <code>nec</code> <em>source</em> package into a location of
your choice by doing
<pre> <pre>
<code>cd /path/of/your/choice</code> <code>cd /path/of/your/choice</code>
<code>apt-get source nec</code> <code>apt-get source nec</code>
</pre> </pre>
This will install the NEC source in the directory This will install the NEC source in the directory
<code>/path/of/your/choice</code>. You may need to install some other packages <code>/path/of/your/choice</code>. You may have to enable the &quot;source&quot;
so that <code>apt-get</code> can correctly set up the source (you should receive repositories before you can do this and you may need to install some other
a warning message if this is the case).</p> packages so that <code>apt-get</code> can correctly set up the source (you
should receive a warning message if this is the case).</p>
<h4>Distributions lacking the <code>nec</code> package</h4>
<p>Recent Ubuntu distributions (e.g. 16.04) and non-Debian/Ubuntu based
distributions do not have the <code>nec</code> package or if they do it may not
be based on the same source code. For these distributions, the process is a bit
more complicated.</p>
<p>First, create a directory where you want to install NEC and change into it
<pre>
<code>mkdir /path/of/your/choice</code>
<code>cd /path/of/your/choice</code>
</pre></p>
<p>Now, download the Debian <code>nec</code> source files into this directory.
They can be found at
<a href="https://packages.debian.org/source/jessie/nec">
https://packages.debian.org/source/jessie/nec</a>. The two files required are
<code>nec_2.orig.tar.gz</code> and <code>nec_2-16.diff.gz</code>. Unpack the
original source code and apply the Debian patch
<pre>
<code>tar zxvf nec_2.orig.tar.gz</code>
<code>cp -r nec-2.orig nec-2</code>
<code>zcat nec_2-16.diff.gz | patch -p0</code>
</pre>
You may see a warning from <code>patch</code> about patching a read-only file;
this is normal.<p>
<h3>Applying the patch</h3>
<p>You can now apply the patch in the following way <p>You can now apply the patch in the following way
<pre> <pre>
...@@ -45,12 +80,17 @@ a warning message if this is the case).</p> ...@@ -45,12 +80,17 @@ a warning message if this is the case).</p>
<code>patch -p1 &lt; /some/path/nec-patch/NEC-PATCH</code> <code>patch -p1 &lt; /some/path/nec-patch/NEC-PATCH</code>
</pre> </pre>
where <code>/some/path</code> is the path where the ERP model software was where <code>/some/path</code> is the path where the ERP model software was
installed above. Finally, the NEC software should be built using installed above. You may see a warning about trying to patch a read-only file;
this is normal. Finally, the NEC software should be built using
<pre> <pre>
<code>make</code> <code>make</code>
</pre> </pre>
You may have to install the <code>f2c</code> package in order to build the The code is built using the <em>f2c</em> Fortran-to-C translator and you may
NEC code.</p> have to install the <code>f2c</code> package (or equivalent on non-Debian
distributions) in order to build the NEC code. Note that there is no need to
do <code>make install</code> after running <code>make</code>. Indeed, doing so
would be inadvisable if you already have the <code>nec</code> package installed
for some other purpose.</p>
<h2>Setup</h2> <h2>Setup</h2>
<p>After installation, the first time a user runs the software, they will be <p>After installation, the first time a user runs the software, they will be
...@@ -80,7 +120,8 @@ subdirectory of the directory where you installed the model. The file is ...@@ -80,7 +120,8 @@ subdirectory of the directory where you installed the model. The file is
called <code>1970-01-01_tx.log</code>.</p> called <code>1970-01-01_tx.log</code>.</p>
<p>Copy this file to (or make a symlink to it in) your log file directory which <p>Copy this file to (or make a symlink to it in) your log file directory which
you configured during the setup process. Then start the model by giving the you configured during the setup process. You will need to create this directory
if it does not already exist. Then start the model by giving the
<code>erpmodel</code> command at the shell prompt (assuming you installed it <code>erpmodel</code> command at the shell prompt (assuming you installed it
as described above). Then at the Octave prompt, give this command as described above). Then at the Octave prompt, give this command
<pre> <pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment