
LinPac version 0.28 (stable release)
Copyright (c) 2021 by David Ranch (KI6ZHD) and Martin Cooper (KD6YAM)

Linpac is a modular, Ncurses console-oriented AX.25 packet radio terminal with a 
built-in messaging client.  Using Linux's native AX.25 network stack, it
can support eight concurrent connected sessions (QSOs) as well as send
UNPROTO packets (UI) to any preconfigured ax25 digi path.  Local messaging 
support is currently fairly simple yet Linpac is designed to relay all
messages to remote BBSes for full messaging if configured.  Linpac "stable"
currently supports an Ncurses-based CLI client but there is also an unstable 
Java-based client/server version with a GUI client that's partially 
operational but needs work.

If you encounter any problems when compiling or using LinPac please go to
http://linpac.sourceforge.net for support.


Current contributors:

  - David Ranch (KI6ZHD)
       Packet radio mail: KI6ZHD@N0ARY.#NCA.CA.USA.NOAM

  - Martin Cooper (KD6YAM) - Polling load reduction; mail bug fixes; many warning cleanups
  - Jerry Dunmire (KA6HLD) - Auto-tools
  - Steven Loomis (K6SPI)  - Misc patches


Many thanks to the original author of Linpac for creating this flexible
and valuable package for Linux:

   Radek Burget OK2JBG ( radkovo@centrum.cz )


QUICK INSTALATION FROM A RELEASE PACKAGE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Release packages can be identified by the presence of the ./configure in
this directory. If the ./configure script is not present, then see the
'Hacking' instructions below.


  Optional: 
  ---------
  If you plan to use Linpac for recieving and sending your packet mail via a
  remote BBS system (not required), you must install the ax25mail-utils 
  package first BEFORE first running Linpac. This package can be found
  at http://ax25mail.sf.net


Before compilation of Linpac, you must have these other packages installed:

  NOTE: Though some distributions offer the AX25 libraries natively in 
        their own repositories, they are usually very old and lack several
        important fixes.  You can read more about these improvements here:

           https://github.com/ve7fet/linuxax25


   Required dependencies:
   ~~~~~~~~~~~~~~~~~~~~~~
   Debian / Ubunutu package names:    libax25 ax25-apps libncurses5-dev perl
                 Optional install:    ax25-tools ax25-xtools ax25mail-utils

   Centos / Fedora package names:     libax25 ax25apps ncurses-libs perl
                 Optional install:    ax25tools ax25mail-utils


        I recommend all users install or build the AX.25 stack from 
        this alternative provider for now:

           https://github.com/ve7fet/linuxax25


Once you have installed the above dependencies, please run:

              ./configure

NOTE:  If the "configure" prompt isn't present, you probably got your source
       code from Git. If so, run the following:

              autoreconf --install
              ./configure


       If autoreconf doesn't run, it probably means you need to install Autotools:

          deb-based: 
                         sudo apt-get install automake autoconf

          rpm-based
                         yum install automake autoconf


       If "autoreconf --install" fails with:
 
          src/applications/liblinpac/Makefile.am:4: error: Libtool library used but 'LIBTOOL' is undefined
          src/applications/liblinpac/Makefile.am:4:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
          src/applications/liblinpac/Makefile.am:4:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
          src/applications/liblinpac/Makefile.am:4:   If 'LT_INIT' is in 'configure.ac', make sure
          src/applications/liblinpac/Makefile.am:4:   its definition is in aclocal's search path.

       Do the following:

          deb-based: 
             sudo apt-get install libtool
             libtoolize 
             autoreconf --install

          rpm-based: 
             sudo yum install libtool
             libtoolize 
             autoreconf --install


The default installation destination directory prefix is /usr/local/*.  If you 
want to change this, add the following configuure --prefix switch:

             ./configure --prefix=DIR

where DIR is the new destination directory prefix.
(LinPac installs into PREFIX/bin and PREFIX/share/linpac)

After this just type
    
             make

to compile the package.  At that point, you can install the application a few
ways:

            For Debian/Ubuntu folks:
            --
            Consider using the "checkinstall" tool instead of "make install".  
            This tool must be installed seperately but it will run the 
            equivelent of "make install" but instead, wrap everything into an 
            unofficial .deb file with proper packaging

or
            For rpm based folks:
            --
            Consider using the included contrib/packaging/rpm/linpac.spec
            file with the rpmbuild tool.  This tool must be installed seperately
            but takes care of creating a clean RPM package to install
or

            # The old classic way
            make install
            ldconfig
or
            make install-strip
            ldconfig


One of these options will install Linpac onto your system.  The "install-strip" 
command will also strip the debugging information from the program (the installation 
is then MUCH SMALLER) but harder to report issues to the developer.


ONCE INSTALLED
~~~~~~~~~~~~~~
Once Linpac is installed, you MUST configure the Linux AX.25 system first.
Linpac is only an application that uses a fully functional AX.25 stack.
Please review the various resources on the Internet on how to do this 
such as:

  - Official AX25 HOWTO (old, dated but still useful)
    http://tldp.org/HOWTO/AX25-HOWTO/

  - John Ackermann's pages: 
    http://www.febo.com/packet/linux-ax25/ax25-config.html

  - David Ranch's pages:
    http://www.trinityos.com/HAM/CentosDigitalModes/hampacketizing-centos.html#7.ax25initsetup



KNOWN PROBLEMS
~~~~~~~~~~~~~~

  - There are reported issues with Ncurses 6.1 (not 6.0) and Linpac where this buggy 6.1 version
    is present in Raspbian Buster (10.1), Ubuntu 18.04, etc.  Examples include:

       * in the monitor window, the first character is sometimes being cut off, but many times 
         it's not cut off and looks fine.
       * in the mail window, weird things are going on with the "background window"

    A workaround for now is to run the following command before you run Linpac:

       export TERM="simpleterm"


  - Signifincant issue with AX.25 and Raspbian Stretch

    I have confirmed that with Raspian Stretch, there is some sort of conflict with
    it's newly enabled predictable network interface names. What are those? If you
    run the command "ifconfig" or "ip addr", you will no longer see Ethernet
    interfaces with names like "eth0" but instead, you'll see something like
    "enxb827eb5f05". How's that for catchy? For known reasons to the AX.25 kernel
    maintainers, in the sa_data kernel data structure, both the stock Raspbian AX.25
    .debs and the 3rd party VE7FET ax.25 debs will give errors like the following when
    ANY network interface name is longer than 13 characters:

      SIOCGIFHWADDR: No such device

    Programs like beacon will fail to start. Linpac will also crash upon start with

      /usr/bin/linpac: line 181:  9811 Segmentation fault   $PKG_BINDIR/linpac $*

    Fortunately, if you disable predictable network interface names, things work fine.
    To do this, do the following steps:

      sudo vi /boot/cmdline.txt

        #append the following to the end of the one line in this file
        net.ifnames=0 biosdevname=0

    Reboot your Raspberry Pi and things will work from there on out. Btw, if Linpac
    crashed on you, your terminal might be screwed up and not working properly.

    To fix that, run the commands:

      stty sane
      rm -f rm /var/lock/LinPac.0

  
  - The --enable-LINKSTATIC configuration option does not work.

  Please see the linpac-todo.txt file in this source package as well as see 
  http://linpac.sf.net for other possible problems and their solutions.


NOTES FOR HACKING with the Source code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's always recommended to start with the "develop" Git branch as it will
always have the newest code.  From there, a clean checkout from the source 
repository is not ready to configure and compile. You will need the GNU 
autotools (https://en.wikipedia.org/wiki/GNU_build_system) to create the
./configure script and Makfile templates. Once the autotools are
installed the full build procedure is:

    autoreconf --install
    ./configure
    make
    make install

You can make a release package for distribution using:

    make dist

For debugging Linpac, it is useful to run Linpac in the place of compile 
without installing it. For this the command 'make noinstall' can be used. 
This will create the directory structure in the ./src directory. This is 
only available with the staticaly linked applications.


CONFIGURATION OPTIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most of the configuration options are described in the INSTALL file.

[broken at the moment]
  There is one custom option for linpac; --enable-LINKSTATIC.

  The applicatons are linked using the shared library by default (the library
  liblinpac.so is installed in /usr/local/lib). You can link all the
  applications staticaly by running

            configure --enable-LINKSTATIC


