Build Ubuntu packages for JXTA-C
Kudo to Alexander Sack, the Debian developer for Firefox, Thunderbird, etc, JXTA-C now can be build as Debian packages.
One of the thing we want to do, is to provide binary build regularly, JXTA JSE provides nightly builds, I hope JXTA-C can do weekly builds. I happen to have a Ubuntu AMD64 running, so I decided to setup the build environment. Here is the steps on how it was done, and maybe it can help others who are interested in building JXTA-C on Debian or Ubuntu.
While most of JXTA-C depended libraries are available in Ubuntu dapper(I had included universe components), libapr1-dev and libaprutil1-dev are only available from Debian testing. While I am not comfortable to add Debian binary repo into sources.list(not sure how apt will handle duplicate packages available from multiple repos), I can build the deb package easily from the source deb.
So, I need to tell Ubuntu it can get the source deb from Debian testing repo by appending following line to /etc/apt/sources.list
deb-src http://http.us.debian.org/debian testing main contrib non-free
Before you can do apt-get update, you will need to add the Debian repo key to the keyring.
gpg --keyserver pgpkeys.mit.edu --recv-key 2D230C5F
gpg -a --export 2D230C5F | sudo apt-key add -
Next step is to get the source deb for libapr1-dev and libaprutil1-dev, it is as simple as:
apt-get update
apt-get source libapr1-dev
apt-get source libaprutil1-dev
Almost ready to build, just we need to make sure all build dependencies for libapr1 and libaprutil1 are met and build:
apt-get install libexpat1-dev libdb4.4-dev libpcre3-dev dpatch libpq-dev python uuid-dev doxygen libldap2-dev libsqlite3-dev
dpkg-buildpackage -rfakeroot
Now, we want to build the latest jxta-c, so I download the latest jxta-c release and the diff for Debian:
apt-get install libxml2-dev zlib1g-dev
wget http://download.jxta.org/build/release/c/2.5.1/jxta-c-2.5.1.tar.gz
wget http://people.debian.org/~asac/unstable/jxta-c_2.5.0.1-1.diff.gz
mv jxta-c-2.5.1.tar.gz jxta-c_2.5.1.0.orig.tar.gz
gzip -cd jxta-c_2.5.1.0.orig.tar.gz | tar xvf -
cd jxta-c-2.5.1
patch -Np1 < ../jxta-c_2.5.0.1-1.diff.gz
Last step, modify Debian control files, update version in debian/rules, and add information to debian/changelog, we are ready to build:
dpkg-buildpackage -rfakeroot
Now you can install the jxta-c Debian packages. :-)
Posted by 监控 on October 22, 2006 at 07:48 PM PDT #
Posted by Ingo Maindorfer on March 25, 2007 at 02:50 AM PDT #