Update README for macOS
authorDamiano Boppart
Mon, 20 Mar 2017 16:14:27 +0100
changeset 168197db633df271
parent 1677 e02c53c94550
child 1682 1a6a30a2b30c
Update README for macOS
README-OSX.md
     1.1 --- a/README-OSX.md	Thu Mar 16 23:44:40 2017 +0100
     1.2 +++ b/README-OSX.md	Mon Mar 20 16:14:27 2017 +0100
     1.3 @@ -1,38 +1,30 @@
     1.4 -# this file is under Creative Commons License 3.0 cc-by-sa
     1.5 +This file is under Creative Commons License 3.0 cc-by-sa
     1.6  
     1.7  # Building for OS X/macOS
     1.8 -
     1.9  See also README.txt for general information.
    1.10  
    1.11 -## Environment
    1.12 +For compiling pEp Engine and its dependencies, make sure you have the LANG variable set. Some source files contain unicode characters, and python (assuming files are ascii) will fail.
    1.13  
    1.14 -`export LANG=en_US.UTF-8` is recommended on OS X.
    1.15 -
    1.16 -`export DYLD_FALLBACK_LIBRARY_PATH=$HOME/lib:/opt/local/lib` will help if you
    1.17 -build in your home and with MacPorts.
    1.18 +```
    1.19 +export LANG=en_US.UTF-8
    1.20 +```
    1.21  
    1.22  ## Dependencies
    1.23  
    1.24  ### MacPorts
    1.25 +[Install MacPorts](https://www.macports.org/install.php) for your version of OS X/macOS.
    1.26  
    1.27 -Install [MacPorts](https://www.macports.org/) for your
    1.28 -[version of OS X/macOS](https://www.macports.org/install.php).
    1.29 -
    1.30 -Note that you need [Xcode installed](https://www.macports.org/install.php)
    1.31 -for MacPorts, and for building the engine. You also need to accept Xcode's EULA.
    1.32 -
    1.33 -#### MacPorts dependencies
    1.34 +If MacPorts is already installed on your machine, but was installed by a different user, make sure your `PATH` variable is set as follows in `~/.profile`:
    1.35  
    1.36  ```
    1.37 -sudo port install mercurial
    1.38 -sudo port install py27-lxml
    1.39 -sudo port install gpgme
    1.40 -sudo port install automake
    1.41 -sudo port install asn1c
    1.42 -sudo port install zlib
    1.43 +export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
    1.44  ```
    1.45  
    1.46 -There are others, please refer to the engine README.txt.
    1.47 +Install dependencies packaged with MacPorts as follows.
    1.48 +
    1.49 +```
    1.50 +sudo port install mercurial py27-lxml gpgme automake asn1c zlib openssl libiconv cyrus-sasl2
    1.51 +```
    1.52  
    1.53  Make sure that `python` is a version 2 one:
    1.54  
    1.55 @@ -40,10 +32,9 @@
    1.56  sudo port select python python27
    1.57  ```
    1.58  
    1.59 -### Other dependecies
    1.60 +### Other Dependecies
    1.61  
    1.62  #### [yml2](https://fdik.org/yml/toolchain)
    1.63 -
    1.64  Install into your home directory:
    1.65  
    1.66  ```
    1.67 @@ -58,16 +49,21 @@
    1.68  functions seem to have been renamed there. Therefore the dynlib from OS X is used.
    1.69  
    1.70  ```
    1.71 -git clone https://github.com/fdik/libetpan libetpan-osx
    1.72 -cd libetpan-osx/
    1.73 -./autogen.sh
    1.74 +git clone https://github.com/fdik/libetpan
    1.75 +cd libetpan
    1.76 +./autogen.sh --prefix "$HOME"
    1.77  make
    1.78 -cp ./src/.libs/libetpan.a ~/lib/
    1.79 +make install
    1.80  ```
    1.81  
    1.82 +## Building pEp Engine
    1.83 +
    1.84  ### Configuration
    1.85 +You can change some defaults by editing `Makefile.conf`. The following variable needs to be set appropriately:
    1.86  
    1.87 -You can change some defaults by editing `Makefile.conf`. But this readme assumes you don't.
    1.88 +```
    1.89 +LIBGPGME=/opt/local/lib/libgpgme.11.dylib
    1.90 +```
    1.91  
    1.92  ### Build
    1.93  
    1.94 @@ -77,28 +73,18 @@
    1.95  make db
    1.96  ```
    1.97  
    1.98 -Done! The result should be (among others):
    1.99 -
   1.100 -```
   1.101 -./src/libpEpEngine.a
   1.102 -./src/libpEpEngine.dylib
   1.103 -```
   1.104 -
   1.105 -### Install
   1.106 -
   1.107 -Install (you might need sudo for some commands, depending on how your system is set up):
   1.108 +### Installation
   1.109  
   1.110  ```
   1.111  make install
   1.112 -make -C db install
   1.113 +sudo make -C db install
   1.114  ```
   1.115  
   1.116 -Since the `system.db` rarely changes, `make -C db install` is not needed for every build.
   1.117 +Since the `system.db` rarely changes, the last step is not needed for every build. If you would like to be able to install the engine without `sudo`, ensure that your user can write the file `/usr/local/share/pEp/system.db`. This is not recommended for production machines.
   1.118  
   1.119  ### Run tests
   1.120  
   1.121 -If you installed the test keys in your keyring (README.txt),
   1.122 -this should just work:
   1.123 +If you installed the test keys in your keyring (see: README.txt), this should just work:
   1.124  
   1.125  ```
   1.126  make test