2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 09:14:04 +00:00
bench/os_packages/rpm_package_build
2016-03-02 16:53:51 +05:30
..
bench-0.92.tar.gz [Enhancements]Installing pip and bench 2016-03-02 16:53:51 +05:30
bench.spec.i686 [Enhancements]Installing pip and bench 2016-03-02 16:53:51 +05:30
bench.spec.x86_64 [Enhancements]Installing pip and bench 2016-03-02 16:53:51 +05:30
readme.md [Enhancements]Installing pip and bench 2016-03-02 16:53:51 +05:30

Important:

  • archive name must be in the format $(name)-$(version).tar.gz and directory within it must be named as $(name)-$(version)
  • filename of the .spec file must be exactly as a package name, do not change it
  • do not run rpmdev-setuptree and rpmbuild as a root user

To prepare your environment for building .rpm package do the following:

  1. install instruments:
    sudo yum install epel-release rpmdevtools yum-utils
  2. install latest pip and wheel (you can also look at this documentation):
    wget https://bootstrap.pypa.io/get-pip.py
    sudo python get-pip.py
  3. create directory hierarchy for rpm (this will create directory ~/rpmbuild with the subdirectories BUILD RPMS SOURCES SPECS SRPMS):
    rpmdev-setuptree
  4. place bench.spec into ~/rpmbuild/SPECS
  5. place bench-0.92.tar.gz into ~/rpmbuild/SOURCES
  6. install all required for .rpm building dependencies:
    sudo yum-builddep ~/rpmbuild/SPECS/bench.spec

To build .rpm package run:
rpmbuild -ba ~/rpmbuild/SPECS/bench.spec
The resulting .rpm will be in ~/rpmbuild/RPMS/ and .srpm in ~/rpmbuild/SRPMS

To install .rpm package run:
sudo yum localinstall path/to/rpm/package

Useful links: [rpm packaging tutorial] (http://www.ibm.com/developerworks/library/l-rpm1/)