Create an ubuntu package for openwengo using checkinstall and a custom install script
Thursday, July 20th, 2006openwengo 2.0 is almost out, but there’s still no Debian/ubuntu package for it.
As I don’t want to install it manually on all my machines, I automated the operation to create a debian package.
First we need to write an install script that installs openwengo. I chose to install the wengophone application in /usr/local/lib, so you might want to change that script. You can download the full script with error handling from here.
Here’s a simple version:
cd /tmp # note of course there's no space between wg and et, but wordpress doesn't let me enter the word... # See http://forums.asmallorange.com/index.php?s=f9062ac4cefe11274870830330699d58&showtopic=3631&st=0&p=26154entry26154 wg et http://download.wengo.com/wengophone/rc/WengoPhone-2.0-rc1-linux-b in-x86.tar.bz2 echo "f67c2c95e5e02776348a966ba9f14dd5 WengoPhone-2.0-rc1-linux-bin-x86.tar.bz2" | md5sum -c - rm -rf wengo mkdir wengo tar -joxf WengoPhone-2.0-rc1-linux-bin-x86.tar.bz2 -C wengo/ chmod -R uog+r /tmp/wengo/wengophone-ng-binary-latest/* chmod -R u+w /tmp/wengo/wengophone-ng-binary-latest/* chmod 755 /tmp/wengo/wengophone-ng-binary-latest/*.sh /tmp/wengo/wengophone-ng-binary-latest/qtwengophone mv /tmp/wengo/wengophone-ng-binary-latest/ /usr/local/lib/wengophone mkdir -p /usr/local/bin ln -s /usr/local/lib/wengophone/wengophone.sh /usr/local/bin/wengophone
Now all you have to do is create a debian package using checkinstall.
> sudo checkinstall -D ./install.sh
Answer the questions. My package information ends up like this:
jerome@dolcevita:~$ apt-cache show openwengo Package: openwengo Status: install ok installed Priority: extra Section: net Installed-Size: 32 Maintainer: Jerome LacosteArchitecture: i386 Version: 2.0-rc1-1 Description: OpenWengo is an multi-platform open source VoIP application that supports the SIP protocol.
The script will auto-download the archive from Wengo’s site, install it and create a .deb file for you to reuse.
update: this method won’t create a package that reuses the shared libraries available in your other repositories (such as gaim ones), so the resulting package will be big. This is a temporary solution until a real package is created.