Difference between revisions of "Building RPMS from SubVersion"

From MythTV Official Wiki
Jump to: navigation, search
Line 1: Line 1:
[[Category:Developer Tools And Scripts]]
+
[[Category:Developer Tools and Scripts]]
  
 
HOWTO BUILD RPMS OF THE MYTH SVN (Subversion Developer Repository):  
 
HOWTO BUILD RPMS OF THE MYTH SVN (Subversion Developer Repository):  

Revision as of 04:15, 13 January 2006


HOWTO BUILD RPMS OF THE MYTH SVN (Subversion Developer Repository):

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 dependancies are defined in the spec file. These are available from inside the standard myth .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 ~/myth_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

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 dependancies will be automatically installed from your enabled yum repositories (assuming you do have yum setup correctly, don't you!)

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

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