From owner-doc-jp@jp.freebsd.org  Sat Sep 11 21:54:55 1999
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id VAA03099;
	Sat, 11 Sep 1999 21:54:55 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from mail.kt.rim.or.jp (root@mail.kt.rim.or.jp [202.247.130.53])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id VAA03094
	for <doc-jp@jp.freebsd.org>; Sat, 11 Sep 1999 21:54:55 +0900 (JST)
	(envelope-from kuriyama@sky.rim.or.jp)
Received: from rhea.sky.rim.or.jp (ppp521.kt.rim.or.jp [202.247.140.171])
	by mail.kt.rim.or.jp (8.8.8/3.6W-RIMNET-98-06-09) with ESMTP id VAA06328
	for <doc-jp@jp.freebsd.org>; Sat, 11 Sep 1999 21:54:53 +0900 (JST)
Received: from localhost.sky.rim.or.jp (localhost [127.0.0.1])
	by rhea.sky.rim.or.jp (8.9.3/3.7W/rhea-1.1) with ESMTP id VAA28951
	for <doc-jp@jp.freebsd.org>; Sat, 11 Sep 1999 21:54:52 +0900 (JST)
Date: Sat, 11 Sep 1999 21:54:51 +0900
Message-ID: <14298.20763.720555.3832N@localhost.sky.rim.or.jp>
From: Jun Kuriyama <kuriyama@sky.rim.or.jp>
To: Japanese Documentation Project <doc-jp@jp.freebsd.org>
User-Agent: Wanderlust/1.0.3 (Notorious) SEMI/1.13.3 (Komaiko) FLIM/1.12.5 (Hirahata) MULE XEmacs/20.4 (Emerald) (i386--freebsd)
MIME-Version: 1.0 (generated by SEMI 1.13.3 - "Komaiko")
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990727
X-Sequence: doc-jp 6654
Subject: [doc-jp 6654] <handbook> ports/chapter.sgml (1.25)
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: kuriyama@sky.rim.or.jp


$B!!2<@n$5$s8~$1!)(B :-)$B!!(BPorts $B4X78<T$8$c$J$/$F$bLu$7$?$$?M$I$s$I$sM=Ls@k8@(B
$B$7$F$d$C$A$c$C$F$M!#(B


Index: chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- chapter.sgml	1999/06/03 11:15:29	1.24
+++ chapter.sgml	1999/06/05 21:39:20	1.25
@@ -1110,6 +1110,11 @@
 	    <para>It is recommended that you keep all the filenames in this
 	      file sorted alphabetically.  It will make verifying the changes
 	      when you upgrade the port much easier.</para>
+
+	    <para>Creating a packing list manually can be a very tedious
+	      task.  If the port installs a large numbers of files, <link
+		linkend="porting-autoplist">creating the packing list
+		automatically</link> might save time.</para>
 	  </note>
 	</sect4>
       </sect3>
@@ -1945,7 +1950,7 @@
       <para>There are some more things you have to take into account when you
 	create a port.  This section explains the most common of those.</para>
 
-      <sect3>
+      <sect3 id="porting-ldconfig">
 	<title><command>ldconfig</command></title>
 	
 	<para>If your port installs a shared library, add a
@@ -3941,7 +3946,48 @@
 [and then the epilogue]
 .include &lt;bsd.port.mk&gt;</programlisting>
     </sect2>
-    
+
+    <sect2 id="porting-autoplist"> 
+      <title>Automated package list creation</title>
+
+      <para>First, make sure your port is almost complete, with only
+	<filename>PLIST</filename> missing.  Create an empty
+	<filename>PLIST</filename>.</para>
+
+      <screen>&prompt.root; <userinput>touch PLIST</userinput></screen>
+
+      <para>Next, create a new set of directories which your port can be
+	installed, and install any dependencies.</para>
+
+      <screen>&prompt.root; <userinput>mtree -U -f /etc/mtree/BSD.local.dist -d -e -p /var/tmp/<replaceable>port-name</replaceable></userinput>
+&prompt.root; <userinput>make depends PREFIX=/var/tmp/<replaceable>port-name</replaceable></userinput></screen>
+
+      <para>Store the directory structure in a new file.</para>
+
+      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find * \! -type d) &gt; OLD-DIRS</userinput></screen>
+
+      <para>If your port honours <makevar>PREFIX</makevar> (which it should)
+	you can then install the port and create the package list.</para>
+
+      <screen>&prompt.root; <userinput>make install PREFIX=/var/tmp</userinput>
+&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name</replaceable> && find * \! -type d) &gt; pkg/PLIST</userinput></screen>
+
+      <para>You must also add any newly created directories to the packing
+	list.</para>
+
+      <screen>&prompt.root; <userinput>(cd /var/tmp/<replaceable>port-name && find * -type d) | comm -13 OLD-DIRS - | sed -e 's#^#@dirrm#' &gt;&gt; pkg/PLIST</replaceable></userinput></screen>
+
+      <para>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 <filename>Makefile</filename> under
+	<makevar>MAN<replaceable>n</replaceable></makevar>, and not in the
+	package list.  User configuration files should be removed, or
+	installed as
+	<filename><replaceable>filename</replaceable>.sample</filename>.  Any
+	libraries installed by the port should be listed as specified in the
+	<link linkend="porting-ldconfig">ldconfig</link> section.</para>
+    </sect2>
+
     <sect2 id="porting-pkgname">
       <title>Package Names</title>
       

$B$/$j$d$^(B // kuriyama@sky.rim.or.jp
        // kuriyama@FreeBSD.ORG
