Wednesday, February 10, 2016

Building Bluez 5.37 on Debian Jessie

Working on an Emtrion sbc-sama5d36 ARM Cortex-A5 setup using Debian Jessie. With Emtrion support, Elbe was used to build the base debian system. Then a bunch of build packages were added to the build (any easy way to add these packages is the apt-get build-dep bluez):
build-essential perl flex bison python3 autoconf automake dh-autoreconf autotools-dev debhelper dh-make dh-systemd devscripts fakeroot check libdbus-glib-1-dev libglib2.0-dev libcap-ng-dev libudev-dev libreadline-dev libical-dev file git lintian patch patchutils pbuilder vim
Once booted I was then ready to build bluez 5.37, first step was to clone the bluez git repository:
git clone git://
Change into the bluez folder:
cd bluez
We want to get the 5.37 release so we checkout as follows:
git checkout tags/5.37
Then get the debian folder from the previous version of bluez, this is what is used to build bluez and is placed in the bluez folder created by the git clone.

Thus, get the compressed tar file:
and then uncompress and place in the bluez folder
tar xJvf bluez_5.36-1.debian.tar.xz -C ./
now use your favorite editor (like vim) to modify the changelog to a new version.
vim ./debian/changelog
It is important that you match the previous entries and there is no leading spaces. Something like this will suffice:
bluez (5.37-1) unstable; urgency=medium

  * Update to 5.37. 

-- Name  Sat, 07 Jan 2016 11:47:02 +0900
I also had to modify the rules file to avoid a dpkg-shlibdeps error. To do this just modify the rules file.
vim ./debian/rules
By adding the following in the %: section as follows (where the dh $@ --with systemd,autoreconf already exists) :
 dh $@ --with systemd,autoreconf

 dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
Note, you want a tab not a space before dh_shlibdeps.
Now just run buildpackage command and wait forever.
dpkg-buildpackage -j4 -b -uc -us
The end result will be the creation of a bunch of debian bluez packages in the directory above bluez:

No comments:

Post a Comment