RPM Community Forums

Mailing List Message of <rpm-users>

determine package arch without/before building package?

From: Tim Mooney <Tim.Mooney@ndsu.edu>
Date: Wed 11 Jul 2012 - 18:13:18 CEST
Message-ID: <alpine.SOC.2.02.1207111059290.8791@dogbert.cc.ndsu.NoDak.edu>

Given a spec file foo.spec, is there a way use rpmbuild or rpm to
determine what the package architecture will be without (or before)
actually building the package?

I know I could use sed or grep on the spec file looking for BuildArch,
but I'm wondering if there's a way to essentially run the equivalent of
a macro --eval query against a spec file.


Tim Mooney                                             Tim.Mooney@ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
Received on Wed Jul 11 18:24:19 2012
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.