Subject: Re: make package -- single tree -- multiple arches
To: Andrew Brown <atatat@atatdot.net>
From: Johnny C. Lam <jlam@netbsd.org>
List: tech-pkg
Date: 04/09/2002 07:48:38
On Tue, Apr 09, 2002 at 02:58:35AM -0400, Andrew Brown wrote:
>
> what we really need is something like OBJMACHINE but for packages. is
> there anything in pkgsrc that does this already, or should i wack
> something together?
>
> i was thinking something along the lines of
>
> .if defined(PKGMACHINE)
> PACKAGES_ARCHDIR?= (something like HOST_OSTYPE from bsd.own.mk)
> .endif
>
> and then everywhere that ${PACKAGES} is used, we could try a mkdir
> ${PACKAGES}/${PACKAGES_SUBDIR} if that didn't already exist. or
> something like that.
You can already do this by adding a definition for PACKAGES in your
/etc/mk.conf:
OBJMACHINE= yes
PACKAGES= ${DIRECTORY OF PACKAGES DIR}/packages/${MACHINE_ARCH}
The first bit cause each the work directory to be work.${MACHINE_ARCH},
and the second bit will cause binary packages to be placed in
.../packages/${MACHINE_ARCH}.
Cheers,
-- Johnny Lam <jlam@netbsd.org>