Difference between revisions of "Building RPMS from SubVersion"

From MythTV Official Wiki
Jump to: navigation, search
Line 1: Line 1:
 
HOWTO BUILD RPMS OF THE MYTH SVN ([[Subversion]] Developer Repository):  
 
HOWTO BUILD RPMS OF THE MYTH SVN ([[Subversion]] Developer Repository):  
(written and tested using Fedora Core 4, fully updated, with atrpms enabled in the yum config, also tested on Fedora Core 5 with atrpms disabled)
+
(written and tested using Fedora Core 4, fully updated, with atrpms enabled in the yum config, also tested on Fedora Core 5 with atrpms disabled).
  
 
Required files:
 
Required files:

Revision as of 18:59, 14 May 2006

HOWTO BUILD RPMS OF THE MYTH SVN (Subversion Developer Repository): (written and tested using Fedora Core 4, fully updated, with atrpms enabled in the yum config, also tested on Fedora Core 5 with atrpms disabled).

Required files:

1) both spec files contain a %define near the top of the file that specifies where to find your local svn working copy - default is currently /root/myth-svn/ (with subdirs of mythtv and mythplugins). Change this folder to suit you. A duplicate of this working copy (just the uncompiled non-'.svn' related bits) will be made under /usr/src/redhat/BUILD/* for the rpm build process. This will be kept synchronised to your working copy for you.

2) unless specified otherwise (with .rpmrc file?), 'root' is required to build RPMS, and this is done from the /usr/src/redhat/* folder/s. Copy the above spec files to /usr/src/redhat/SPECS/ folder.

3) some other source dependencies are defined in the spec file. These are available from inside the standard mythtv .src.rpm files from atrpms, and can be correctly placed by the following command after you download the src rpm from atrpms to your homefolder):

(cd /usr/src/redhat/SOURCES; rpm2cpio ~/mythtv_0.18.1-*.rhfc4.at.src.rpm | cpio -i ) 

4) build the main mythtv set of rpms with this command:

rpmbuild -ba mythtv-svn-rpmbuild.spec 

NOTE: some options can be passed to rpmbuild to enable or disable features, in the form -with FEATURE or -without FEATURE where FEATURE is one of proc_opt, lirc, firewire, dvd, alsa, oss, xrandr, xvmcnvidia, opengl_vsync, arts, jack, xvmcvld, directfb. Features proc_opt, lirc, firewire, dvd, alsa, oss, xrandr, xvmcnvidia and opengl_vsync are enabled by default.

5) if (4) is successful, a bunch of RPMS are now available in /usr/src/redhat/RPMS/i386/. Install them (or at least the libmyth-devel one, as it's required for the next step):

rpm -Uhv /usr/src/redhat/RPMS/i386/*.rpm

Move the RPMS out of the way for the next steps:

mv /usr/src/redhat/RPMS/i386/*.rpm /tmp 

6) build the mythtv plugins set of rpms with this command:

rpmbuild -ba mythplugins-svn-rpmbuild.spec 

7) if (6) is successful, a bunch of extra RPMS are now available in /usr/src/redhat/RPMS/i386/. Install them too!

rpm -Uhv /usr/src/redhat/RPMS/i386/*.rpm 

8) RPM Build is now done!.

9) Installing another system with the identical myth version is now as easy as copying these RPMS to it and running:

yum localinstall *.rpm. 

All required run-time dependencies will be automatically installed from your enabled yum repositories (assuming you do have yum setup correctly, don't you!)

NOTE: any missing dependencies on your build system that are required for a successful build/run will be prompted (there are a lot!), and after installing these, you can try steps (4/6) again, till all dependencies are resolved.

David Bussenschutt (aka Buzz). <buzz@oska.com>