Changes between Initial Version and Version 1 of doc/packaging/redhat


Ignore:
Timestamp:
07/01/09 13:50:23 (15 years ago)
Author:
slavazanko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/packaging/redhat

    v1 v1  
     1= Building binary packages for Fedora/RHEL/CentOS = 
     2 
     3== Agreements and denotes == 
     4 
     5In order to eliminate the ambiguous interpretations need to determine the terms and symbols: 
     6  * ${SRC_DIR} - directory with source tree; 
     7  * ${RPMBUILD_DIR} - directory for builds rpm-packages by rpmbuild utility. Usually, this  {{{~/rpmbuild}}}, but may be {{{/usr/src/rpmbuild}}}. Also, you may redefine this directory to any other. See. [https://fedoraproject.org/wiki/PackagingGuidelines packagin guidelines] for more information. 
     8 
     9== Prepare to build == 
     10 
     11You must have copy of our repository. For do this, please consult with '[wiki:doc/getSources getting sources]' page. 
     12 
     13In source tree run commands: 
     14 
     15{{{ 
     16cd ${SRC_DIR} 
     17./autogen.sh 
     18./configure 
     19make dist 
     20}}} 
     21 
     22After all, in root of source tree you will have tarball named  {{{mc-<version>.tar.gz}}} 
     23 
     24== Usage of rpmbuild == 
     25 
     26You may build binary rpm package with rpmbuild utility. In this case your OS must have all packages and libraryes from [wiki:doc/buildAndInstall/req requires list]. 
     27 
     28 1. Copy file ${SRC_DIR}/contrib/dist/redhat/mc.spec into  ${RPMBUILD_DIR}/SPECS. 
     29 1. Copy file ${SRC_DIR}/mc-<версия>.tar.gz into ${RPMBUILD_DIR}/SOURCES. 
     30 1. Build a binary package. 
     31 1. Build a source package (src.rpm). 
     32 
     33As shell-command look like: 
     34{{{ 
     35cp ${SRC_DIR}/contrib/dist/redhat/mc.spec ${RPMBUILD_DIR}/SPECS 
     36cp ${SRC_DIR}/mc-*.tar.gz ${RPMBUILD_DIR}/SOURCES 
     37rpmbuild -bb ${RPMBUILD_DIR}/SPECS/mc.spec 
     38rpmbuild -bs ${RPMBUILD_DIR}/SPECS/mc.spec 
     39}}} 
     40 
     41Build of binary package and source package may be complete with one command: 
     42{{{ 
     43rpmbuild -ba ${RPMBUILD_DIR}/SPECS/mc.spec 
     44}}} 
     45Refer to {{{man rpmbuild}}} for getting more info. 
     46 
     47== Usage of mock == 
     48 
     49If you'll use [https://fedoraproject.org/wiki/Projects/Mock mock] utility, not need to install all packages and libraryes required for sucessfull build. 
     50 
     51 1. Copy file ${SRC_DIR}/contrib/dist/redhat/mc.spec into  ${RPMBUILD_DIR}/SPECS. 
     52 1. Copy file ${SRC_DIR}/mc-<версия>.tar.gz into ${RPMBUILD_DIR}/SOURCES. 
     53 1. Build a source package (src.rpm). 
     54 1. Run mock with specified OS for build. 
     55 
     56As shell-command look like: 
     57{{{ 
     58cp ${SRC_DIR}/contrib/dist/redhat/mc.spec ${RPMBUILD_DIR}/SPECS 
     59cp ${SRC_DIR}/mc-*.tar.gz ${RPMBUILD_DIR}/SOURCES 
     60rpmbuild --nodeps -bs ${RPMBUILD_DIR}/SPECS/mc.spec 
     61mock ${RPMBUILD_DIR}/SRPMS/mc-*.src.rpm -r fedora-11-i386 
     62}}} 
     63Refer to {{{man mock}}} for getting more info. 
     64 
     65== Usage of 'koji' build-farms == 
     66 
     67TODO. Hubbitus: help, please :) 
     68