From owner-freebsd-doc Tue Dec 29 09:36:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA21999 for freebsd-doc-outgoing; Tue, 29 Dec 1998 09:36:59 -0800 (PST) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA21992 for ; Tue, 29 Dec 1998 09:36:58 -0800 (PST) (envelope-from dmlb@ragnet.demon.co.uk) Received: from [158.152.46.40] (helo=ragnet.demon.co.uk) by post.mail.demon.net with smtp (Exim 2.10 #2) id 0zv34O-0007UQ-00; Tue, 29 Dec 1998 17:36:37 +0000 Received: from dmlb by ragnet.demon.co.uk with local (Exim 1.82 #1) id 0zv1qC-0004wr-00; Tue, 29 Dec 1998 16:17:52 +0000 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <19981229134046.A2455@eborcom.com> Date: Tue, 29 Dec 1998 16:17:51 -0000 (GMT) From: Duncan Barclay To: Tom Hukins Subject: RE: Suggestion for "Making a port yourself" in the Handbook Cc: freebsd-doc@FreeBSD.ORG Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 29-Dec-98 Tom Hukins wrote: > I've found the "Making a port yourself" section of the Handbook very > useful recently, as I've started contributing ports. > > I didn't like the idea of building a packing list by hand, so I > figured out a way of creating packing lists semi-automatically. > There is currently no mention of any such technique in the handbook, > so I suggest this (or something better) is included: > > > Creating a packing list manually can be a very tedious task. It is > often best to create the PLIST file using the "find" program. Extracted from my mega-make files (http://www.ragnet.demon.co.uk/remake/), same idea just does a little more: _plistdir = ${PREFIX}/whatever PLIST = PLIST ${PLIST} : _PLIST _PLIST : echo "@owner ${PKG_OWN}" >${PLIST} echo "@group ${PKG_GRP}" >>${PLIST} find ${_plistdir} -type file | \ sed -e 's!^${_plistdir}/!!' | \ cat >>${PLIST} find ${_plistdir} -type dir | \ sed -e 's!^${_plistdir}/!!' | \ grep -v ${_plistdir} | \ tail +2 | \ sed -e 's!^!\@exec chown ${PKG_OWN}:${PKG_GRP} %D/!' | \ cat >>${PLIST} find -d ${_plistdir} -type dir | \ sed -e 's!^${_plistdir}/!!' | \ grep -v ${_plistdir} | \ sed -e 's!^!\@dirrm !' | \ cat >>${PLIST} Watch out for tabs! The rest of my remake stuff can be used to build ports, distributions and packages. Duncan --- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@ragnet.demon.co.uk | the alcoholics, and the permanently stoned. ________________________________________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message