From time to time it is good to be reminded of some of the items that make a good package. This post will cover the package description.
1) The package description - this is extremely important. One-liners are not really sufficient. A good Slack/VL package should have a description like this one:
seamonkey: SeaMonkey (an open-source web browser suite)
seamonkey:
seamonkey: The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
seamonkey: web browser and powerful email client, as well as a WYSIWYG web page
seamonkey: composer, a calendar and a feature-rich IRC chat client. For web
seamonkey: developers, mozilla.org's DOM inspector and JavaScript debugger tools
seamonkey: are included as well.
seamonkey:
seamonkey: Visit the SeaMonkey project at this URL:
seamonkey: http://www.mozilla.org/projects/seamonkey/
seamonkey:
The key points to note about a good description are:
1) The package description is limited to 11 lines maximum. This is a Slackware standard that we need to keep for compatibility with the packaging tools.
2) The first line of the description gives the package name as well as a basic description of what the package is. This first line is very important, because it shows up in slapt-get and gslapt when the repository packages list is parsed. It is also important, because it tells the person who may want to install it the type of package it is.
3) The second line of the description is blank. This is a Slackware package standard that we need to enforce for compatibility with the standard packaging tools.
4) The last nine lines of the description give more information about the package. Typically you will see these lines when a package is being installed, whether by slapt-get, gslapt or the installpkg/upgradepkg commands. They should give additional information about the package.
How to Create a Package DescriptionIf you are using checkinstall to create your packages, you will need to create a text file with the descrption before you call checkinstall to package things. The text file needs to be called description-pak, and it needs to be at the top level of your source build tree. Using the Seamonkey example above, here is how it would look as a description-pak file:
SeaMonkey (an open-source web browser suite)
The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
web browser and powerful email client, as well as a WYSIWYG web page
composer, a calendar and a feature-rich IRC chat client. For web
developers, mozilla.org's DOM inspector and JavaScript debugger tools
are included as well.
Visit the SeaMonkey project at this URL:
http://www.mozilla.org/projects/seamonkey/
The description-pak file doesn't need the extra "seamonkey:" at the beginning of each line, as it will be added when checkinstall does its thing. However, you will need to put returns at the end of each line to make sure that lines are no longer than around 60 characters.
If you are packaging by hand or via SlackBuild scripts that don't invoke checkinstall, the description file needs to be called slack-desc. It goes into the install directory at the top of the package tree. The linuxpackages.net site has a very handy slack-desc creator that will do a lot of the dirty work for you. You can find it at
http://www.linuxpackages.net/slackcreator.php.
Finally, there's the old stand-by slack-desc template, again for those of you who package things either by hand or via SlackBuild scripts that don't invoke checkinstall. Again, using the Seamonkey example, here it is as a template (because it was "borrowed" from Papa Slack):
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
seamonkey: SeaMonkey (an open-source web browser suite)
seamonkey:
seamonkey: The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
seamonkey: web browser and powerful email client, as well as a WYSIWYG web page
seamonkey: composer, a calendar and a feature-rich IRC chat client. For web
seamonkey: developers, mozilla.org's DOM inspector and JavaScript debugger tools
seamonkey: are included as well.
seamonkey:
seamonkey: Visit the SeaMonkey project at this URL:
seamonkey: http://www.mozilla.org/projects/seamonkey/
seamonkey:
I hope this is helpful. Feel free to ask any questions you may have. Also take a look at the packaging documentation at linuxpackages.net, as it is very good. Finally, if you use checkinstall, please take the time to read its documentation so that it is used correctly.
Cheers,
John