2017-06-28 23:14:01 +02:00
# **rpn v2.3** - generation
2017-06-12 19:32:26 +02:00
For now rpn is proposed only for **GNU/Linux**
It can be generated following the steps below
## version identification
2017-06-28 23:14:01 +02:00
rpn is dynamically linked against
2017-06-12 19:32:26 +02:00
- GNU MP v6.1.2
- GNU MPFR v3.1.5
2017-06-28 23:14:01 +02:00
and embeds the source code of linenoise-ng v1.0.1
2017-06-12 19:32:26 +02:00
2017-06-28 23:14:01 +02:00
It is necessary to get MPFR and linenoise-ng to generate rpn.
2017-06-12 19:32:26 +02:00
2017-06-28 23:14:01 +02:00
## install GNU MPFR v3.1.5-p8 headers
2017-06-12 19:32:26 +02:00
2017-06-28 23:14:01 +02:00
- download **GNU MPFR v3.1.5-p8** from http://www.mpfr.org
- install it with usual autotools commands `./configure && make && make install`
2017-06-12 19:32:26 +02:00
2017-06-28 23:14:01 +02:00
## install linenoise-ng v1.0.1 source code
2017-06-12 19:32:26 +02:00
- download **linenoise-ng v1.0.1** from https://github.com/arangodb/linenoise-ng
- checkout the tag v1.0.1
2017-06-12 19:35:08 +02:00
- apply the following patch to the source code
2017-06-12 19:32:26 +02:00
```
--- ../../../linenoise-ng/src/linenoise.cpp 2017-06-10 18:13:31.752976287 +0200
+++ linenoise.cpp 2017-06-12 18:54:50.481794824 +0200
@@ -2587,12 +2587,15 @@
// ctrl-I/tab, command completion, needs to be before switch statement
if (c == ctrlChar('I') & & completionCallback) {
2017-06-28 23:14:01 +02:00
+ // rpn #178: enable autocompletion on void entry
2017-06-12 19:32:26 +02:00
+ #if 0
if (pos == 0) // SERVER-4967 -- in earlier versions, you could paste
// previous output
continue; // back into the shell ... this output may have leading
// tabs.
// This hack (i.e. what the old code did) prevents command completion
// on an empty line but lets users paste text with leading tabs.
+ #endif
killRing.lastAction = KillRing::actionOther;
historyRecallMostRecent = false;
```
2017-06-28 23:14:01 +02:00
- install linenoise-ng with cmake commands `mkdir build && cd build && cmake .. && make install`
2017-06-12 19:32:26 +02:00
2017-06-28 23:14:01 +02:00
## generate rpn
2017-06-12 19:32:26 +02:00
2017-06-12 19:35:08 +02:00
- clone [rpn project ](https://github.com/louisrubet/rpn/ ) or download a zipped version from [the release directory ](https://github.com/louisrubet/rpn/releases )
2017-06-12 19:32:26 +02:00
```
# git clone https://github.com/louisrubet/rpn.git
```
- make
CMake must be installed on the generation machine
2017-06-12 21:59:10 +02:00
2017-06-12 19:32:26 +02:00
```
# cd rpn/
# mkdir build
# cd build & & cmake .. & & make
```
2017-06-12 21:59:10 +02:00
- install
2017-06-12 19:32:26 +02:00
```
2017-06-12 21:59:10 +02:00
# cd rpn/build
2017-06-12 19:32:26 +02:00
# sudo make install
```
2017-06-12 21:59:10 +02:00
- packages
2017-06-19 21:43:26 +02:00
To build RPM package you should install CMake 2.6.0 or higher
2017-06-12 21:59:10 +02:00
```
# cd rpn/build
2017-07-01 14:53:08 +02:00
# sudo make package
2017-06-19 21:43:26 +02:00
[100%] Built target rpn
Run CPack packaging tool...
CPack: Create package using DEB
(...)
CPack: Create package using RPM
(...)
CPack: Create package using TGZ
(...)
```