From neuhauser@sigpipe.cz Mon Mar 6 22:57:44 2006 Return-Path: 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 Reply-To: Roman Neuhauser To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: [PATCH] Porter's Handbook: plist-autoplist improvement X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 94151 >Category: docs >Synopsis: [PATCH] Porter's Handbook: plist-autoplist improvement >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 06 23:00:22 GMT 2006 >Closed-Date: Sun Jun 04 19:13:45 GMT 2006 >Last-Modified: Sun Jun 04 19:13:45 GMT 2006 >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: State-Changed-From-To: open->closed State-Changed-By: pav State-Changed-When: Sun Jun 4 19:13:37 UTC 2006 State-Changed-Why: Committed, thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=94151 >Unformatted: