howto create rpm (ffmpeg in particular)
hi all
i want to find out how to create an rpm, i am a linux novice, but i don't think that that should stop me i need to create an ffmpeg rpm because the ones that i have been using are getting a little outdated and do not provide all that i need the version that i am currently using is the latest one for rhel3 from dag.wieers.com created from the src rpm so that i could enable amr_nb the problem is, it doesn't seem to convert some videos correctly, and it may be because the build is too old so i just want to find out if this can be done by someone like me, and if it is easy enough to do over and over (so i can upgrade the build if necessary) i know that ffmpeg has a lot of third party libraries that need to be installed as well these i would just install as normal from rpm (eg. amr_nb, mp3, etc) thanks dave |
Sure, why not. It's not that hard.
If the system is unchanged rpm's are built in the /usr/src/redhat tree: BUILD -> here are rpm's unpacked, configured and compiled RPMS -> packaged rpm's are stored here SOURCES -> tarballs and patches SPECS -> the .spec files with which to script building an rpm SRPMS -> packaged rpm's are stored here (tarball+patches+spec file) BTW, before I continue, some tarballs come with a spec file (zcat tarball.tgz|tar -t|grep -ie "\.spec$"). Then you can build it straight away with "rpm -tb app.spec" and forget the rest below. OK. You already know you will have to install the dependencies like development libraries. Next grab the last .src.rpm (or the spec file, get the latest tarball separately) and install/place it. This will leave you with the tarball (+patches if any) in SOURCES and the .spec file in SPECS. Unpack the tarball manually, apply patches, then configure and compile it to see if there are no errors. If there aren't any continue looking at the .spec file. Here is a crude example: Code:
%define name app This looks like a lot, but it isn't. And you're right, when you got the spec file right for one rpm you usually don't have to tweak much afterwards. * If you think you will want to build more rpm's have a look at this IBM developerWorks doc Packaging software with RPM, Part 2: Building without root. Because if you keep building rpm's as root account user you will probably fsck up one time polluting your system. |
See also:
http://qa.mandriva.com/twiki/bin/view/Main/RpmHowTo - Mandriva RPM HOWTO http://www.rpm.org/RPM-HOWTO/ - RPM.org RPM Howto |
oops, thank you, didn't realise i got a response
hopefully i can pull this off |
For Redhat/FEdora rpms take a look at the Fedora Developers Guide.
|
All times are GMT -5. The time now is 07:24 PM. |