Version 1 (modified by slavazanko, 16 years ago) (diff) |
---|
Building binary packages for Fedora/RHEL/CentOS
Agreements and denotes
In order to eliminate the ambiguous interpretations need to determine the terms and symbols:
- ${SRC_DIR} - directory with source tree;
- ${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. packagin guidelines for more information.
Prepare to build
You must have copy of our repository. For do this, please consult with 'getting sources' page.
In source tree run commands:
cd ${SRC_DIR} ./autogen.sh ./configure make dist
After all, in root of source tree you will have tarball named mc-<version>.tar.gz
Usage of rpmbuild
You may build binary rpm package with rpmbuild utility. In this case your OS must have all packages and libraryes from requires list.
- Copy file ${SRC_DIR}/contrib/dist/redhat/mc.spec into ${RPMBUILD_DIR}/SPECS.
- Copy file ${SRC_DIR}/mc-<версия>.tar.gz into ${RPMBUILD_DIR}/SOURCES.
- Build a binary package.
- Build a source package (src.rpm).
As shell-command look like:
cp ${SRC_DIR}/contrib/dist/redhat/mc.spec ${RPMBUILD_DIR}/SPECS cp ${SRC_DIR}/mc-*.tar.gz ${RPMBUILD_DIR}/SOURCES rpmbuild -bb ${RPMBUILD_DIR}/SPECS/mc.spec rpmbuild -bs ${RPMBUILD_DIR}/SPECS/mc.spec
Build of binary package and source package may be complete with one command:
rpmbuild -ba ${RPMBUILD_DIR}/SPECS/mc.spec
Refer to man rpmbuild for getting more info.
Usage of mock
If you'll use mock utility, not need to install all packages and libraryes required for sucessfull build.
- Copy file ${SRC_DIR}/contrib/dist/redhat/mc.spec into ${RPMBUILD_DIR}/SPECS.
- Copy file ${SRC_DIR}/mc-<версия>.tar.gz into ${RPMBUILD_DIR}/SOURCES.
- Build a source package (src.rpm).
- Run mock with specified OS for build.
As shell-command look like:
cp ${SRC_DIR}/contrib/dist/redhat/mc.spec ${RPMBUILD_DIR}/SPECS cp ${SRC_DIR}/mc-*.tar.gz ${RPMBUILD_DIR}/SOURCES rpmbuild --nodeps -bs ${RPMBUILD_DIR}/SPECS/mc.spec mock ${RPMBUILD_DIR}/SRPMS/mc-*.src.rpm -r fedora-11-i386
Refer to man mock for getting more info.
Usage of 'koji' build-farms
TODO. Hubbitus: help, please :)