[GNC-dev] Help packaging GnuCash 3.x for Ubuntu Bionic

Tommy Trussell tommy.trussell at gmail.com
Wed Oct 9 12:32:37 EDT 2019


Here's a tested working procedure for building and installing GnuCash under
Ubuntu Bionic 18.04 LTS. I presume it should also work with Mint or any
other distro based on Bionic.

REQUIREMENTS
An Ubuntu Bionic installation *with bionic-backports activated. (I used a
minimal Xubuntu installation in a VirtualBox VM for this test.)

1) Create a source directory

  $ mkdir bionic37
  $ cd bionic37

2) Get the latest Ubuntu package

  $ dget
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnucash/1:3.7-1ubuntu1/gnucash_3.7-1ubuntu1.dsc

2b) Move into the directory created by the source package

  $ cd gnucash-3.7

3) Comment out a build flag line in debian/rules so it will build in Bionic

  $ sed -i 's/export DEB_CXXFLAGS/#export DEB_CXXFLAGS/' debian/rules

4) Make this your custom version (so any "official" release should
supersede it).

  $ dch --nmu

4b) Edit the version at the top so it reads something like
  gnucash (1:3.7-1ubuntu18.04~1)

4c) Add a comment under your name and email in the first comment saying
something like
  "Commented out DEB_CXXFLAGS instruction in debian/rules"

4d) Save and exit the editor.

5) Upgrade debhelper

  $ sudo apt install debhelper/bionic-backports

6) Build the package

  $ dpkg-buildpackage

7) You will see the package files in the bionic37 directory, ready to
install.

  $ sudo dpkg -i *.deb *.ddeb

  $ sudo apt install -f

The dpkg -i command above attempts to install gnucash .deb files (and the
optional .ddeb debugging files). In a fresh installation, "dpkg -i" will
fail because of missing dependencies, so the "apt install -f" command will
install the missing dependencies and finish installing gnucash.


More information about the gnucash-devel mailing list