mirror of
https://github.com/frappe/bench.git
synced 2024-11-15 01:34:05 +00:00
1.5 KiB
1.5 KiB
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
andrpmbuild
as a root user
To prepare your environment for building .rpm package do the following:
- install instruments:
sudo yum install epel-release rpmdevtools yum-utils
- create directory hierarchy for rpm (this will create directory ~/rpmbuild with the subdirectories BUILD RPMS SOURCES SPECS SRPMS):
rpmdev-setuptree
- place
bench.spec
into ~/rpmbuild/SPECS - place
bench-0.92.tar.gz
into ~/rpmbuild/SOURCES - install all required for .rpm building dependencies:
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
Current state: builds ok but resulting bench fails with the error:
Traceback (most recent call last):
File "/usr/bin/bench", line 7, in <module>
from bench.cli import cli
ImportError: No module named bench.cli
Useful links: [rpm packaging tutorial] (http://www.ibm.com/developerworks/library/l-rpm1/)