doc/build-ios.md
author Damiano Boppart <damiano@pep-security.net>
Tue, 29 Aug 2017 00:25:54 +0200
branchENGINE-237
changeset 2014 4b6659d17b61
permissions -rw-r--r--
Clean up doc/readme.md, Linux- and macOS-specific instructions
damiano@2014
     1
# Using NetPGP instead of GnuPG
damiano@2014
     2
## Prepare
damiano@2014
     3
damiano@2014
     4
Get OpenSSL and build/install it as shared library.
damiano@2014
     5
damiano@2014
     6
```
damiano@2014
     7
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
damiano@2014
     8
tar xvfz openssl-1.0.1u.tar.gz
damiano@2014
     9
cd openssl-1.0.1u
damiano@2014
    10
./Configure darwin64-x86_64-cc --prefix=$HOME shared
damiano@2014
    11
make install
damiano@2014
    12
```
damiano@2014
    13
damiano@2014
    14
Get and autoconf NetPGP
damiano@2014
    15
damiano@2014
    16
```
damiano@2014
    17
cd $SRC
damiano@2014
    18
hg clone https://cacert.pep.foundation/dev/repos/netpgp-et/
damiano@2014
    19
cd netpgp-et
damiano@2014
    20
autoreconf -i
damiano@2014
    21
```
damiano@2014
    22
damiano@2014
    23
## Build
damiano@2014
    24
damiano@2014
    25
Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set,
damiano@2014
    26
system's default libcrypto may silently be used instead, causing memory
damiano@2014
    27
corruption or crash at runtime.
damiano@2014
    28
damiano@2014
    29
```
damiano@2014
    30
mkdir netpgp_debug
damiano@2014
    31
cd netpgp_debug
damiano@2014
    32
$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
damiano@2014
    33
make
damiano@2014
    34
make install
damiano@2014
    35
```