IPS-5 rm dependency builders (is in independend repo now)
parent
c6ee339de5
commit
0c85c1f46b
38
README.md
38
README.md
|
@ -115,40 +115,4 @@ You can find the build artefacts in the `pEpMacOSAdapter/build` folder
|
|||
|
||||
# HowToBuild pEpObjCAdapter for Linux
|
||||
|
||||
Only Debian 11 is currently tested.
|
||||
|
||||
Our GNUstep envirnoment must be setup. You can find HowTo setup GNUstep on Debian 11 [here](https://devdocs.pep.security/IPSec/Team%20%26%20Development/Objective-C/Cross%20Platform%20Objective-C%20%26%20Swift/Cross%20Platform%20Objective-C/VirtualBox%20Setup%20-%3E%20Debian%2011%20Plus%20GNUstep.html). There is also a Debian 11 Virtual Box image with GNUstep already setup (find info [here](https://devdocs.pep.security/IPSec/Team%20%26%20Development/Objective-C/Cross%20Platform%20Objective-C%20%26%20Swift/Cross%20Platform%20Objective-C/HowTo%20-%3E%20Build%20GNUstep%20On%20Debian%2011.html)).
|
||||
|
||||
## Install Required Tools
|
||||
|
||||
``
|
||||
apt install sudo curl git build-essential python3 clang pkg-config nettle-dev capnproto libssl-dev python3-lxml libtool autoconf uuid-dev sqlite3 libsqlite3-dev
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
source ~/.bashrc
|
||||
``
|
||||
|
||||
## Install Dependencies
|
||||
```
|
||||
mkdir src_pEpObjCAdapter
|
||||
cd src_pEpObjCAdapter
|
||||
git clone http://pep-security.lu/gitlab/ipsec/common-dependency-build-helpers-4-linux.git
|
||||
cd common-dependency-build-helpers-4-linux
|
||||
sh build.sh
|
||||
cd ..
|
||||
git clone http://pep-security.lu/gitlab/ipsec/pepgnustephelper.git
|
||||
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
|
||||
```
|
||||
|
||||
## Build for Linux
|
||||
```
|
||||
cd pEpObjCAdapter
|
||||
make install messages=yes [shared=no] debug=[yes|no]
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
Until now we failed linking to libpEpObjCAdapter statically due to not being able to link Categories.
|
||||
|
||||
### Build Dir & Build Artefacts
|
||||
|
||||
You can find the build artefacts in `/usr/GNUstep/Local/Library/Libraries`.
|
||||
See pEpObjCAdapter/pEpObjCAdapter/build-linux/README.md
|
|
@ -1,5 +1,4 @@
|
|||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
@ -8,17 +7,5 @@ cd "${SCRIPT_DIR}"
|
|||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
sh dependency_builder/install-yml2.sh
|
||||
sh dependency_builder/build-sqlite3.sh
|
||||
sh dependency_builder/build-asn1.sh
|
||||
|
||||
sh dependency_builder/build-gmp.sh
|
||||
sh dependency_builder/build-nettle.sh
|
||||
sh dependency_builder/build-sequoia.sh
|
||||
|
||||
sh dependency_builder/build-libetpan.sh
|
||||
sh dependency_builder/build-pEptransport.sh
|
||||
sh dependency_builder/build-pEpengine.sh
|
||||
|
||||
sh dependency_builder/build-PEPObjCTypes.sh
|
||||
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
VERSION="v0.9.28"
|
||||
NAME="asn1c"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
####BUFF: wrong!
|
||||
if [ -f "${PREFIX}/bin/asn1c" ]; then
|
||||
echo "lib exists already in ${PREFIX}/bin/. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DIR="${SRC_DIR}/${NAME}"
|
||||
if [ ! -d "${DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone -b ${VERSION} git://github.com/vlm/asn1c.git
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${SRC_DIR}/${NAME}/"
|
||||
autoreconf -iv
|
||||
./configure --prefix="${PREFIX}"
|
||||
make install
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${DIR}"
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,59 +0,0 @@
|
|||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
GMP_VERSION=6.2.1
|
||||
GMP_NAME="gmp-${GMP_VERSION}"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
if [ -f "${LIB_DIR}/libgmp.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
GMP_DIR="${SRC_DIR}/${GMP_NAME}"
|
||||
if [ ! -d "${GMP_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
# GMP snapshot must be used until released
|
||||
wget -nc https://gmplib.org/download/gmp/$GMP_NAME.tar.bz2
|
||||
tar xvf ${GMP_NAME}.tar.bz2
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
#export CC="${CC} -fPIC"
|
||||
cd "${SRC_DIR}/${GMP_NAME}"
|
||||
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="${PREFIX}"/lib/pkgconfig ./configure --prefix="${PREFIX}" --disable-shared
|
||||
make clean
|
||||
make -j4
|
||||
make install
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${SRC_DIR}"*.bz2
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,52 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
VERSION="master"
|
||||
|
||||
if [ -f "${LIB_DIR}/libetpan.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LIBETPAN_DIR="${SRC_DIR}/libetpan"
|
||||
if [ ! -d "${LIBETPAN_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/libetpan
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${LIBETPAN_DIR}"
|
||||
./autogen.sh --prefix=${PREFIX}
|
||||
make install
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${SRC_DIR}"
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,66 +0,0 @@
|
|||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
|
||||
#############################
|
||||
#############################
|
||||
#############################
|
||||
|
||||
NETTLE_VERSION="3.7.3"
|
||||
NETTLE_NAME="nettle-${NETTLE_VERSION}"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
if [ -f "${LIB_DIR}/libnettle.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NETTLE_DIR="${SRC_DIR}/${NETTLE_NAME}"
|
||||
if [ ! -d "${NETTLE_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
wget -nc https://ftp.gnu.org/gnu/nettle/${NETTLE_NAME}.tar.gz
|
||||
tar xvf ${NETTLE_NAME}.tar.gz
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${SRC_DIR}/${NETTLE_NAME}/"
|
||||
#PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$LIB_DIR/pkgconfig CC_FOR_BUILD="$(whereis gcc)" ./configure --host=${HOST} --prefix=${CURRENT_LIB_DIR} --with-lib-path=${PREFIX}/lib --with-include-path=${PREFIX}/include --disable-assembler --disable-arm-neon --disable-documentation --verbose
|
||||
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=$LIB_DIR/pkgconfig ./configure --prefix=${PREFIX} --with-lib-path=${PREFIX}/lib --with-include-path=${PREFIX}/include --disable-shared --disable-documentation --verbose
|
||||
make clean
|
||||
make -j4
|
||||
make install
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
mv "${PREFIX}/lib64/libnettle.a" "${PREFIX}/lib"
|
||||
mv "${PREFIX}/lib64/libhogweed.a" "${PREFIX}/lib"
|
||||
|
||||
rm -rf "${SRC_DIR}"*.gz
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,89 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
|
||||
#############################
|
||||
#############################
|
||||
#############################
|
||||
|
||||
ENGINE_VERSION="master"
|
||||
ENGINE_NAME="pEpEngine"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
if [ -f "${LIB_DIR}/lib${ENGINE_NAME}.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
EGNINE_DIR="${SRC_DIR}/${ENGINE_NAME}"
|
||||
if [ ! -d "${EGNINE_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone -b ${ENGINE_VERSION} https://gitea.pep.foundation/buff/pEpEngine
|
||||
# cd pEpEngine
|
||||
# git checkout cdb7070e8934bfbaa23ca93c563e2a01a6361774
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${SRC_DIR}/${ENGINE_NAME}/"
|
||||
echo "PREFIX=${PREFIX}" > local.conf
|
||||
echo '
|
||||
PER_MACHINE_DIRECTORY=$(PREFIX)/share/pEp
|
||||
|
||||
SQLITE3_FROM_OS=""
|
||||
|
||||
YML2_PATH=$(HOME)/local/bin/yml2
|
||||
|
||||
ETPAN_LIB=-L$(PREFIX)/lib
|
||||
ETPAN_INC=-I$(PREFIX)/include
|
||||
|
||||
ASN1C=$(PREFIX)/bin/asn1c
|
||||
ASN1C_INC=-I$(PREFIX)/share/asn1c
|
||||
|
||||
OPENPGP=SEQUOIA
|
||||
SEQUOIA_LIB=-L$(PREFIX)/lib
|
||||
SEQUOIA_INC=-I$(PREFIX)/include
|
||||
|
||||
CFLAGS+=-DNDEBUG=1 -Os
|
||||
CXXFLAGS+=-DNDEBUG=1 -Os
|
||||
LDFLAGS+=-nostartfiles -Os
|
||||
|
||||
export PKG_CONFIG_PATH=$(PREFIX)/share/pkgconfig/
|
||||
' >> local.conf
|
||||
make install
|
||||
make dbinstall
|
||||
|
||||
cp asn.1/*.a "${PREFIX}/lib/" # missing in the makefile.
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${SRC_DIR}
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,49 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
SRC_DIR=~/src
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
VERSION="master"
|
||||
|
||||
# Go
|
||||
|
||||
TRANSPORT_DIR="${SRC_DIR}/libpEpTransport"
|
||||
if [ ! -d "${TRANSPORT_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone -b ${VERSION} https://gitea.pep.foundation/pEp.foundation/libpEpTransport.git
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${TRANSPORT_DIR}"
|
||||
echo "" > local.conf
|
||||
echo "PREFIX=${PREFIX}" >> local.conf
|
||||
echo "YML2_PATH=${PREFIX}/bin/yml2" >> local.conf
|
||||
make src
|
||||
make install
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,53 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
VERSION="openpgp/v1.3.1"
|
||||
|
||||
if [ -f "${LIB_DIR}/libsequoia_openpgp_ffi.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SEQUOIA_DIR="${SRC_DIR}/sequoia"
|
||||
if [ ! -d "${SEQUOIA_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone -b ${VERSION} --depth 1 https://gitlab.com/sequoia-pgp/sequoia.git
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${SEQUOIA_DIR}"
|
||||
cargo update
|
||||
RUSTFLAGS="-L ${LIB_DIR}" cargo build -p sequoia-openpgp-ffi --release
|
||||
make -C openpgp-ffi install PREFIX=${PREFIX}
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${SRC_DIR}"
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,58 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
SRC_DIR=$2
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
mkdir -p "${PREFIX}/include"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${SRC_DIR}" = "" ]; then
|
||||
SRC_DIR=~/src
|
||||
fi
|
||||
mkdir -p "${SRC_DIR}"
|
||||
cd "${SRC_DIR}"
|
||||
SRC_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
LIB_DIR="${PREFIX}/lib"
|
||||
mkdir -p "${LIB_DIR}"
|
||||
|
||||
SQLITE_NAME="sqlite"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
if [ -f "${LIB_DIR}/libsqlite3.a" ]; then
|
||||
echo "lib exists already in ${LIB_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SQLITE_DIR="${SRC_DIR}/${SQLITE_NAME}"
|
||||
if [ ! -d "${SQLITE_DIR}" ]; then
|
||||
cd "${SRC_DIR}"
|
||||
git clone https://pep-security.lu/gitlab/misc/sqlite.git
|
||||
cd "${CURRENT_DIR}"
|
||||
fi
|
||||
|
||||
cd "${SRC_DIR}/${SQLITE_NAME}/"
|
||||
gcc -c -fPIC sqlite3.c -o sqlite3.o
|
||||
ar qf libsqlite3.a sqlite3.o
|
||||
ranlib libsqlite3.a
|
||||
mv libsqlite3.a "${PREFIX}/lib"
|
||||
cp sqlite3.h "${PREFIX}/include/"
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
rm -rf "${SRC_DIR}/${SQLITE_NAME}"
|
||||
rm -rf "${LIB_DIR}/"*.so*
|
||||
rm -rf "${LIB_DIR}/"*.la
|
|
@ -1,38 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(dirname "$0")
|
||||
PREFIX=$1
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Get Absolute Paths & Setup
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
SCRIPT_DIR=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
if [ "${PREFIX}" = "" ]; then
|
||||
PREFIX=~/local
|
||||
fi
|
||||
INSTALL_DIR="${PREFIX}/bin"
|
||||
mkdir -p "${INSTALL_DIR}"
|
||||
cd "${PREFIX}"
|
||||
PREFIX=$(pwd)
|
||||
cd "${CURRENT_DIR}"
|
||||
|
||||
|
||||
#############################
|
||||
#############################
|
||||
#############################
|
||||
|
||||
VERSION="2.7.1"
|
||||
|
||||
# Exit on errors
|
||||
set -e
|
||||
|
||||
if [ -d "${INSTALL_DIR}/yml2" ]; then
|
||||
echo "yml2 exists already in ${INSTALL_DIR}. If you want to rebuild it, delete the existing one."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "${INSTALL_DIR}"
|
||||
git clone -b ${VERSION} https://gitea.pep.foundation/fdik/yml2
|
||||
cd "${CURRENT_DIR}"
|
|
@ -0,0 +1,41 @@
|
|||
# HowToBuild pEpObjCAdapter for Linux
|
||||
|
||||
Only Debian 11 is currently tested.
|
||||
|
||||
Our GNUstep envirnoment must be setup. You can find HowTo setup GNUstep on Debian 11 [here](https://devdocs.pep.security/IPSec/Team%20%26%20Development/Objective-C/Cross%20Platform%20Objective-C%20%26%20Swift/Cross%20Platform%20Objective-C/VirtualBox%20Setup%20-%3E%20Debian%2011%20Plus%20GNUstep.html). There is also a Debian 11 Virtual Box image with GNUstep already setup (find info [here](https://devdocs.pep.security/IPSec/Team%20%26%20Development/Objective-C/Cross%20Platform%20Objective-C%20%26%20Swift/Cross%20Platform%20Objective-C/HowTo%20-%3E%20Build%20GNUstep%20On%20Debian%2011.html)).
|
||||
|
||||
## Install Required Tools
|
||||
|
||||
````
|
||||
|
||||
apt install sudo curl git build-essential python3 clang pkg-config nettle-dev capnproto libssl-dev python3-lxml libtool autoconf uuid-dev sqlite3 libsqlite3-dev
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
source ~/.bashrc
|
||||
``
|
||||
|
||||
## Install Dependencies
|
||||
```
|
||||
mkdir src_pEpObjCAdapter
|
||||
cd src_pEpObjCAdapter
|
||||
git clone http://pep-security.lu/gitlab/ipsec/common-dependency-build-helpers-4-linux.git
|
||||
cd common-dependency-build-helpers-4-linux
|
||||
sh build.sh
|
||||
cd ..
|
||||
git clone http://pep-security.lu/gitlab/ipsec/pepgnustephelper.git
|
||||
git clone https://gitea.pep.foundation/pep.foundation/pEpObjCAdapter.git
|
||||
```
|
||||
|
||||
## Build for Linux
|
||||
|
||||
```
|
||||
cd pEpObjCAdapter/pEpObjCAdapter/build-linux
|
||||
make install messages=yes [shared=no] debug=[yes|no]
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
Until now we failed linking to libpEpObjCAdapter statically due to not being able to link Categories.
|
||||
|
||||
### Build Dir & Build Artefacts
|
||||
|
||||
You can find the build artefacts in `/usr/GNUstep/Local/Library/Libraries`.
|
Loading…
Reference in New Issue