From owner-freebsd-ports Sat Apr 8 02:31:44 1995 Return-Path: ports-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA08216 for ports-outgoing; Sat, 8 Apr 1995 02:31:44 -0700 Received: from silvia.HIP.Berkeley.EDU (silvia.HIP.Berkeley.EDU [136.152.64.181]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id CAA08204 for ; Sat, 8 Apr 1995 02:31:34 -0700 Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.6.9/8.6.9) id CAA12594; Sat, 8 Apr 1995 02:31:31 -0700 Date: Sat, 8 Apr 1995 02:31:31 -0700 Message-Id: <199504080931.CAA12594@silvia.HIP.Berkeley.EDU> To: ports@FreeBSD.org Subject: Ports' Makefiles / package names From: asami@cs.berkeley.edu (Satoshi Asami | =?ISO-2022-JP?B?GyRCQHUbKEI=?= =?ISO-2022-JP?B?GyRCOCsbKEIgGyRCOC0bKEI=?=) Sender: ports-owner@FreeBSD.org Precedence: bulk I sent out a message about this a while ago, but haven't gotten any negative responses. Given that, I assume people are happy with it. :) So, here goes the idea for the ports' Makefile conventions and package names. I've already started fixing my ports, so it will be great if people can fix theirs...otherwise, I'll go in and do them myself. First, the Makefiles. The idea is to uniformize the format and make them easy to read, and also put the useful information near the top so that users can find what these things are all about easily. The Makefile will start with the preamble, which is essentially a bunch of eye-catching comments. And then come the variables, rules, and it will end with the requisite .include . The variables are divided up to 6 sections, in this order: (1) The port's profile. The variables should be defined in the order specified below. PKGNAME can be omitted if it is the same as DISTNAME (more on this below). KEYWORDS can be omitted if it is the same as CATEGORIES. At most one of EXTRACT_SUFX or DISTFILES should be necessary. (2) The patches we fetch from the network. The whole section can be omitted if there aren't any (as is the case for most ports). (3) The MAINTAINER line. This is mandatory! Write "ports@FreeBSD.ORG" if you don't feel like personally taking care of it (although we hope you would :). (4) Dependencies. (5) Other variables to override the defaults in bsd.port.mk. (6) Variables that you define and use in your own rules. The rules section has no rules (:), except that they should be in the order they are called. ====================8<========== cut here ==========>8================== # New ports collection makefile for: *** # Version required: *** # Date created: *** # Whom: *** # # $Id$ DISTNAME= *** PKGNAME= *** CATEGORIES+= *** KEYWORDS+= *** MASTER_SITES= ftp://***/ EXTRACT_SUFX= *** DISTFILES= *** PATCH_SITES= ftp://***/ PATCHFILES= *** PATCH_DIST_STRIP?= -p* MAINTAINER= ***@FreeBSD.ORG EXEC_DEPENDS= ***:${PORTSDIR}/***/*** LIB_DEPENDS= ***\\.*\\.:${PORTSDIR}/***/*** WRKSRC= *** \ IS_INTERACTIVE= *** \ HAS_CONFIGURE= *** > other bsd.port.mk variables that don't fit above USE_GMAKE= *** / USE_IMAKE= *** / ***= *** other variables you define for yourself ***: *** special rules you define .include ====================8<========== cut here ==========>8================== Okay, next about the 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} has a format other than "-", set ${PKGNAME} to something in that format. This can be usually done by adding to or subtracting from ${DISTNAME} just a bit. The "" part should start with a lowercase letter, 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), ImageMagick fall into this category. Otherwise, convert the name (at least the first letter) to lowercase. The version string should be a period-separated list of integers, optionally followed by a single lowercase alphabet. The only exception is the string "pl" (meaning "patchlevel"), which can be used when there are no major and minor version numbers at all in the software (see tvtwm below). Here are some 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.1 XFree86-3.1.1 ditto EmiClock-1.0.2 emiclock-1.0.2 no uppercase names for single programs aXe-6.1.2 aXe-6.1.2 this one is ok, it's not the first letter gmod1.4 gmod-1.4 need hyphen after "" xmris.4.02 xmris-4.02 ditto rdist-1.3alpha rdist-1.3a no strings like "alpha" allowed 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 If there is absolutely no trace of version information in the original source, just set the version string to "1.0" (like the piewm example above). Okay, that's it for tonight. Thanks for reading the long mail! :) Satoshi