Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Aug 1999 11:32:24 +0100
From:      Nik Clayton <nik@freebsd.org>
To:        ports@freebsd.org
Subject:   Package creation without installation
Message-ID:  <19990826113224.A70914@kilt.nothing-going-on.org>

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

This isn't directly a -ports issue.  However, I tried -hackers, and the
silence was deafening.  I figure you folks have the most experience with
using the pkg_* commands, and the format, and are the next best set of 
people to answer this query.  I'm not on the list, so would appreciate a
cc: of any replies.  Thanks.

N

----- Forwarded message from Nik Clayton <nik@freebsd.org> -----

Date: Sat, 21 Aug 1999 12:02:40 +0100
From: Nik Clayton <nik@freebsd.org>
To: hackers@freebsd.org
Subject: Package creation without installation

-hackers,

I'm playing around with the pkg_create(1) command at the moment, trying
to get the creation of pre-built versions (HTML, PS, etc) of the FDP
documentation working.

One of the things I'm trying to do is *not* require that the doc that's
being packaged up be installed first.

For example, if I'm building the PS version of the FAQ then I can

    # pwd
    /tmp/niks-package-build-area
    # cd doc/en_US.ISO_8859-1/books/faq
    # make FORMATS=ps

What I'd like to do is then create a package from this file, such that
when it is installed it does not default to installing in to 

    /tmp/niks-package-build-area/docs/en_US.ISO_8859-1/books/faq

but instead defaults to installing somewhere under /usr/share/doc/.

>From my read of the pkg_create(1) man page this should be possible, using
either the -s command line option, or the @srcdir directive in the PLIST.

But I can't get it to work.  Using the above directories as an example,
I would expect the following to work:

    # pkg_create -c COMMENT -d DESCR -f PLIST -p /usr/share/doc -s . faq.tgz

(where PLIST contains one line, "book.ps").  From reading pkg_create(1),
this should set the installation prefix to "/usr/share/doc", giving an 
installed filename of "/usr/share/doc/faq.ps", but should use the current 
directory when building the tar file.  So at this point, 
/usr/share/doc/book.ps doesn't need to exist, as long as ./book.ps exists.

However, this doesn't work, tar(1) complains that it can't add 
/usr/share/doc/faq.ps.  This is unsurprising, as (a) /usr/share/doc/faq.ps 
doesn't exist, because I haven't done "make install", and (b) I don't see an
option to tar(1) that lets you prepend a directory component to the start
of all the filenames in the archive.

So I assume that you can only produce packages from files that are
already in the 'right' place in the filesystem, yes?

That being the case, what is the '-s' option to pkg_create(1) for?

N

----- End forwarded message -----

-- 
 [intentional self-reference] can be easily accommodated using a blessed,
 non-self-referential dummy head-node whose own object destructor severs
 the links.
    -- Tom Christiansen in <375143b5@cs.colorado.edu>


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?19990826113224.A70914>