Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 1999 12:02:40 +0100
From:      Nik Clayton <nik@freebsd.org>
To:        hackers@freebsd.org
Subject:   Package creation without installation
Message-ID:  <19990821120240.A27252@kilt.nothing-going-on.org>

next in thread | raw e-mail | index | archive | help
-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/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/doc -s . faq.tgz

(where PLIST contains one line, "book.ps").  From reading pkg_create(1),
this should set the installation prefix to "/usr/doc", giving an 
installed filename of "/usr/doc/faq.ps", but should use the current 
directory when building the tar file.  So at this point, /usr/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/doc/faq.ps.  This is unsurprising, as (a) /usr/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
-- 
 [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-hackers" in the body of the message




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