4. Hands OnNow it is time to get practical ourselves. I have a simple shell script named 'linuxstatus' which I want to install as '/usr/bin/linuxstatus'. So first let's create a directory named 'debian' next to the file 'linuxstatus'.
4.1. controlLet's start with the control file. The version number must have a dash with an additional Debian package version number, e.g. '1.1-1'. If your program consists e.g. only of portable shell scripts, use 'all' as its 'Architecture'. For 'Depends' you might need to find out to which package a certain file or program your new package relies onto belongs to. There is a web page where you can search for Debian files: http://www.debian.org/distrib/packages. Go to the bottom of that page. Once you know the package name, you can get further version details of this package on your own system with 'apt-cache showpkg package'. 'Suggests', 'Conflicts', and 'Replaces' etc. can be left out if not needed. So here is the result of our first 'control' file:
The 'control' file gets copied into a directory called 'DEBIAN' inside the other 'debian' directory.
If you expect your package to have a bigger audience in the future it might help to read this Writing Debian package descriptions article. 4.2. dpkg-debNow it is almost done. Just type:
Uh, that was all easier than expected. Now we just have to install this package on our box and we are done:
Type 'linuxstatus' or 'ls -l /usr/bin/linuxstatus' to see if it worked. If you don't like your package any more, just type 'dpkg -r linuxstatus' and check again that the package is deinstalled. If you install a newer version you don't have to remove the old one first, thought. If you are curious about the version numbering scheme and naming conventions for a Debian package, have a read at this section in The Debian Reference. Notes
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |