Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 1999 10:34:33 +0100
From:      nclayton@lehman.com
To:        ports@freebsd.org
Subject:   Automatic handling of pkg/MESSAGE and pkg/INSTALL; ${LOCALBASE}
Message-ID:  <19990609103433.J22307@lehman.com>

next in thread | raw e-mail | index | archive | help
Hi folks,

I'm not a particularly prolific porter, and I only maintain a couple of 
ports useful to the Doc. Proj., so I don't keep a close eye on this mailing
list.

I'm reading the porting documentation at 

    http://www.freebsd.org/handbook/porting.html

and a couple of oddities struck me.

If you go and read the description of pkg/MESSAGE, you see that it is 
only automatically displayed if the user is adding the package, and not
if they do "make install" on the port.  If you want to display it during
the port you need to do something like;

    post-install:
            @${CAT} pkg/MESSAGE

which strikes me as a little odd.  Surely if the file exists then the port
should display it at install time anyway, without (presumably) a couple
of hundred ports all duplicating the above code in their Makefiles.

Similarly, pkg/INSTALL, which is only automatically run by the package; to
get that functionality in the port you need to do;

    pre-install:
            @pkg/INSTALL ${PKGNAME} PRE-INSTALL

    [...]

    post-install:
            @pkg/INSTALL ${PKGNAME} POST-INSTALL

Surely the above would make more sense, and then the description changes to
something like;

    If you want to have certain commands run before or after the port is
    installed (either with "make install", or by "pkg_add <package>",
    place them in a script called pkg/INSTALL.  This script will receive
    two parameters . . .

Finally, ${LOCALBASE}.  The textproc/docproj port has a number of
dependencies on files/directories (as opposed to programs) that are
currently written as;

    ${PREFIX}/share/sgml/iso8879:${PORTSDIR}/textproc/iso8879

Would I be right in thinking that ${PREFIX} in this example should really
be ${LOCALBASE}?

Thanks,

N
-- 
--+==[ Systems Administrator, Year 2000 Test Lab, Lehman Brothers, Inc. ]==+--
--+==[      1 Broadgate, London, EC2M 7HA     0171-601-0011 x5514       ]==+--
--+==[              Year 2000 Testing: It's about time. . .             ]==+--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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