TotalOpenStation package

ArcheOS logo

This package is intended to describe the ArcheOS modification and packaging to the TotalOpenStation (tops) application.



  • python-stdeb
  • git-buildpackage
  • cowbuilder (or pbuilder)

Configuration files


this section will go into some included file for every package

In ArcheOS we use some configuration file for git-buildpackage, pbuilder and quilt to avoid typing every time the same commands. All instructions below assumes that you have the following configuration files in the home of the user who builds the packages (or similar):

  • ~/.gbp.conf
export-dir = ../build-area/
tarball-dir = ../tarballs/
builder = /usr/bin/git-pbuilder -sa
# use 'DIST=wheezy git-pbuilder create' to create the archive
# upgrade periodically with DIST=wheezy git-pbuilder update
dist = wheezy
pbuilder = True
upstream-tree = master
  • ~/.pbuilderrc:
  • ~/.quiltrc
QUILT_DIFF_ARGS="--no-timestamps --no-index -p ab --color=auto"
QUILT_REFRESH_ARGS="--no-timestamps --no-index -p ab"

These files can be useful also for other debian packaging too.


Repository fork

The upstream repository for this package is We need to fork it into archeos/totalopenstation ( using the GitHub web interface so we can push our modifications.

Then we will clone it at tag 0.3 that is the latest stable release we are interested in.

  • git clone -b 0.3

Creation and first import

  • Enter the totalopenstation folder
  • Create a master branch from the 0.3 tag: git branch master 0.3
  • Switch to the master branch: git checkout master

Create the debian folder:

  1. python --command-packages=stdeb.command debianize

Enter the debian/ dir and change:

  1. changelog
    • Maintainer
    • Message to Initial release.
    • distribution from unstable to theodoric
  2. compat
    • from 9 to 8
  3. control
    • Rename the binary package from python-totalopenstation to totalopenstation
    • Move the Maintainer to X-Original-Maintainer:
    • Change Maintainer: to you
    • Remove python-all and use python instead in Build-Depends:
    • Change debhelper from 9 to 8 into Build-Depends:
    • Change Standard-Version: to 3.9.3
    • Remove formatting from description
  4. rules
    • Remove export PYBUILD_NAME line
    • Remove --buildsystem=pybuild
    • Add export DH_OPTIONS and INSTDIR=debian/tmp at the beginning
    • Add these overrides:
    dh_auto_install --destdir=$(INSTDIR)


We can now commit the changes with git commit -a -m 'Debianization'.

  1. totalopenstation.install
usr/bin/*.py usr/share/totalopenstation/
totalopenstation.desktop usr/share/applications/
totalopenstation.svg usr/share/icons/
  1. totalopenstation.links
usr/share/totalopenstation/ usr/bin/totalopenstation-cli-parser
usr/share/totalopenstation/ usr/bin/totalopenstation-cli-connector
usr/share/totalopenstation/ usr/bin/totalopenstation-gui

Icons and desktop file

In the development version of totalopenstation there will be an icon and a .desktop file that will go into /usr/share/{applications,icons} but in the 0.3 tag we need to add these to the package and patch it using quilt.


quilt is a tool used in debian packaging to avoid invasive modifications to the upstream package. Each modification will be “transformed” into a patch that will go into the debian/patches folder. In debian packaging the debian/ folder is the only folder that will be added to the original software.

  • quilt new icon-and-files.patch
  • quilt add totalopenstation.desktop totalopenstation.svg

Now let’s copy the totalopenstation.destkop and totalopenstation.svg files into the package main folder. The desktop file could be something like this:

[Desktop Entry]
Name=Total Open Station
Comment=Download and export survey data from your total station]

The icon needs to be copied from some other place...

  • When all files are copied you can actually build patches with quilt refresh
  • Unapply all patches to do a “clean” package with quilt pop -a
  • Ignore the .pc folder with echo '.pc' >> .gitignore
  • git add .gitignore debian/patches
  • git commit -m 'patches'

The package can be now build with:

  • mkdir ../build-area/
  • git-buildpackage


The build-area folder can be also specified as default into the ~/.gbp.conf file so we don’t need to pass --git-export-dir= option every time.

If the build is successful we can now add an entry to the changelog updating the version to 0.3archeos-1.

  • git dch -R

And let git-buildpackage tag the repository for us with:

  • git-buildpackage --git-tag-only

After the compilation we will find all files we need into the ../build-area/ folder, including debs and archives. We will upload to the reprepro repository later.

Push all our stuff to the remote repository with:

  • git push
  • git push --tags

Daily packaging

Once the package has been built the first time we only need to follow the usual ArcheOS/git-buildpackage workflow to build it: if we check tags (git tag --list) we will see that a new tag called debian/0.3.1-archeos1 has been automatically created for us.

  • git-buildpackage

To rebuild the totalopenstation package.

Fork me on GitHub