This HowTo provides a step by step method of creating a customized version of XASTIR via building from source as downloaded from Git. Downloading source from Git allows the user to stay on the "bleeding edge" if he so chooses. It is important to note that because one of the XASTIR developers uses OpenSUSE 10.2 now, there will be binary versions of XASTIR available for OpenSUSE 10.2 that are very up to date. Therefore installing from Git may not be not as important if the goal is to simply keep up with the latest version within a reasonable time frame.
There's a good chance this procedure will work with OpenSUSE 10.0 and 10.1 as well. Instead of adding the installation sources shown below, add the sources listed in the installation notes, *Notes:OpenSuse 10.x, then follow the remainder of the procedure here.
Preparing the system
Add Software Installation Sources
Depending on what features/functionality you want to install, you may not need all of the installation sources addressed here. However, I recommend taking the shotgun approach and adding all of the installation sources from the text that follows just in case you may need them later.
Note: The instructions below for using YaST apply to the KDE desktop - Gnome will differ slightly, but it's probably a safe bet (and my hope) that the OpenSUSE user already knows how to use YaST prior to installing XASTIR.
1. Launch the YaST Control Center and select Installation Source.
The YaST Control Center is started in KDE by clicking on the K-menu, then selecting Applications, then System, then Configuration. It can also be launched at a command line via /sbin/yast2
2. After selecting Installation Source, A new (YaST2) screen opens showing a list of configured software catalogs. Use the ADD button near the bottom to add the following new sources:
Note: if you installed openSUSE from a different server than suse.mirrors.tds.net, chances are that server also has a directory of /pub/opensuse/distribution/10.2/repo/src-oss/suse/, so if you prefer, you can substitute the server you installed from or add it in addition to the tds server.
3. Use the Source Settings button in the lower right portion of the YaST2 screen to enable the new software sources if their status is not ON.
4. Click the FINISH button to complete the changes, which closes the YaST2 screen.
1. At this point the YaST Control Center should still be open, so select Software Management, which will bring up the YaST2 screen again in search mode. Search for the following libraries and after each is found (and if not already checked) check the checkbox for the library, which puts in a queue to be installed: (see further instructions below for ImageMagick and OpenMotif)
- automake (required) - autoconf (reqired) - cvs (required) - gcc (required) - git (required) - xorg-x11-devel (required) - imagemagick (optional - but needed for printing) - gv (optional - but needed for printing) - xorg-x11-libXp-devel (optional - but needed for printing) - libax25 (optional)
On a new internet installation of openSUSE 10.2, only ImageMagick was already installed among the group above. I added ImageMagick-devel, which was not installed.
2. Once the boxes that need to be checked have been checked, click the accept button, which will install the libraries. You will be prompted if you want to install more libraries. Select no if your intent is to install a bare-bones version of XASTIR - otherwise select yes.
3. Install OpenMotif 2.2.4 - leave YaST open for step 4 if you chose "yes" above.
Due to an issue with the version of OpenMotif that OpenSUSE 10.2 uses, it is necessary to install an older version than what will be found by YaST. Use the following link to get the required OpenMotif libraries:
The two required files are as follows:
An easy way to install the libraries above is to use the Mozilla FireFox browser to link to the ftp site above. Select the first of the two OpenMotif files above while in FireFox, and the browser will give you the option of either saving to disk or installing with Zen Installer. Choose to install with Zen, and the file will be downloaded and installed automatically. The files need to be installed in the order they appear above.
4. This step can be skipped if you selected no at the end of the step 2. Search again in YaST for the following optional libraries:
- GraphicsMagick (check GraphicsMagick-devel) - wget - shapelib (check shapelib and shapelib-devel) - pcre-devel - berkeley (check db-devel from a relatively long list) - python-devel - festival (check festival and festival-devel) - gpsman (check gpsman and gpsmanshp) - libgeotiff (check libgeotiff and libgeotiff-devel) - gdal (check gdal and gdal-devel)
Note 1: the first 5 above are highly recommended as they enable online (internet) maps, shapefile maps, dbfawk, and map caching. GDAL is probably the least used among Xastir users. See *HowTo:MAPS for more information on what libraries are required for various map types.
Note 2: On a new internet installation of OpenSUSE 10.2, only wget, GraphicsMagick and db were already installed from the list above. In those categories, I added GraphicsMagick-devel and db-devel, which were not installed.
Note 3: There was some uncertainty as to whether the standard and "devel" libraries were both required for items such as GraphicsMagick, shapelib and libgeotiff, so I just selected both, and everything worked. Any feedback along those lines would be appreciated - I suspect in some cases only the -devel version is really needed.
4. After all check boxes have been selected for the libraries you want, click the accept button, which will install the remaining libraries. Select no when you are prompted to install more libraries.
The next section is taken from the HowTo for Ubuntu 6.10/7.04 as the procedure for retrieving the XASTIR source code is the same.
Get XASTIR source code
From a development snapshot or stable release
If you're not into living dangerously, your easiest way to get the Xastir source code is from one of the "tarballs" available for download at the Xastir sourceforge site (see the top level of the xastir web site for a link to it). Once you download the file, extract it with "tar xzf filename.tar.gz" (with the obvious replacement of "filename" with whatever your file is called) and follow the remaining instructions here.
From the "bleeding edge" Git repository
If you really want the latest developments of xastir immediately upon their being made, Git is the approach for you. In this method, you get your source code directly from the "repository" that the developers use to work on the software. See Notes:Git for details. Here's the step-by-step method for getting it this way.
In the steps below, you might have to change the "cd" and "mkdir" commands to suit your taste. I like to keep my projects separated rather rigidly into directories, and the steps below reflect my personal style. This does tend to make rather deep directory trees, but makes clean-up easy because everything's separate. Your mileage may vary.
- Get the source code per README.GIT or Notes:Git:
You can make different choices here for where you want to store your code. I'm putting it in a tree under my home directory:
mkdir src cd src git clone http://github.com/Xastir/Xastir
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
It is recommended to build the code in a separate directory from the source code so as to keep the source code tree clean at all times:
cd ~/src/Xastir mkdir -p build cd build ../configure make && sudo make install
Among other text, the following list will be displayed after running configure: If all of the libraries above have been installed, the output will look like what is shown below.
MINIMUM OPTIONS: Building with ShapeLib (Vector maps) ................. : yes ------------------------------------------------------------- RECOMMENDED OPTIONS: Building with GraphicsMagick/ImageMagick (Raster maps) : yes (GraphicsMagick) Building with pcre (Shapefile customization) ......... : yes Building with dbfawk (Shapefile customization) ....... : yes Building with rtree indexing (Shapefile speedups) .... : yes Building with map caching (Raster map speedups) ...... : yes Building with internet map retrieval ................. : yes (wget) ------------------------------------------------------------- FOR THE ADVENTUROUS: Building with AX25 (Linux Kernel I/O Drivers) ........ : yes Building with libproj (USGS Topos & Aerial Photos) ... : yes Building with GeoTiff (USGS Topos & Aerial Photos) ... : yes Building with Festival (Text-to-speech) .............. : yes Building with GDAL/OGR (Obtuse map formats) .......... : yes Building with GPSMan/gpsmanshp (GPS downloads) ....... : yes ------------------------------------------------------------- DEVELOPER OPTIONS: Building with ErrorPopups (Old Method) ............... : no Building with libgc (Debug memory usage) ............. : no Building with profiling (Debug code efficiency) ...... : no Building with Linux Standard Base (LSB) .............. : no
Note: it is certainly not necessary to load all of the libraries in order to exactly match the list above.
That's it, at a command line, type the following to launch XASTIR: