Difference between revisions of "Create or Update a Debian package"
(a paclage for Toshiba Satellite A210 (701)) |
(packages are quite easy) |
||
Line 4: | Line 4: | ||
}}__NOTOC__ | }}__NOTOC__ | ||
− | == organicdesign-server == | + | == 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''. | ||
+ | {{#tree:root=example-package| | ||
+ | *DEBIAN | ||
+ | **control | ||
+ | **postinst | ||
+ | **postrm | ||
+ | **prerm | ||
+ | *etc | ||
+ | **apache2 | ||
+ | ***sites-available | ||
+ | ****default | ||
+ | *var | ||
+ | **www | ||
+ | ***index.php | ||
+ | ***index.html | ||
+ | ***index.php5 | ||
+ | }} | ||
+ | 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. | The ultimate purpose of the ''organicdesign-server'' package is to replace the [[Debian Post Install]] script. | ||
<pre> | <pre> | ||
Line 25: | Line 53: | ||
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load | ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load | ||
− | = | + | === organicdesign-workstation === |
− | |||
− | |||
− | == 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''. | This package will ultimately replace the [[Ubuntu Post Install]] so that a freshly installed Ubuntu workstation simply needs to ''apt-get organicdesign-workstation''. | ||
<pre> | <pre> | ||
Line 47: | Line 72: | ||
*Advanced Desktop Effects Settings | *Advanced Desktop Effects Settings | ||
− | == organicdesign-toshiba-satellite-A210 == | + | === 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)]]. | 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)]]. | ||
Revision as of 09:15, 25 June 2008
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).