Warning:This article is out of date and should not be used for creating new packages. Please refer to the Debian New Maintainers Guide instead.
copyright
This file contains the packages copyright information. this is what the default
debmake creates looks like.
1 This package was debianized by Jaldhar H. Vyas jaldhar@debian.org on 2 Thu, 11 Sep 1997 22:49:54 -0400. 3 4 It was downloaded from <fill in ftp site> 5 6 Copyright: 7 8 <Must follow here>
The important things to add to this file are the place you got the package from and the actuall copyright notice. If the copyright is one of the popular free software licenses such as GNU, BSD or the Artistic license, you don't have to include the entire text, you can just refer to the appropriate file in /usr/doc/copyright. Empire is under the GNU public license. So we change the file to this:
1 This package was debianized by Jaldhar H. Vyas jaldhar@debian.org on 2 Thu, 11 Sep 1997 22:49:54 -0400. 3 4 It was downloaded from http://www.cdrom.com/pub/linux/sunsite/games/strategy 5 6 Copyright: (c) 1987, 1988 Chuck Simmons 7 8 This program is free software; you can redistribute it and/or modify 8a it under the terms of the GNU General Public License as published by 8b the Free Software Foundation; either version 2, or (at your option) 8c any later version. 8d 8e This program is distributed in the hope that it will be useful, 8f but WITHOUT ANY WARRANTY; without even the implied warranty of 8g MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8h GNU General Public License for more details. 8i 8j You should have received a copy of the GNU General Public License 8k along with Debian system; see the file /usr/doc/copyright/GPL. If not, 8l write to the Free Software Foundation, Inc., 59 Temple Place - Suite 8m 330, Boston, MA 02111-1307, USA.
README.debian
Any extra details or discrepencies between the original package and your debianized
version should be documented here. This is what the default debmake creates looks like:
empire for DEBIAN ---------------------- Comments regarding the Package Jaldhar H. Vyas <jaldhar@debian.org>, Thu, 11 Sep 1997 22:49:54 -0400
We don't particularly have anything to add so we'll leave it as is.
changelog
As you keep working on a package behavior will change, new features will be added
and bugs will be fixed. People downloading your package can look at this file and see what
has changed. This is what the default changelog that debmake creates looks like.
1 empire (1.1-1) unstable; urgency=low 2 3 * Initial Release. 4 5 -- Jaldhar H. Vyas <jaldhar@debian.org> Thu, 11 Sep 1997 22:49:54 -0400 6 7 Local variables: 8 mode: debian-changelog 9 add-log-mailing-address: "jaldhar@debian.org" 10 End:
Line 1 is the package name, version, distribution, and urgency. The version number here is what will be used as the version number of the package. don't mess with this line. Lines 3-5 are a log entry. We can add items to the changelog with the dch(1) program that comes in the devscripts package. (It's an alias for debchange. You can invoke it as either one, it doesn't make a difference.) Lines 7-10 are mode information for the Emacs editor(?) Let's add a line to the changelog. If the comment is short, you can add it directly on the dch command line like this:
$ dch This is my first Debian package
Or you can run dch by itself. This will start up your default editor which is in order of preference, the program defined in the environment variable $VISUAL, the program defined in the environment variable $EDITOR, joe(1), or ae(1). When the editor starts, you can add your comment. However way you do it, you should end up with something like this:
1 empire (1.1-1) unstable; urgency=low 2 2a * This is my first debian package. 3 * Initial Release. 4 5 -- Jaldhar H. Vyas <jaldhar@debian.org> Thu, 11 Sep 1997 22:49:54 -0400 6 7 Local variables: 8 mode: debian-changelog 9 add-log-mailing-address: "jaldhar@debian.org" 10 End:
When you release a new version, you should increment the version number. You do that with this command.
$ dch -n This is my first debian package.
If for some reason you wanted to increment the version number by more than 1, say 15, you use this command:
$ dch -v 15 This is my first debian package.
We'll just assume we want to increment the version number by 1. This is what the changelog looks like now.
1 empire (1.1-2) unstable; urgency=low 2 2a * This is my first debian package 2b 2c -- Jaldhar H. Vyas <jaldhar@debian.org> Sun, 14 Sep 1997 12:04:44 -0500 2d 2e empire (1.1-1) unstable; urgency=low 2f 3 * Initial Release. 4 5 -- Jaldhar H. Vyas <jaldhar@debian.org> Thu, 11 Sep 1997 22:49:54 -0400 6 7 Local variables: 8 mode: debian-changelog 9 add-log-mailing-address: "jaldhar@debian.org" 10 End:
conffiles
One of the most annoying things about software is when you spend a great deal of time and
effort customizing a program only to have an upgrade stomp all over your changes.
Debian solves this problem by marking configuration files so that when you upgrade a
package you will be prompted whether you want to keep your old configuration or not.
You do this by entering the full path to each configuration file (they are usually
in /etc,) one per line in a file called conffiles. Empire doesn't have any
conffiles.
*.ex
Some packages may need to do more than simply install files. For instance a server may
need to add a line into /etc/inetd.conf. The files ending in *.ex are examples of how to
add that kind of support into the package. To use one of them, edit it and remove
the .ex extension. Here is a brief description of what each file does.
crontab.ex
This adds a line to /etc/crontab to run a program on a regular basis. Currently
policy states packages should not touch /etc/crontab so if you think there is a good
reason for doing so, discuss it in the mailing lists first. If you rename this file
to cron.daily, it will be added to /etc/cron.daily and run every day. Similiarly
renaming it to cron.weekly will add it to /etc/cron.weekly and renaming it to cron.monthly
will add it to /etc/cron.monthly. As the names suggest, they are run weekly and
monthly respectively. See the man pages for crontab(1) and crontab(5) for more
details. Policy states programs run from these files must be scripts and must be
registered in the package as conffiles. Empire doesn't need this so we'll delete it.
diversions.ex
Something to do with diversions maybe? Empire doesn't need this so we'll delete it.
inetd.conf.ex
This adds a line to /etc/inetd.conf to run a daemon. See the man pages for
inetd.conf(1) for details on the format. Empire doesn't need this so we'll delete
it.
info.ex
Edit this file to provide documentation in GNU info format. Empire doesn't need this
so we'll delete it.
init.d.ex
This is a default script for /etc/init.d. If your program needs to be started at
boot time and stopped at shutdown or when the runlevel changes, edit this script to
do whatever actions are neccessary. Empire doesn't need this so we'll delete it.
manpage.1.ex
Your program should have a man page. If it doesn't, this is a skeleton you can fill
out. See the man pages for man(7) for a brief description of how to create a man page.
Be sure to rename this file to the name of the program and make the extension the
manual section it should go into. Here's a list.
Section | Description | Notes |
1 | User commands | Executable commands or scripts. |
2 | System calls | Functions provided by the kernel. |
3 | Library calls | Functions within system libraries. |
4 | Special files | Usually found in /dev |
5 | File formats | E.g. /etc/passwd's format |
6 | Games | Or other frivolous programs |
7 | Macro packages | Such as man macros. |
8 | System administration | Programs typically only run by root. |
9 | Kernel routines | Non-standard calls and internals. |
So empires manpage should be called empire.6. As there is already an empire.6 man page we can just delete this example.
menu.ex
X Windows users have a window manager with menus that can be customized to launch
programs. If they have installed the debian menu package, a set of menus for every
program on the system will be created for them. It isn't required by debian policy
but your users will appreciate it. We can add Empire to the menus by editing this
file. Here's the default debmake creates:
text Apps/Misc empire none "empire Description" /usr/bin/empire
The first field specifies what kind of interface the program needs (i.e text or X11.) The next is the menu and submenu the entry should appear in. The current list of sections is in /usr/doc/menu/README. The third is the name of the program. The fourth is the icon for the program or none if there isn't one. The fifth is the actual text which will appear in the menu. The sixth is the command that runs the program.
Change the menu entry to this:
text Games/Strategy empire none "Build an empire" /usr/bin/empire
watch.ex
You can use this file in addition to the uscan(1) and uupdate(1) programs in the
devscripts package to watch the site you got the original source from. see the man
pages for more details. Here's the default debmake creates.
1 # Example watch control file for uscan 2 # Rename this file to "watch" and then you can run the "uscan" command 3 # to check for upstream updates and more. 4 # Site Directory Pattern Version Script 5 sunsite.unc.edu /pub/Linux/Incoming empire-*.tar.gz debian uupdate
Change it to this:
5 www.cdrom.com /pub/Linux/sunsite/games/strategy empire-*.tar.gz debian uupdate
We are now finally ready to build the package..
By Jaldhar Vyas November 11, 1997 |