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.
Making a Debian Package
Go into Empires main directory then run build
If you've made mistakes and the build fails, and you try it again you may run into a
tiny problem. The second time you run build, you may get an error message like this:
dpkg-source: unrepresentable changes to source
This error is caused when the package was improperly cleaned up. Make sure the
clean target of the applications makefile really does remove all unneeded files. If
we look again at empires makefile we see that clean doesn't get rid of the compile empire
binary. Instead clobber does that. (See lines 79-84.) So we change line 17 of
the rules file to this:
17 -make clobber
when build has finished successfully, move up one directory.
$ cd ..
You will see four new files.
- empire_1.1-2_i386.deb
is the completed debian package. You can use dpkg or dselect to install and remove this
just like any other package.
- empire_1.1-2_i386.changes
As you keep working on a package behavior will change and new features will be added.
People downloading your package can look at this file and see what has changed. The file
is generated from the empire-1.1/debian/changelog file. It also lists the files in
the package. The long strings of numbers are MD5 sums for the file. A person downloading
your files can test them with the md5sum program (see its man page) and if the numbers
don't match, they'll know the file is corrupt or has been hacked.
- empire_1.1.orig.tar.gz
This is the original source code gathered up so that if someone else wants to recreate
your package from scratch they can.
- empire_1.1-2.dsc
This is a summary of the contents of the source code. The file is generated from the
empire-1.1/debian/control file.
There you have it. You are now the proud creator of a new debian archive. There is a
lot more work to be done before it will be fully in line with Debian policies (See the
policy manual for details.) Hopefully though this introduction has shown you the whole
process isn't nearly as hard as it may seem.
Further Information
Some Introductory Books on Linux/Unix Programming
- Beginning Linux Programming
Matthew & Stones, Wrox Press, 1996. ISBN: 1874416680
- Programming With GNU Software
Loukides & Oram, O'Reilly & Associates, 1996. ISBN: 1-56592-112-7
- The Unix Programming Environment
Kernighan & Pike, Prentice-Hall Inc., 1984. ISBN: 0-13-937681-x
Debian specific help
- Please read all the documentation in /usr/doc/dpkg, /usr/doc/debian, /usr/doc/debmake
(especially README.debian.gz) and the man pages for all the programs mentioned in this
article.
- By joining the Debian Mentors' mailing list.
(debian-mentors@lists.debian.org) you can team up with an experienced
Debian developer who will be happy to help you with any questions you
might have. You can subscribe to it here.
- If you still have questions, ask on the Debian Developers mailing list.
(debian-devel@lists.debian.org) You can subscribe to it here.
Previous page
Next Page