Subject: DESTDIR and `make package'
To: None <tech-pkg@netbsd.org>
From: Jim Wise <jwise@draga.com>
List: tech-pkg
Date: 01/26/2001 01:26:19
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While working on the code for system packages, I came upon a quirk in
bsd.pkg.mk which I had inadvertently carried over to the makefile for
system packages.

If DESTDIR is set when I do `make install' for a package, the package
will be installed in ${DESTDIR}/${PREFIX}, and registered in
${DESTDIR}/${PREFIX}/var/db/pkg.  So far, so good.

In addition, the @cwd recorded in

	${DESTDIR}/${PREFIX}/var/db/pkg/<name>/+CONTENTS

will be ${DESTDIR}/${PREFIX}, which I also believe is correct.

Howeve, I contend that if I then do `make package', the resulting
package should have an @cwd of ${PREFIX}, _not ${DESTDIR}/${PREFIX}.
${DESTDIR}/${PREFIX} can, however be recorded in the @src directive, via
pkg_create -L.

I have a fix for bsd.pkg.mk to fix this for `make package', while
maintaining the current (IMHO correct) behavior for `make install'.

I would like to commit this ASAP.  Does anyone object?

- -- 
				Jim Wise
				jwise@draga.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6cRiT2JhG4/qi8rQRAm9JAKCkU9CVlm8GVqoEkbA3Ur1bNE+FvwCfcHts
ilGgkctRBvnykL+F5+qHlfE=
=4MwM
-----END PGP SIGNATURE-----