Create or Update a Debian package

From Organic Design wiki
Revision as of 09:15, 25 June 2008 by Nad (talk | contribs) (packages are quite easy)
Procedure.svg Create or Update a Debian package
Organic Design procedure

General procedure

Here's an example directory structure for a package which replaces the apache default config file and sets up default php and html files in /var/www.

The control file in the DEBIAN sub-directory is the all the main configuration is done. The other three files in that sub-directory are scripts which execute on installation and removal of the package.

The rest of the directory structure outside the DEBIAN sub-directory define the directory structure which will be merged with the root of the filesystem when the package is installed.

To turn the directory structure into a proper .deb package file, use:

dpkg -b <package-directory>

The package will be created with the same name but with the .deb extension in the same directory as the package directory.

Specific OD Packages

organicdesign-server

The ultimate purpose of the organicdesign-server package is to replace the Debian Post Install script.

Package: organicdesign-server
Version: 1.0
Section: admin
Priority: optional
Architecture: all
Essential: no
Depends: build-essential, p7zip-full, bzip2, rar, htmldoc, subversion, mysql-server-5.0, apache2, libapache2-svn,
         libapache2-mod-php5, php5-mysql, php5-gd, php5-xsl, php5-curl, php5-sqlite3, imagemagick, perlmagick,
         librsvg2-bin, libwww-perl, libio-socket-ssl-perl, libtimedate-perl, libnet-scp-expect-perl
Maintainer: Aran Dunkley [aran@organicdesign.co.nz]
Description: Installs everything required by an Organic Design server.

Need to add this script

ln -s /etc/apache2/mods-available/ssl.conf /etc/apache2/mods-enabled/ssl.conf
ln -s /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled/ssl.load
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

organicdesign-workstation

This package will ultimately replace the Ubuntu Post Install so that a freshly installed Ubuntu workstation simply needs to apt-get organicdesign-workstation.

Package: organicdesign-workstation
Version: 1.0
Section: admin
Priority: optional
Architecture: all
Essential: no
Depends: build-essential, p7zip-full, bzip2, rar, thunderbird, geany, vlc, inkscape, samba, gparted, ntfsprogs, sysinfo
Maintainer: Aran Dunkley [aran@organicdesign.co.nz]
Description: Installs everything required by an Organic Design workstation.

Still need to include

  • Skype
  • Wine with IE 6 & 7
  • Advanced Desktop Effects Settings

organicdesign-mail

This package will set up IMAP, POP3 and webmail

organicdesign-toshiba-satellite-A210

Packages which are little more than collections of other packages are pretty easy to make, so once we have the procedure clearly documented, we may as well package up other specific things such as the installation of specific drivers and configuration for our laptops. Currently the details are in Toshiba Satellite A210 (701).

See also