[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
getting architecture/os info when building an rpm
- From: rpjday <rpjday mindspring com>
- To: rpm list <rpm-list redhat com>
- Subject: getting architecture/os info when building an rpm
- Date: Tue, 8 Jan 2002 11:59:19 -0500 (EST)
i've been trying to figure out how to identify/select
architecture info in a spec file, and i'm getting just plain
confused.
first, near as i can tell, there are two variables,
RPM_ARCH and RPM_OS, that reflect the architecture and the
operating system on which the build is being done. these
are entirely dependent on the host OS, and are not affected
by anything else you do, like selecting a build architecture
and so on, is that right? for me, they're always "i386"
and "linux". so far, so good.
but how exactly does the "--target" option work with
rpmbuild? from the man page, i read that the argument to
target is interpreted as "arch-vendor-os", and sets the
macros %_target, %_target_arch and %_target_os. certainly,
it doesn't seem that this means "respectively," otherwise
those are incredibly misnamed macros.
so i tested by adding some "echo" statements to the %prep,
was confused by what i saw, gratuitously added "echo"es for
two more macros i just made up, and here's what got printed
when i ram rpmbuild with "--target sparc-sun-sunos -bp" on my
spec file:
%_target sparc-sunos
%_target_arch %_target_arch (clearly no such macro)
%_target_os sunos
%_target_vendor pc (huh?)
%_vendor redhat (double huh??)
are these macros documented anywhere? more to the point,
when one is doing a conditional based on %ifos or %ifarch,
what exactly is being compared? by that, i mean there is
no macro listed that equals just "sparc". so what's being
compared if i use the test
%ifarch sparc
getting curiouser and curiouser,
rday
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]