Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 1999 10:10:01 -0800 (PST)
From:      Tom Hukins <tom@eborcom.com>
To:        freebsd-ports@FreeBSD.ORG
Subject:   Re: docs/9375: Handbook addition: Automated PLIST building for ports
Message-ID:  <199901141810.KAA04265@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/9375; it has been noted by GNATS.

From: Tom Hukins <tom@eborcom.com>
To: VANDERHOEK TIMOTHY MICHAEL <vanderh@ecf.utoronto.ca>
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.
  
 +	  <p>Creating a packing list manually can be a very tedious
 +	    task.  If the port installs a large number of files,
 +	    <ref id="porting:autoplist" name="creating the packing
 +	    list automatically"> might save time.
 +
        <sect2>
  	<heading>Creating the checksum file</heading>
  
 @@ -866,7 +871,7 @@
  	you create a port.  This section explains the most common of those.
  
  	<sect2>
 -	  <heading><tt/ldconfig/</heading>
 +	  <heading><tt/ldconfig/<label id="porting:ldconfig"></heading>
  
  	<p>If your port installs a shared library, add a
  	  <tt>post-install</tt> target to your Makefile that runs
 @@ -2375,6 +2380,43 @@
   [and then the epilogue]
   .include <bsd.port.mk>
  </verb></tscreen>
 +
 +    <sect1>
 +      <heading>Automated packing list creation<label
 +      id="porting:autoplist"></heading>
 +
 +      <p>First, make sure your port is almost complete, with only
 +	the <tt/PLIST/ file missing.  Create an empty <tt/PLIST/
 +	with the `<tt>touch files/PLIST</tt>' command.
 +
 +      <p>Next, create a new set of directories which your port can
 +	be installed in with the `<tt>mtree -U -f
 +	/etc/mtree/BSD.local.dist -d -e -p /var/tmp/MY-PORT</tt>'
 +	command.  Then, install any dependencies with `<tt>make
 +	depends PREFIX=/var/tmp/MY-PORT</tt>'.  Store the directory
 +	structure in a new file with `<tt>(cd /var/tmp/MY-PORT &&
 +	find * -type d) &gt; OLD-DIRS</tt>'.
 +
 +      <p>If your port honours the PREFIX variable (which it should),
 +	you can then type `<tt>make install
 +	PREFIX=/var/tmp/MY-PORT</tt>'.  Once the port has been
 +	installed successfully, create the packing list with
 +	`<tt>(cd /var/tmp/MY-PORT && find * \! -type d) &gt;
 +	pkg/PLIST</tt>'.
 +
 +      <p>You also need to add any newly created directories to the
 +	packing list.  To do this, type `<tt>(cd /var/tmp/MY-PORT &&
 +	find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm
 +	#' &gt;&gt; pkg/PLIST</tt>'.
 +
 +      <p>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 <tt/Makefile/ under
 +	<tt/MANx/, not the packing list.  User configuration files
 +	should be removed, or installed as <tt/config-file.sample/.
 +	Any libraries installed by the port should be listed as
 +	specified in the <ref id="porting:ldconfig" name="ldconfig">
 +	section.
  
      <sect1>
        <heading>Package Names<label id="porting:pkgname"></heading>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901141810.KAA04265>