RPM Community Forums

Mailing List Message of <rpm-users>

RE: RPM 5.0.0 -- in place setup and building -- how ?

From: Stefan Westmeier <stefan_westmeier@hotmail.de>
Date: Fri 01 Feb 2008 - 14:38:49 CET
Message-ID: <BAY115-W23EF6B62B9C013B2245A5E98300@phx.gbl>

ad 1.+3.)   
--define and --macros what exactly what I was looking for. 
I had already a rpmmacros file in place but just did not know how to make rpm use it.
ad 2.) with pick up I meant: in the install step I copy / install files from the buildir to an installdir.
I defined the prep and build step to not unpack any sources to builddir and just take it from my workarea.
Just did not know how to do that. Setting %_builddir worked :-)
Here ist what I did:
some macros:

%_builddir    /home/user/SWDev%_wa_src      wa_most%_wa_prod     wa_most_products%_wa_dlv      wa_most_deliveries%_wa_pkgsrc   sys/most%_wa_pkgsrc_b ../../..%_sourcedir   %{_builddir}/%{_wa_prod}/RPMS%_rpmdir      %{_builddir}/%{_wa_prod}/RPMS%_srcrpmdir   %{_builddir}/%{_wa_prod}/RPMS%_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.qnx.rpm
part in the spec file:

%prep%setup -T -D -n %{_wa_src}/%{_wa_pkgsrc}echo "Nothing to be done for prep in %{_wa_src}/%{_wa_pkgsrc}"
%buildecho "Inplace building [%{_builddir}/%{_wa_src}/%{_wa_pkgsrc}]"make
%installmkdir -p $RPM_BUILD_ROOT/sys/most/libinstall -m 444 %{_wa_pkgsrc_b}/%{_wa_prod}/sys/most/most.lib \              

From: n3npq@mac.comSubject: Re: RPM 5.0.0 -- in place setup and building -- how ?Date: Fri, 1 Feb 2008 07:55:46 -0500To: rpm-users@rpm5.org

On Feb 1, 2008, at 7:22 AM, Stefan Westmeier wrote:
 1. can I pass macros somehow to rpmbuild on the commandline ?     I need to use a different set of macros for each of my workareas. 
Yes, there is a --define option. However encapsulating settings per-workarea
is likely to easier than adding gazillions of CLI options.

2. how can I direct rpm to look for files to pick up in the install step in my workarea ?     I guess setting %_builddir might work? 
I'm not sure what "files to pick up means" and so can't answer specifically.

3. Any other hints how to do "Packaging that can build anywhere"?    Current hints I got from MAX-RPM.  

exec $rpm --macros ${macros} $*
Received on Fri Feb 1 14:38:51 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.