From XastirWiki
Jump to: navigation, search


Set tabs to four characters, space filled. There should be no TAB characters appearing in the sources. For VIM, insert these lines into your ~/.vimrc file:

    :syntax on
    :set tabstop=4
    :set expandtab

For emacs, you should be able to use something like:

    (setq c-basic-indent 4)
    (setq tab-width 4)
    (setq indent-tabs-mode nil) 


Indentation should be four spaces.


Opening braces should be at the end of the line, closing braces should be aligned below the start of the construct:

    if () {
    else {

Blank Lines

Put five blank lines between functions. This is to more easily see where each function begins.


Submit each bugfix or new feature as a separate patch. This makes testing and debugging of the patches easier. Use "git diff -w -r HEAD -u" to create the patch file instead of "git diff -u". This will compare your new version to the latest Git version, instead of the Git version that you originally checked out. Someone may have changed the version in the Git repository since you checked out the file. Make sure you're not removing somebody elses patches (that they've committed to Git recently) unless that's what you intended to do.


Don't use the "snprintf()" function. Use "xastir_snprintf()" instead.


Patches: Use "diff -c" or "diff -u"


CFLAGS for more debugging:

    -O2 -Wall -Wpointer-arith -Wstrict-prototypes -W -pedantic

Autoconf and Friends

The "" in the top level of the Xastir source tree must be run whenever building Xastir from a new git clone. This script creates configure and all the files it needs, by running aclocal, autoheader, autoconf and automake.

If acinclude.m4,, or any has been changed you must rebuild 'configure' by rerunning the "" script.

Bumping Version Number

To bump the version number, change AC_INIT in and then run bootstrap.

Building Source and Binary RPM's

NOTE: The Xastir project hasn't built source or binary RPMs in ages, and the instructions here may be completely wrong now.

Building source and binary RPM's. The example system in this case is SuSE Linux:

Check the file to make sure that all of the parameters at the top are correct. In particular check and update the "Release" and "Packager" lines. Release should be incremented by one for each new RPM with the same type of naming.

    mkdir -p build
    cd build
    make dist
    cp xastir-1.3.0.tar.gz /usr/src/packages/SOURCES/.
    su     /* must run rpm as root */
    cd /usr/src/packages/SOURCES
    tar xzf xastir-1.3.0.tar.gz
    rpmbuild  -bb  --clean  xastir-1.3.0/xastir.spec  /* Build binary RPM */
    rpmbuild  -bs  --clean  xastir-1.3.0/xastir.spec  /* Build source RPM */
    rpmbuild  -ba  --clean  xastir-1.3.0/xastir.spec  /* Build both RPM's */

These go through the entire build process, including configure and make, and clean up the cruft that would have been left in the /usr/src/packages/BUILD/ and /var/tmp/ directories.

When it's all done, the RPM's will be in:




    rm -rf /usr/src/packages/SOURCES/xastir-1.3.0/
    rm /usr/src/packages/SOURCES/xastir-1.3.0.tar.gz

Release the new RPM files.

The new method is to run "BUILDRPMS" (and "LSB-BUILD" to create the LSB binary).

Language Files

If adding lines to one of the config/language* files, please add the same line to the other language files in English. Translators will eventually translate the English lines to the native languages.

Doing a Release

See the file "" in the Xastir source tree for details on what to do to create a release.

Once upon a time we sent e-mail notices to:

,----Development Release Notices
| ,--Full Release Notices
| |
* * xastir at
* * nwaprssig at
* * aprssig at
* * aprsnews at
* * macaprs at
* * aprs at
  * SAR_APRS at
  * CSAR at
  * aprs at
  * linux-hams at
  * linux at
  * linux-hams-using-ax25 at

This list is very likely excessive now and should probably be pared down.

  • Submit a Project News posting on the site using the recommended items in the posting.