LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create binary RPM from source tar? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-binary-rpm-from-source-tar-885025/)

veeruk101 06-07-2011 11:58 AM

How to create binary RPM from source tar?
 
Right now to install software from source I do a ./configure && make && make install which doesn't allow for easy uninstallation (some don't come with an 'uninstall' goal, and if they do you have to keep the source around).

I'd like to learn how to create binary RPMs from source tar.gz files (one reason being that it makes for easier uninstallation). I tried the following but it complains with the following errors:

Code:

$ rpmbuild -ta mysource.tar.gz

error: Name field must be present in package: (main package)
error: Version field must be present in package: (main package)
error: Release field must be present in package: (main package)
error: Summary field must be present in package: (main package)
error: Group field must be present in package: (main package)
error: License field must be present in package: (main package)


Apparently that's what happens when there is no SPEC file in the tarball. But all the tars I've tried give this same error. Is there a simple way to create binary RPMs from source files - as an example, this source tar http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz

szboardstretcher 06-07-2011 12:02 PM

I used this thread when I had to do this a while back:

http://www.fedoraforum.org/forum/arc...p/t-49110.html

Of course, things might have changed by now. I apologize if this turns out to be unusable.

veeruk101 06-07-2011 12:11 PM

In that post you linked to he has a spec file, whereas I don't. So I could create one with just fields like 'Name', 'Version', etc, but how could I take the source tar and this spec file and turn it into a binary RPM? I've tried searching all over but can't find anything about it, so hopefully someone could explain it. Thanks.

teckk 06-07-2011 08:15 PM

A little bit of info.
http://tldp.org/HOWTO/RPM-HOWTO/build.html

vinaytp 06-08-2011 12:03 AM

Hi veeruk101,

You can also use Alien to convert source to RPM

Thanks,


All times are GMT -5. The time now is 09:10 PM.