Subject: Re: building package tarball without installing
To: Mirian Crzig Lennox <mirian@cosmic.com>
From: Eric Schnoebelen <eric@cirr.com>
List: tech-pkg
Date: 03/14/2000 13:48:42
Mirian Crzig Lennox writes:
- Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de> writes:
- > > On Mon, 13 Mar 2000, Mirian Crzig Lennox wrote:
- > > Since 'make package' implies 'make install', I figured that maybe I
- > > could do something like
- > > make DESTDIR=/usr/local/tmp
- > >
- > > Unfortunately, this results in a package that wants to install
- > > under /usr/local/tmp/usr/pkg instead of /usr/pkg. This can be
- > > circumvented with the -p option to pkg_add, but yuck.
- >
- > try this at bsd.pkg.mk, line 591:
- >
- > .if defined(DESTDIR)
- > PKG_ARGS+= -p ${PREFIX:S,${DESTDIR}/,,}
- > .else
- > PKG_ARGS+= -p ${PREFIX}
- > .endif
- > PKG_ARGS+= -P "`${MAKE} package-depends PACKAGE_DEPENDS_QUI
- CK=true|sort -u`"
- >
- > Might be worth adding... let me know if this improves things for you!
-
- Slightly. Now pkg_create can't create the package because it can't
- find the files.
- However, it does point me in the right direction. Thanks!
Try adding the flag formerly known as `-s' (this changed
about two pkg_install releases ago, but I forget what it changed
to.. :-) (ah, it's now `-L'.)
The new block should probably look something like this:
PKG_ARGS+= -p ${PREFIX}
.if defined(DESTDIR)
PKG_ARGS+= -L ${DESTDIR}/${PREFIX}
.endif
PKG_ARGS+= -P "`${MAKE} package-depends PACKAGE_DEPENDS_QUICK=true|sort -u`"
[ the above is entirely untested, although I have used
the flags in the above fashion, just not in the NetBSD
packages tree. ]
One gotcha. pkg_add will add the files specified into
the local machine's pkg.db database, wether they are actually
installed on the local machine or not..
- So, it seems like building a package without installing it is not something
- which is typically done under the NetBSD package system. I guess my next
- question is: would this be a desirable feature for people other than myself
- to have?
Well, I've been using the packaging tools to package
commercial products for NetBSD. (my other incarnation:
http://www.apps2go.com, Software2Go, LLC; purveyors of Motif
2.1.20 for NetBSD, FreeBSD, OpenBSD, Linux on Sparc, Alpha and
Intel.) We've not been using bsd.pkg.mk, although we have
learned much from it in generating our own packaging rules for
imake..
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
"Cutting the space budget really restores my faith in humanity. It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation." -- Johnny Hart