doc/build-netpgp.md
author Thomas
Tue, 25 Jun 2019 20:26:39 +0200
branchsequoia_windows
changeset 3876 739c8e54b738
parent 2606 6bb1d3db6e36
permissions -rw-r--r--
Merge with ENGINE-581
damiano@2014
     1
# Using NetPGP instead of GnuPG
damiano@2014
     2
## Prepare
damiano@2014
     3
damiano@2039
     4
Get OpenSSL:
damiano@2039
     5
curl -O https://www.openssl.org/source/openssl-1.1.0f.tar.gz
damiano@2039
     6
damiano@2039
     7
Build it using the openssl-for-ios build script:
damiano@2039
     8
git clone https://github.com/sinofool/build-openssl-ios/ .
damiano@2039
     9
damiano@2039
    10
damiano@2039
    11
damiano@2039
    12
 and build/install it as shared library.
damiano@2014
    13
damiano@2014
    14
```
damiano@2014
    15
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
damiano@2014
    16
tar xvfz openssl-1.0.1u.tar.gz
damiano@2014
    17
cd openssl-1.0.1u
damiano@2014
    18
./Configure darwin64-x86_64-cc --prefix=$HOME shared
damiano@2014
    19
make install
damiano@2014
    20
```
damiano@2014
    21
damiano@2014
    22
Get and autoconf NetPGP
damiano@2014
    23
damiano@2014
    24
```
damiano@2014
    25
cd $SRC
damiano@2606
    26
hg clone https://pep.foundation/dev/repos/netpgp-et/
damiano@2014
    27
cd netpgp-et
damiano@2014
    28
autoreconf -i
damiano@2014
    29
```
damiano@2014
    30
damiano@2014
    31
## Build
damiano@2014
    32
damiano@2014
    33
Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set,
damiano@2014
    34
system's default libcrypto may silently be used instead, causing memory
damiano@2014
    35
corruption or crash at runtime.
damiano@2014
    36
damiano@2014
    37
```
damiano@2014
    38
mkdir netpgp_debug
damiano@2014
    39
cd netpgp_debug
damiano@2014
    40
$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
damiano@2014
    41
make
damiano@2014
    42
make install
damiano@2014
    43
```