Re: "rpmbuild" to do prep and configure?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Circa 2005-07-15 dixit Robert P. J. Day:

: 
:   i'm experimenting with rebuilding "lftp" from the src rpm file, and
: i was curious to see the Makefile generated from the configure step in
: the spec file:
: 
: %configure --with-modules --disable-static --with-ssl --with-debug
: 
:   i realize that rpmbuild doesn't have an option that lets me stop
: after the configure step without going on to the actual make.  is
: there something that would be equivalent?  i guess i can always just
: run the configure step manually in the BUILD directory, but it would
: have been nice to have an option to do the configure without going any
: farther.  or am i just missing the obvious?

You're not missing the glaringly obvious; as others have pointed out,
there is no "%configure" stage between the "%prep" and "%build" stages.

You can, however, do something like the following:

    ____________________

    %prep
    # ...

    %build
    %configure --blah --haha --heehee

    if [ x"${CONFIGURE_ONLY}" = x"yes" ]; then
        echo "--> Exiting after configure at user's request..."
        exit 42
    fi
    ____________________

Then, build using something like:

    ____________________

    env CONFIGURE_ONLY=yes rpmbuild -bc blah.spec

Some versions of RPM may clear out the environment; you may need to use
macros instead:

    ____________________

    # ...
    %{!?configure_only:%%define configure_only no}
    # ...

    %prep
    # ...

    %build
    %configure --blah --haha --heehee

    if [ x"%{configure_only}" = x"yes" ]; then
        echo "--> Exiting after configure at user's request..."
        exit 42
    fi
    ____________________

Building would go something like this:

    ____________________

    rpmbuild -bc --define='configure_only yes' blah.spec
    ____________________

(CAUTION: My syntax may be wrong; i'm a bit rusty.)

-- 
jim knoble  |  jmknoble@xxxxxxxxx  |  http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 809F:09B9:9686:D035:4AB0::9455:124B:0A62:DD6A:76D6)
........................................................................
: PATRIOT, n. - One to whom the interests of a part seem superior to   :
: those of the whole. The dupe of statesmen and the tool of conquerors.:
:                                                                      :
: PATRIOTISM, n. - Combustible rubbish read to the torch of any one    :
: ambitious to illuminate his name.  In Dr. Johnson's famous dictionary:
: patriotism is defined as the last resort of a scoundrel. With all due:
: respect to an enlightened but inferior lexicographer I beg to submit :
: that it is the first.                            --Ambrose Bierce    :
:......................................................................:


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux