I've been using Alljoyn recently, but only the sources are distributed, and it's fairly difficult to compile programs against it. The recommended way to handle this seems to be to manually copy various files into your root filesystem, but I prefer not to do that for obvious reasons. Instead, I'm going to build Alljoyn packages, using fpm. My target system is Fedora 23, so I'll be building RPM's, but the advantage of fpm is that it can build any kind of package. If you're on Ubuntu or Debian, you can use the exact same commands and just change the -t argument from rpm to deb (and probably change any -devel suffixes to -dev for style reasons). If you need more Alljoyn packages, you can do similar processes and add -d alljoyn or -d alljoyn-devel to indicate dependencies.

FPM

To install fpm on Fedora 23:

sudo dnf install rubygems ruby-devel
gem install fpm

AllJoyn Daemon and Libraries

First we need a few dependencies. I'm probably missing some since I'm not willing to build a VM to test this at the moment:

sudo dnf install git scons openssl-devel gcc-c++

Building

Now get the sources for Alljoyn and build them.

export AJ_ROOT=`pwd`/alljoyn
mkdir -p $AJ_ROOT/core
cd $AJ_ROOT/core
git clone https://git.allseenalliance.org/gerrit/core/alljoyn.git
cd alljoyn
git checkout v14.12

I'm going to do a release build, since debug builds are massive, and I'm doing a 64-bit build, because this is 2015:

cd $AJ_ROOT/core/alljoyn
scons BINDINGS=cpp OS=linux CPU=x86_64 VARIANT=release BUILD_SERVICES_SAMPLES=off POLICYDB=on WS=off

fpm

Now everything is nicely built in build/$OS/$CPU/$VARIANT/dist/cpp/, except the inc folder needs to be named include, and (on a 64-bit system), lib needs to be lib64. Bafflingly, fpm doesn't have a good way to rename directories (the = syntax doesn't do what we want here).

cd build/linux/x86_64/release/dist/cpp/
cp -r inc include
cp -r lib lib64
cd ../../../../../..
fpm -a native -t rpm -s dir -n alljoyn -v 14.12 --prefix /usr -C build/linux/x86_64/release/dist/cpp/ bin/alljoyn-daemon lib64 include

This tells it: Build an RPM from a directory, name the result "alljoyn", version 14.12. The package should put everything in /usr. Change directory to build/linux/x86_64/release/dist/cpp/, grab bin/alljoyn-daemon, and the entire lib64 and include directories.

If we wanted to be fancy, we could instead build alljoyn containing everything in lib64, alljoyn-devel containing everything in include, and alljoyn-daemon containing just bin/alljoyn-daemon with a dependency on alljoyn:

fpm -a native -t rpm -s dir -n alljoyn -v 14.12 --prefix /usr -C build/linux/x86_64/release/dist/cpp/ lib64
fpm -t rpm -s dir -n alljoyn-devel -d alljoyn -v 14.12 --prefix /usr -C build/linux/x86_64/release/dist/cpp/ include
fpm -a native -t rpm -s dir -n alljoyn-daemon -d alljoyn -v 14.12 --prefix /usr -C build/linux/x86_64/release/dist/cpp/ bin/alljoyn-daemon

And now I can just install with dnf:

sudo dnf install alljoyn*.rpm