FreeBSD Handbook : Installing applications : Porting applications : Package Names
Previous: A Sample Makefile
Next: System Administration

4.3.9. Package Names

The following are the conventions you should follow in naming your packages. This is to have our package directory easy to scan, as there are already lots and lots of packages and users are going to turn away if they hurt their eyes!

If your ${DISTNAME} does not look like `<name>-<version.string.numbers>', set ${PKGNAME} to something in that format.

  1. The `<name>' part should be all lowercases, except for a really large package (with lots of programs in it). Things like XFree86 (yes there really is a package of it, check it out) and ImageMagick fall into this category. Otherwise, convert the name (or at least the first letter) to lowercase. If the software in question really is called that way, you can have numbers, hyphens and underscores in the name too.

  2. The version string should be a period-separated list of integers and single lowercase alphabets. The only exception is the string `pl' (meaning `patchlevel'), which can be used only when there are no major and minor version numbers in the software.

Here are some (real) examples on how to convert a ${DISTNAME} into a suitable ${PKGNAME}:

DISTNAME	PKGNAME		Reason
mule-2.2.2	mule-2.2.2	no prob at all
XFree86-3.1.2	XFree86-3.1.2	ditto
EmiClock-1.0.2	emiclock-1.0.2	no uppercase names for single programs
gmod1.4		gmod-1.4	need hyphen after `<name>'
xmris.4.02	xmris-4.02	ditto
rdist-1.3alpha	rdist-1.3a	no strings like `alpha' allowed
es-0.9-beta1	es-0.9b1	ditto
v3.3beta021.src	jpeg-5a		what the heck was that anyway? ;)
tvtwm		tvtwm-pl11	version string always required
piewm		piewm-1.0	ditto
xvgr-2.10pl1	xvgr-2.10.1	`pl' allowed only when no maj/minor numbers

If there is absolutely no trace of version information in the original source and it is unlikely that the original author will ever release another version, just set the version string to `1.0' (like the piewm example above). Otherwise, ask the original author or use the date string (`yy.mm.dd') as the version.


FreeBSD Handbook : Installing applications : Porting applications : Package Names
Previous: A Sample Makefile
Next: System Administration