From owner-freebsd-ports Thu Jan 14 10:10:37 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA09793 for freebsd-ports-outgoing; Thu, 14 Jan 1999 10:10:37 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA09788 for ; Thu, 14 Jan 1999 10:10:37 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA04265; Thu, 14 Jan 1999 10:10:01 -0800 (PST) Date: Thu, 14 Jan 1999 10:10:01 -0800 (PST) Message-Id: <199901141810.KAA04265@freefall.freebsd.org> To: freebsd-ports@FreeBSD.ORG From: Tom Hukins Subject: Re: docs/9375: Handbook addition: Automated PLIST building for ports Reply-To: Tom Hukins Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR docs/9375; it has been noted by GNATS. From: Tom Hukins To: VANDERHOEK TIMOTHY MICHAEL Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: docs/9375: Handbook addition: Automated PLIST building for ports Date: Thu, 14 Jan 1999 17:21:40 +0000 On Fri, Jan 08, 1999 at 08:30:02AM -0800, VANDERHOEK TIMOTHY MICHAEL wrote: > > OpenBSD has a ``make plist'' target in bsd.port.mk. It looks like it > shouldn't be too hard to extract as a shell script for users. I don't > know how well it works. Me neither, but I've used it as inspiration for my modified patch - thanks! It would be possible to write a script to deal with this, but I'm not going to start on one until I know I'll have time to finish it. We couldn't just lift OpenBSD's "make plist", however, because we would have to deal with ELF libraries too (and possibly other things, too). > [I don't think we should have a plist target in our bsd.port.mk]. Why? bsd.port.mk is a small, simple file. Surely one extra target wouldn't hurt? ;-) I've included a modified patch, which I hope deals with all the important issues. I'd appreciate scrutiny of the SGML and assumptions about how the ports system works - my knowledge of both is far from perfect. Regards, Tom --- porting.sgml.orig Mon Jan 11 19:21:54 1999 +++ porting.sgml Thu Jan 14 17:06:05 1999 @@ -154,6 +154,11 @@ sorted alphabetically. It will make verifying the changes when you upgrade the port much easier. +

Creating a packing list manually can be a very tedious + task. If the port installs a large number of files, + might save time. + Creating the checksum file @@ -866,7 +871,7 @@ you create a port. This section explains the most common of those. - +

If your port installs a shared library, add a post-install target to your Makefile that runs @@ -2375,6 +2380,43 @@ [and then the epilogue] .include + + + Automated packing list creation + +

First, make sure your port is almost complete, with only + the touch files/PLIST' command. + +

Next, create a new set of directories which your port can + be installed in with the `mtree -U -f + /etc/mtree/BSD.local.dist -d -e -p /var/tmp/MY-PORT' + command. Then, install any dependencies with `make + depends PREFIX=/var/tmp/MY-PORT'. Store the directory + structure in a new file with `(cd /var/tmp/MY-PORT && + find * -type d) > OLD-DIRS'. + +

If your port honours the PREFIX variable (which it should), + you can then type `make install + PREFIX=/var/tmp/MY-PORT'. Once the port has been + installed successfully, create the packing list with + `(cd /var/tmp/MY-PORT && find * \! -type d) > + pkg/PLIST'. + +

You also need to add any newly created directories to the + packing list. To do this, type `(cd /var/tmp/MY-PORT && + find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm + #' >> pkg/PLIST'. + +

Finally, you need to tidy up the packing list by hand. I + lied when I said this was all automated. Manual pages + should be listed in the port's + section. Package Names To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message