Building RPMs for FC5
Introduction
To build an RPM you need two things:
- a tarball of your source
- a .spec file describing:
- how to build the tarbal
- what dependencies the build has
- which files (once built) should go into the RPM
- what the RPM contains
- who built it
- ...
- all .spec files are located here
Inspecting an RPM
If you are missing .spec files required to create an RPM, it is possible to extract these from an existing RPM if required:
- to list items within an existing RPM:
- rpm2cpio <package> | cpio -t
General Items to Build
- olibs-glew
- get the latest version of glew
- the downloaded tarball can be used directly
- olibs-ffmpeg
- get the latest version of ffmpegfrom svn
- tar up: tar -cvzf olib-ffmpeg.tar.gz ffmpeg/
- openlibraries
- to create the openlibraries tar file, use make dist
In general:
- place the .spec files in /usr/src/redhat/SPECS
- place the tar files in /usr/src/redhat/SOURCES
- to build, rpmbuild -ba <path to spec file>
Jahplayer/Jplayer
- needs to include encoder
- split RPMs into jahplayer, jplayer
- to create tar balls, use:
- tar -cvzf jahplayer-0.2.2.tar.gz jahtools/encoder/* jahplayer/* jahwidgets/src/qt3/* jahwidgets/Makefile jahwidgets/src/Makefile --exclude "*_moc*" --exclude "*_obj*" --exclude "*CVS*" --exclude "*.so*" --exclude "*.vcproj*"
- tar -cvzf jplayer-0.2.2.tar.gz jahtools/jplayer/* jahwidgets/src/qt3/* jahwidgets/Makefile jahwidgets/src/Makefile --exclude "*_moc*" --exclude "*_obj*" --exclude "*CVS*" --exclude "*.so*" --exclude "*.vcproj*"
- the tarballs need to have a root directory of e.g. jahplayer-0.2.2
- once the tarball has been created, do:
- mkdir jahplayer-0.2.2
- cd jahplayer-0.2.2
- tar -xvzf ../jahplayer-0.2.2.tar.gz
- cd ..
- tar -cvzf jahplayer-0.2.2.tar.gz jahplayer-0.2.2
- once the tarball has been created, do:
Upload
- upload to repo.jahshaka.org
- once there, run createrepo on all sub-directories
- if only!
- repo.jashaka.org appears to be locked down, and has no applications on it
- need to keep a mirror copy on your local machine
- then, locally, run createreop on i386, i386/SRPMS and SRPMS
- finally, copy the repodata sub-directories into the appropriate places.
