Michael Haberler's new branch supports the Xenomai Realtime kernel. Information on installing it can be found here: NewRTInstall.
This is prerequisite to building the kernel itself.
The recipe is here: XenomaiUserlandPackage
Tutorials for two ways of doing this:
This is a quick way to build a one-off kernel package.
The recipe is here: XenomaiKernelPackageFromTarball
This is suitable for a kernel package maintainer who wants to provide sustained, updated kernel packages.
The workflow for tracking the upstream Ubuntu kernel tree isn't worked out yet, but this will build a proper kernel package with a new xenomai "flavour".
The recipe to get started is here: XenomaiKernelPackageFromUbuntuGit