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