From owner-freebsd-doc@FreeBSD.ORG Mon Mar 6 23:00:23 2006 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6780A16A420 for ; Mon, 6 Mar 2006 23:00:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A70D043D46 for ; Mon, 6 Mar 2006 23:00:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k26N0M7B073159 for ; Mon, 6 Mar 2006 23:00:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k26N0M16073158; Mon, 6 Mar 2006 23:00:22 GMT (envelope-from gnats) Resent-Date: Mon, 6 Mar 2006 23:00:22 GMT Resent-Message-Id: <200603062300.k26N0M16073158@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roman Neuhauser Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43C4516A420 for ; Mon, 6 Mar 2006 22:57:44 +0000 (GMT) (envelope-from neuhauser@sigpipe.cz) Received: from isis.sigpipe.cz (fw.sigpipe.cz [62.245.70.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D44643D45 for ; Mon, 6 Mar 2006 22:57:43 +0000 (GMT) (envelope-from neuhauser@sigpipe.cz) Received: by isis.sigpipe.cz (Postfix, from userid 1001) id 450FD1F87C15; Mon, 6 Mar 2006 23:57:41 +0100 (CET) Message-Id: <20060306225741.450FD1F87C15@isis.sigpipe.cz> Date: Mon, 6 Mar 2006 23:57:41 +0100 (CET) From: Roman Neuhauser To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/94151: [PATCH] Porter's Handbook: plist-autoplist improvement X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Roman Neuhauser List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 23:00:23 -0000 >Number: 94151 >Category: docs >Synopsis: [PATCH] Porter's Handbook: plist-autoplist improvement >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 06 23:00:22 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Roman Neuhauser >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD isis.sigpipe.cz 4.11-STABLE FreeBSD 4.11-STABLE #0: Fri Jan 27 13:39:33 CET 2006 root@isis.sigpipe.cz:/usr/obj/usr/src/sys/FREEPUPPY2_6 i386 >Description: The attached patch slightly improves the "Automated package list creation" section in Porter's Handbook by making the code listings directly copypastable. A more ambitious person could also reflow the section so that the text lists the complete code at one place somewhere. >How-To-Repeat: Try updating a port's plist when you're extra lazy. >Fix: --- doc::en::books::porters-handbook.sgml-portname,0.patch begins here --- Index: book.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v retrieving revision 1.685 diff -u -u -r1.685 book.sgml --- book.sgml 26 Feb 2006 10:41:25 -0000 1.685 +++ book.sgml 6 Mar 2006 21:20:50 -0000 @@ -6176,13 +6176,13 @@ for ports which install into the directory hierarchy of XFree86 4 or an earlier XFree86 release, respectively. - &prompt.root; mkdir /var/tmp/port-name -&prompt.root; mtree -U -f /etc/mtree/BSD.port-type.dist -d -e -p /var/tmp/port-name -&prompt.root; make depends PREFIX=/var/tmp/port-name + &prompt.root; mkdir /var/tmp/$(make -V PORTNAME) +&prompt.root; mtree -U -f $(make -V MTREE_FILE) -d -e -p /var/tmp/$(make -V PORTNAME) +&prompt.root; make depends PREFIX=/var/tmp/$(make -V PORTNAME) Store the directory structure in a new file. - &prompt.root; (cd /var/tmp/port-name && find -d * -type d) | sort > OLD-DIRS + &prompt.root; (cd /var/tmp/$(make -V PORTNAME) && find -d * -type d) | sort > OLD-DIRS Create an empty pkg-plist file: @@ -6191,13 +6191,13 @@ If your port honors PREFIX (which it should) you can then install the port and create the package list. - &prompt.root; make install PREFIX=/var/tmp/port-name -&prompt.root; (cd /var/tmp/port-name && find -d * \! -type d) | sort > pkg-plist + &prompt.root; make install PREFIX=/var/tmp/$(make -V PORTNAME) +&prompt.root; (cd /var/tmp/$(make -V PORTNAME) && find -d * \! -type d) | sort > pkg-plist You must also add any newly created directories to the packing list. - &prompt.root; (cd /var/tmp/port-name && find -d * -type d) | sort | comm -13 OLD-DIRS - | sort -r | sed -e 's#^#@dirrm #' >> pkg-plist + &prompt.root; (cd /var/tmp/$(make -V PORTNAME) && find -d * -type d) | sort | comm -13 OLD-DIRS - | sort -r | sed -e 's#^#@dirrm #' >> pkg-plist Finally, you need to tidy up the packing list by hand; it is not all automated. Manual pages should be listed in @@ -6221,12 +6221,12 @@ make depends. Then build and install the port: - &prompt.root; make install PREFIX=/var/tmp/port-name + &prompt.root; make install PREFIX=/var/tmp/$(make -V PORTNAME) And let plist create the pkg-plist file: - &prompt.root; /usr/ports/Tools/scripts/plist -Md -m /etc/mtree/BSD.port-type.dist /var/tmp/port-name > pkg-plist + &prompt.root; /usr/ports/Tools/scripts/plist -Md -m $(make -V MTREE_FILE) /var/tmp/$(make -V PORTNAME) > pkg-plist The packing list still has to be tidied up by hand as stated above. @@ -6525,7 +6525,7 @@ /usr/local instead of PREFIX. A quick test for this is to do this is: - &prompt.root; make clean; make package PREFIX=/var/tmp/port-name + &prompt.root; make clean; make package PREFIX=/var/tmp/$(make -V PORTNAME) If anything is installed outside of PREFIX, the package creation process will complain that it @@ -6535,7 +6535,7 @@ This does not test for the existence of internal references, or correct use of LOCALBASE for references to files from other ports. Testing the installation in - /var/tmp/port-name + /var/tmp/$(make -V PORTNAME) to do that while you have it installed would do that. Do not set USE_X_PREFIX unless your port --- doc::en::books::porters-handbook.sgml-portname,0.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: