When you're discovering Linux, especially the system administration aspects of it, you'll sooner or later will want to create your own .deb packages. You can use packages to customize your configuration. In this tutorial, we'll go step by step through the pocess of creating .deb packages, building a package that installs and sets up Knoppix hardware recognition and X server configuration to add Knoppix's superior video cinfiguration to a basic Debian stable system.
Debian Sarge (the stable release at the time of writing) uses xserver-xfree (XFree86). You therefore need to use a xf86config-knoppix package that actually creates a xfree.conf, not the xorg.conf that more recent versions of Knoppix use. Take, for instance, xf86config-knoppix_0.8-6_i386.deb, and work out the dependencies from there, by reading the control files in the respective .deb packages or the Release file at debian-knoppix.alioth.debian.org/packages/.
Therefore, the package we create will depend on xf86config-knoppix_0.8-6_i386.deb, ddcxinfo-knoppix_0.6-6_i386.deb, hwsetup_1.1-1_i386.deb and hwdata-knoppix (any version).
If you download only those, you don't need to specify the versions later on, because only those versions will be available. If you use a third party mirror, you'll need to specify the versions in your dependencies.
To apply this to Debian testing with xorg, find wich xf86config-knoppix packages create xorg.conf, set that as the minimal version, and work out that package's dependencies.
You only need to do this manual selection if you want to download packages of specific versions to your own web server. When you use the debian-knoppix.alioth mirror, apt will use the Release file to work out the dependencies and select the correct package according to the versions you've set for dependencies.
The package we're building does not require you to compile source code, it merely bundles dependencies and some scripts.
create the following directories in your working directory :
../ |- debian/ |-DEBIAN/
create a control file : .../debian/DEBIAN/control - with the following content :
Package: xf86config-knoppix-kn Version: 0.1 Section: extra Priority: optional Architecture: i386 Depends: xf86config-knoppix, ddcxinfo-knoppix (<= 0.6-6), hwsetup (<=1.1-1), hwdata-knoppix Installed-Size: 1 Maintainer: Koen NoensDescription: unofficial package -- exercise meta-package to provide KNOPPIX non-interactive setup of XFree86 3.x/4. on Debian (sarge). may require http://debian-knoppix.alioth.debian.org in sources.list
Note the dependencies : the knoppix packages discussed earlier, with versioning.
build the package and install it (with dpkg -i or apt-get if you have the package on a http or ftp server)