Subject: Re: make package -- single tree -- multiple arches
To: Andrew Brown <>
From: None <>
List: tech-pkg
Date: 04/09/2002 05:17:56
I typically use:

# uses work.`hostname`

# where to put binary pkgs

in /etc/mk.conf

On Tue, 9 Apr 2002, Andrew Brown wrote:

> i've recently started typing 'make package' instead of 'make install'
> for the pkg stuff i build on my machines.  this works very well
> (modulo the occasional transient build problem which a cvs update
> usually cures), but since i share my pkgsrc tree between several
> machines of varying architectures and revision level, it started to
> bite me.  i'd build a given pkg for my current i386 machine, then
> build it on a sparc, then try to install it on another i386 machine,
> and lose horribly.
> 	/usr/pkg/bin/tcsh: Exec format error. Binary file not executable.
> ick.
> 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
> 	.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.
> that way i can make packages for my sparc, my alpha, all my i386
> machines, etc, without worrying about clobbering binary pkgs for other
> architectures.
> -- 
> |-----< "CODE WARRIOR" >-----|
>             * "ah!  i see you have the internet
> (Andrew Brown)                that goes *ping*!"
>       * "information is power -- share the wealth."