LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-16-2003, 01:31 AM   #1
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
Question rpmbuild question


I was wondering if there is any way to pass arguments via rpmbuild to the subsequent ./configure script execution, like --help to see the configure options available, or to have one thing or two optimized. Is it possible to do that? if so whith which flag(s). Currently I am working on a project which would make sense to release as .rpm, src.rpm, and tgz. Problem is that I'm making the src.rpm right off the tgz, which has a bunch of options passed to the configure script, I'd like to have that same functionality (not building useless stuff, and the viceversa) to the src.rpm, but I seem unable to do that, I've built one to try, but I simply cannot find the arguments to pass to the configure script, and even more the behavior tends to be erratic, sometimes the built rpm has everything configured into the binaries, and other times it simply builds the most basic stack of them! So I would like to be able to pass the arguments to the src.rpm just like you would with the configure. I am writing this program for a little company who happens to use only RedHat and want to be able to "custom" build the package as needed, as well as pure binary packages, hence the three flavors, in tgz I develop, and plan to ship in src.rpm and rpm...

... Maybe I just said pure useless things, but I am getting quite frustrated, and the how to's and web references in rpm don't seem to answer this question. Any info, as usual will be must appreciated
 
Old 06-16-2003, 03:52 PM   #2
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
Don't have an answer friend but I just bought Maximum-RPM, it is also available as a freely downloadable doc from here: http://www.redhat.com/docs/books/max-rpm/max-rpm-html/

Also you can get on the freshrpms mailing list, those folks may have an answer. Join here: http://freshrpms.net/lists/

Good Luck.
 
Old 06-16-2003, 07:23 PM   #3
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Thanks anyway, I'll do that...
 
Old 06-16-2003, 07:37 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Well, there's two ways.
First you got the "%configure" statement after %prep and %setup you could pass options to:

%configure \
--prefix=${RPM_BUILD_ROOT}/usr \
--with-weirdass-args=no \
make

Trying to pass "--help" is useless because that wouldn't result in making a proper Makefile.

The second way is to shove it all under "%build":
%build
./configure \
--prefix=${RPM_BUILD_ROOT}/usr \
--keep-pieces-when-broken=yes \
make
 
Old 06-16-2003, 08:01 PM   #5
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Wow! Thank your unSpawn. So how would I actually pass the ./configure args during rebuild?
 
Old 06-16-2003, 08:34 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Uh. Forgot to explain my examples are used in actual spec files. Should put configure options there.

I haven't tested in what way rpm cleans the subshell environment, so exporting BUILDFLAGS="--prefix=${RPM_BUILD_ROOT}/usr --keep-pieces-when-broken=yes " and in the specfile having
" ./configure %{BUILDFLAGS}" *could* work, else you may have to wedge in a %define.
 
Old 06-18-2003, 11:18 PM   #7
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Original Poster
Rep: Reputation: 45
Thanks again, unSpawn. My goal is to give the src.rpm as many options as the configure script found in regular sources, so that the final rpm gets compiled tailored the same way as the configure with the convenience of the rpm file format for installation-package administration.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpmbuild - build section question jcalcote SUSE / openSUSE 3 03-12-2005 06:10 AM
rpmbuild question prubino Linux - Software 1 01-14-2005 11:01 AM
rpmbuild newbie question newellrp1 Linux - Software 2 11-07-2004 10:47 AM
rpmbuild linuxdev Linux - Newbie 1 02-18-2004 03:13 PM
rpmbuild mprice74 Linux - Newbie 2 08-17-2003 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration