*BSD News Article 49937


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!fu-berlin.de!zrz.TU-Berlin.DE!zib-berlin.de!irz401!uriah.heep!bonnie.heep!not-for-mail
From: j@bonnie.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: [ANNOUNCE] xsysinfo-1.0
Date: 25 Aug 1995 10:52:07 +0200
Organization: Private U**x site, Dresden.
Lines: 64
Message-ID: <41k2vn$dvn@bonnie.tcd-dresden.de>
References: <41h4s9$cf@news.csie.nctu.edu.tw> <41hbnf$r6e@fu-berlin.de> <41he6u$6it@news.csie.nctu.edu.tw>
Reply-To: joerg_wunsch@uriah.heep.sax.de
NNTP-Posting-Host: 192.109.108.139
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Chien-Ta Lee <jdli@csie.nctu.edu.tw> wrote:

>	well, I have no idea about it, how to integrate it into the
>	FreeBSD package system ?
>	It should not be a port since I write it specially for FreeBSD.

The term `port' is somewhat misleading.  It doesn't necessarily mean
that you have to patch something in order to make it a `port'.
(Though most external software requires at least some Makefile
tweaking.)  It's simply a standardized procedure on how to integrate
third-party software, and make it easily accessible to the FreeBSD
users.  Look into the Makefile of a sample port, and read the files
/usr/ports/GUIDELINES and /usr/share/mk/bsd.ports.mk.  A minimal port
(no patching required, the distribution files compile out of the box)
would contain:

/usr/ports/categ/foo/ -+-- Makefile
                       |
                       +-- files/
                       |
                       +-- pkg/ -+--- PLIST
                                 |
                                 +--- DESCR
                                 |
                                 +--- COMMENT

The Makefile is the glue for everything.  There's a section in the
FreeBSD handbook on how to order the variables in this file.
Basically, you need to mention the name of the distribution file
(.tar.gz is implied unless stated otherwise), the ``master site''
where the distribution file resides, and a category where this port
belongs to.

The files/ directory can be left empty in the first place.  Once you've
correctly setup your Makefile, so the distribution file can be found
(and has been fetched to the local system), simply run ``make
makesum'' in order to put an MD5 checksum file there.

The pkg/ subdir takes all the stuff that's required to for the package
tools.  The PLIST contains the locations and names of all the files
that must be (un)installed for this package.  Typically, you'll find
something like

	@cd /usr/local
	bin/foozoolix
	man/man1/foozoolix.1.gz

there.  I think the structure is obvious, for special hints refer to
pkg_create(1).

The file COMMENT contains a single description line describing the
package.

The file DESCR contains a verbose description of the package in
question; it's typically some README file that can also be found in
the distribution.  The purpose is that this file will be available
without downloading the entire distribution files, so one can have a
look at it and decide whether to actually get/compile/install the
whole mess or not.
-- 
cheers, J"org                      private:   joerg_wunsch@uriah.heep.sax.de
                                   http://www.sax.de/~joerg/

Never trust an operating system you don't have sources for. ;-)