This HowTo is based on the HowTo for Debian Squeeze. It gives instructions for building Xastir from CVS on Sidux 2010-01 with all supported libraries enabled. It assumes the user already has a working installation of Sidux 2010-01, either on a physical machine or a virtual machine.
Note: the steps in this write-up were done on a fresh installation of the "KDE-lite" version of Sidux 2010-01.
Contents
If you already installed the binary version
Fyi, the description below originally appeared in one of the Ubuntu HowTo documents. Although I expect it does apply to this Debian based Linux distribution given there is a Xastir binary in the Debian repositories, I have not tried installing the binary version in Sidux and then removing it using this procedure.
If you installed a binary version of xastir using the "apt-get install xastir" option (or via Synaptic), you'll have a somewhat outdated version, and it will have installed into /usr instead of /usr/local. The source install described on this page will install into /usr/local, so you'll want to remove your binary install first before following these directions.
If you did a lot of map configuration with the binary install, all of your maps will be in /usr/share/xastir/maps. You'll need to copy those to a safe place before removing the binary install:
mkdir /tmp/maps cp -r /usr/share/xastir/maps/* /tmp/maps
Then remove the binary package:
su (enter your root password if prompted) apt-get remove xastir exit
You can then follow the instructions below to re-install xastir to /usr/local from sources. Once you're done, copy your maps back to the new installation directory:
su cp -r /tmp/maps/* /usr/local/share/xastir/maps exit
Then you need to edit your ~/.xastir/config/xastir.cnf file to change all instances of "/usr/share" to "/usr/local/share"
You'll be back in business with a more easily updated xastir.
Preparing the system
First, make sure you have a working Sidux 2010-01 installation. Also check that you can access the Internet. If your installation is very important to you, it is advisable to make a complete backup of your system, just in case something goes wrong.
Add the following repository to your /etc/apt/sources.list.d/debian.list file
deb http://ftp.de.debian.org/debian unstable main contrib non-free
The line above can be added to the debian.list file by entering the following at the command line in a terminal:
su (enter your root password when prompted) echo "deb http://ftp.de.debian.org/debian unstable main contrib non-free" >> /etc/apt/sources.list.d/debian.list
Next resync the repositories
apt-get update
Optionally you can upgrade installed packages with the following command
apt-get upgrade
If there was a kernel upgrade or something you may want to reboot your system before proceeding.
Start installing packages
- Get the basic set of build tools:
Note: if you are already in root mode after the previous step, there is no need to enter "su" again.
su apt-get install build-essential
Build essential was already installed by default in the KDE-lite version, so chances are you will see a message indicating same
- Get the libraries essential for building xastir:
apt-get install cvs autoconf automake libmotif-dev imagemagick gv libxp-dev libxpm-dev
These packages are required for the most basic minimum build of xastir. gv is not strictly required, but if you don't install it you will be unable to print. Note that this imagemagick package is not the one that gives you on-line map support, it's the one that provides the "convert" utility needed to create the postscript that gv will use to print. This package and gv are both required to be able to print from xastir even with minimal map support.
- Get additional libraries that will help for extra features:
apt-get install gpsman gpsmanshp libpcre3-dev proj libdb4.8-dev python-dev libax25-dev shapelib libshp-dev festival festival-dev libmagickcore-dev exit
Note: Be sure to type exit as shown above in order to exit out of superuser mode.
Get XASTIR source code From the "bleeding edge" CVS repository
In this method, you get your source code directly from the "repository" that the developers use to work on the software. See Notes:CVS for details. Here's the step-by-step method for getting it this way.
- Prepare your .cvsrc if you don't have one (do this in your home directory)
ls -l ~/.cvsrc
If the ls command shows that you already have a .cvsrc file in your home directory, skip this next step.
Create a .cvsrc file in a text editor:
cat > ~/.cvsrc cvs -z3 update -P -d status -v diff -u type control-D to finish creating the file
- Get the source code per README.CVS or Notes:CVS:
You can make different choices here for where you want to store your code. I'm putting it in a src directory under my home directory:
mkdir ~/src cd ~/src cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir login cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co xastir
The "login" line will result in a prompt for a password. Simply hit "Enter" here, as there is no password.
The last command could take a while to finish if you're on a slow link, as there are a lot of files to download.
- Run bootstrap to generate Makefile.am and configure:
cd xastir ./bootstrap.sh
Build the fully-enabled xastir
To get a fully-functional version of xastir, you need to install a few more libraries from source code instead of from apt-get.
Install libgeotiff
- Download the libgeotiff source
As of this writing, the latest libgeotiff source can be downloaded like this:
cd ~/src wget ftp://ftp.remotesensing.org/pub/geotiff/libgeotiff/libgeotiff-1.2.5.tar.gz
- Unpack libgeotiff
tar zxvf libgeotiff-1.2.5.tar.gz cd libgeotiff-1.2.5/
- Build and install libgeotiff
./configure --with-ld-shared="gcc -shared" make su make install ldconfig exit
If you don't want/need GDAL, skip the GDAL installation below. GDAL is for advanced users and installing it will consume more time and use more disk space.
Install GDAL
- Download the GDAL source
As of this writing, the latest GDAL source can be downloaded like this:
cd ~/src wget http://download.osgeo.org/gdal/gdal-1.6.2.tar.gz
- Unpack GDAL
tar zxvf gdal-1.6.2.tar.gz cd gdal-1.6.2
- Build and install GDAL:
./configure make su make install ldconfig exit
The GDAL 'make' step typically takes a long time to complete
Install Xastir
You've now got all the libraries in place and can build the fully enabled code.
- Configure the code:
cd ~/src/xastir ./configure
You should be rewarded with a list of features that all say "yes" after them. If you followed all the steps above, that should look like this:
xastir 1.9.9 has been configured to use the following options and external libraries: MINIMUM OPTIONS: ShapeLib (Vector maps) ................. : yes RECOMMENDED OPTIONS: GraphicsMagick/ImageMagick (Raster maps) : yes (ImageMagick) pcre (Shapefile customization) ......... : yes dbfawk (Shapefile customization) ....... : yes rtree indexing (Shapefile speedups) .... : yes map caching (Raster map speedups) ...... : yes internet map retrieval ................. : yes (wget) FOR THE ADVENTUROUS: AX25 (Linux Kernel I/O Drivers) ........ : yes libproj (USGS Topos & Aerial Photos) ... : yes GeoTiff (USGS Topos & Aerial Photos) ... : yes Festival (Text-to-speech) .............. : yes GDAL/OGR (Obtuse map formats) .......... : yes GPSMan/gpsmanshp (GPS downloads) ....... : yes
- Build the code:
make su make install exit
- Enjoy! You now have a fully functional xastir with all features enabled. You can launch it like this:
xastir
The first time Xastir is run it'll pop up a dialog box asking you to set some station parameters.
Additional points
Updating Xastir
The developers are always adding new features to Xastir and fixing bugs. You'll likely want to update your Xastir semi-regularly. Fortunately for you, you don't have to repeat all of the above steps each time. Updating is actually very simple:
cd ~/src/xastir cvs update ./bootstrap.sh ./confgure make sudo make install
Or there is a script that will run the commands for you:
cd ~/src/xastir ./update-xastir
Festival
You have to start the festival server by hand in a shell window before starting xastir.
festival --server &
Clicking File->Configure->Speech in xastir, I could get it to talk just by clicking the "Test" button in the dialog.