Binaries that will be installed:
-
rnp
-
rnpkeys
rpm --import https://github.com/riboseinc/yum/raw/master/ribose-packages.pub
curl -L https://github.com/riboseinc/yum/raw/master/ribose.repo > /etc/yum.repos.d/ribose.repo
yum install -y rnp
# Clone the repository by version tag (or omit it to get the latest sources)
sudo apt install git
git clone https://github.com/rnpgp/rnp.git -b v0.13.1
# Install required packages
sudo apt install g++-8 cmake libbz2-dev zlib1g-dev libjson-c-dev build-essential python-minimal
# Download, build and install Botan2
wget -qO- https://botan.randombit.net/releases/Botan-2.12.1.tar.xz | tar xvJ
cd Botan-2.12.1
./configure.py --prefix=/usr
make
sudo make install
cd ..
# Cmake recommend out-of-source builds
mkdir rnp-build
cd rnp-build
# Cmake it
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=on -DBUILD_TESTING=off ../rnp/
make
sudo make install
# Clone the repository by version tag (or omit it to get the latest sources)
sudo apt install git
git clone https://github.com/rnpgp/rnp.git -b v0.13.1
# Enable access to `testing` packages by editing /etc/apt/sources.list
# deb http://deb.debian.org/debian testing main
# Install required packages
sudo apt install g++-8 cmake libbz2-dev zlib1g-dev libjson-c-dev libbotan-2-dev build-essential
# Cmake recommend out-of-source builds
mkdir rnp-build
cd rnp-build
# Cmake it
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=on -DBUILD_TESTING=off ../rnp/
make install
Clone this repo, or download a release and expand it. Then:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=on -DBUILD_TESTING=off .
make install
Having the clean MSYS2 installation, you’ll first need to update pacman and install needed packages via msys console:
pacman -Syu --noconfirm --needed
# Then most likely you'll need to close msys console and run it agian:
pacman -Syu --noconfirm --needed
# Install packages
pacman --noconfirm -S --needed tar zlib-devel libbz2-devel git automake autoconf libtool automake-wrapper gnupg2 make pkgconfig mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-json-c mingw64/mingw-w64-x86_64-libbotan mingw64/mingw-w64-x86_64-python2
Then clone the repository, say to rnp folder, and:
# CMake encourages out-of source builds.
mkdir rnp-build
cd rnp-build
# Add MinGW's lib and bin to PATH so dependency dll/lib can be found
export PATH="/c/msys64/mingw64/lib:/c/msys64/mingw64/bin:$PATH"
# Run cmake
cmake -DBUILD_SHARED_LIBS=yes -G "MSYS Makefiles" ../rnp
make && make install
Depending on how do you run rnp.exe and rnpkeys.exe you’ll need to make sure that librnp-0.dll is on path or in the same folder as well as all dependencies. You may check dependenices and their pathes via ntldd.exe in MSYS command prompt.