Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 1998 16:17:51 -0000 (GMT)
From:      Duncan Barclay <dmlb@ragnet.demon.co.uk>
To:        Tom Hukins <tom@eborcom.com>
Cc:        freebsd-doc@FreeBSD.ORG
Subject:   RE: Suggestion for "Making a port yourself" in the Handbook
Message-ID:  <XFMail.981229161751.dmlb@computer.my.domain>
In-Reply-To: <19981229134046.A2455@eborcom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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