mirror of
https://github.com/frappe/bench.git
synced 2025-01-08 16:14:12 +00:00
Merge branch 'master' of https://github.com/nginn/bench
This commit is contained in:
commit
1ea70e654d
@ -0,0 +1,24 @@
|
||||
To prepare your environment for building .deb package install instruments: <br>
|
||||
`sudo apt-get install build-essential devscripts debhelper` <br>
|
||||
<br>
|
||||
<b>Important:</b> to build .deb package archive name must be in the format $(name)\_$(version).orig.tar.gz <br> and directory within it must be named as $(name)\_$(version)<br><br>
|
||||
|
||||
This build uses <i>dh-virtualenv</i>. For installation please follow the [tutorial] (http://dh-virtualenv.readthedocs.org/en/0.10/tutorial.html)
|
||||
|
||||
To build debian package from scratch: <br>
|
||||
1) make working directory (basically with any name) near archive bench_0.92.orig.tar.gz: <br>
|
||||
`mkdir build_dir` <br>
|
||||
2) copy debian directory in there: <br>
|
||||
`cp -r debian/ build_dir/` <br>
|
||||
3) change directory: <br>
|
||||
`cd build_dir/` <br>
|
||||
4) run package build: <br>
|
||||
`debuild -us -uc` <br>
|
||||
5) install resulting package: <br>
|
||||
`sudo dpkg -i ../bench_0.92_amd64.deb` <br>
|
||||
Please note that name of package contains your architecture so for 32-bit machines name will differ. <br>
|
||||
<br>
|
||||
<i>Current state</i>: runs without problems on all Ubuntu versions installing bench in `/usr/share/python/bench/bin/bench`. Fails on Debian 8 with version format conflict.
|
||||
|
||||
Useful links:
|
||||
[Introduction to Debian Packaging](https://wiki.debian.org/IntroDebianPackaging#Step_3:_Add_the_Debian_packaging_files)
|
@ -0,0 +1,38 @@
|
||||
<b>Important</b>:
|
||||
* archive name must be in the format $(name)-$(version).tar.gz
|
||||
and directory within it must be named as $(name)-$(version) <br>
|
||||
* filename of the .spec file must be exactly as a package name, do not change it <br>
|
||||
* do not run `rpmdev-setuptree` and `rpmbuild` as a root user <br>
|
||||
|
||||
<i>To prepare</i> your environment for building .rpm package do the following: <br>
|
||||
1. install instruments: <br>
|
||||
`sudo yum install epel-release rpmdevtools yum-utils` <br>
|
||||
2. create directory hierarchy for rpm (this will create directory ~/rpmbuild with the subdirectories BUILD RPMS SOURCES SPECS SRPMS): <br>
|
||||
`rpmdev-setuptree` <br>
|
||||
3. place `bench.spec` into ~/rpmbuild/SPECS <br>
|
||||
4. place `bench-0.92.tar.gz` into ~/rpmbuild/SOURCES <br>
|
||||
5. install all required for .rpm building dependencies: <br>
|
||||
`yum-builddep ~/rpmbuild/SPECS/bench.spec`
|
||||
<br>
|
||||
|
||||
<i>To build</i> .rpm package run: <br>
|
||||
`rpmbuild -ba ~/rpmbuild/SPECS/bench.spec` <br>
|
||||
The resulting .rpm will be in `~/rpmbuild/RPMS/` and .srpm in `~/rpmbuild/SRPMS`
|
||||
|
||||
<i>To install</i> .rpm package run: <br>
|
||||
`sudo yum localinstall path/to/rpm/package` <br>
|
||||
<br>
|
||||
<i>Current state:</i> builds ok but resulting bench fails with the error: <br>
|
||||
`Traceback (most recent call last):` <br>
|
||||
`File "/usr/bin/bench", line 7, in <module>` <br>
|
||||
`from bench.cli import cli` <br>
|
||||
`ImportError: No module named bench.cli` <br>
|
||||
|
||||
Useful links:
|
||||
[rpm packaging tutorial] (http://www.ibm.com/developerworks/library/l-rpm1/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user