1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
= Packaging
== CentOS 7
=== 1. Retrieve the source
==== Tarball
[source,console]
--
curl -LO https://github.com/rnpgp/rnp/archive/v0.9.0.tar.gz
tar xzf v0.9.0.tar.gz
cd rnp-0.9.0
--
==== Git
[source,console]
--
git clone https://github.com/rnpgp/rnp
cd rnp
git checkout v0.9.0
--
=== 2. Launch a container
[source,console]
--
docker run -ti --rm -v $PWD:/usr/local/rnp centos:7 bash
--
From this point, all commands are executed in the container.
==== 3. Install pre-requisites
[source,console]
--
# for newer cmake and other things
yum -y install epel-release
# rnp
yum -y install git cmake3 make gcc-c++
yum -y install bzip2-devel zlib-devel json-c12-devel
# botan
rpm --import https://github.com/riboseinc/yum/raw/master/ribose-packages.pub
rpm --import https://github.com/riboseinc/yum/raw/master/ribose-packages-next.pub
curl -L https://github.com/riboseinc/yum/raw/master/ribose.repo > /etc/yum.repos.d/ribose.repo
yum -y install botan2-devel
--
=== 4. Build the RPM
[source,console]
--
yum -y install rpm-build
mkdir ~/build
cd ~/build
cmake3 -DBUILD_SHARED_LIBS=on -DBUILD_TESTING=off -DCPACK_GENERATOR=RPM /usr/local/rnp
make package
--
=== 5. Check and Install the RPM
It may be helpful to run `rpmlint` on the RPM and note new warnings or errors.
[source,console]
--
yum -y install rpmlint
rpmlint rnp-0.9.0-1.el7.centos.x86_64.rpm
--
At this point, you can test that the RPM installs successfully:
[source,console]
--
yum localinstall rnp-0.9.0-1.el7.centos.x86_64.rpm
--
|