Packaging the Sahana Deb

Automated Method

cvs -z3 -d:pserver:anonymous@sahana.cvs.sourceforge.net:/cvsroot/sahana co -P sahana-ext
sahana-ext/release/debian/debian_package.sh

Manual Method

Minimum requirements:
  • Debian GNU/Linux machine.
  • dpkg-dev package.

:!: Debian package naming conventions : If you've used Debian for any amount of time, you might have noticed that Debian package files all follow certain naming conventions. Every Debian binary package should have a filename that follows this format: packagename_version_arch.deb, where “packagename” is the name of the package, “version” is the package version with major, minor, and revision numbers, and “arch” is the architecture for the package.

howto:

* Download code as per: sahana_packaging_tar

* make directory structure,

mkdir -p debian/usr/share
mkdir -p debian/var/www

* copy your sahana directory to debian/usr/share/

cp -r sahana debian/usr/share
cd debian/usr/share
ln -s ../../usr/share/sahana/www sahana
cd ../../..

* crete a 'control' file which looks like this,

   
Package: sahana
Version: 0.6.2.2
Section: web
Priority: optional
Architecture: all
Depends: php5 | php5-mysql | mysql-server-5.0 , apache2 | httpd | apache | php5-gd
Maintainer: sahana <support@sahana.lk>
Description: This is deb package for Sahana project.

* crete a directory call “DEBIAN” under <debian> directory and move 'control' file there,

mkdir -p debian/DEBIAN
cp control debian/DEBIAN

* build your debian package,

fakeroot dpkg-deb --build debian

* Rename it to reflect your package version and architecture,

mv debian.deb sahana-0.6.2.2.deb

* Package is ready now, install it with,

dpkg -i sahana-0.6.2.2.deb

Navigation
  • Navigate