Subject: make package -- single tree -- multiple arches
To: None <tech-pkg@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-pkg
Date: 04/09/2002 02:58:35
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 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.
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" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."