Changeset View
Changeset View
Standalone View
Standalone View
packaging/linux/appimage/build-kmymoney.sh
- This file was added.
1 | #!/bin/bash | ||||
---|---|---|---|---|---|
2 | | ||||
3 | # Halt on errors and be verbose about what we are doing | ||||
4 | set -e | ||||
5 | set -x | ||||
6 | | ||||
7 | # Read in our parameters | ||||
8 | export BUILD_PREFIX=$1 | ||||
9 | export KMYMONEY_SOURCES=$2 | ||||
10 | | ||||
11 | # qjsonparser, used to add metadata to the plugins needs to work in a en_US.UTF-8 environment. | ||||
12 | # That's not always the case, so make sure it is | ||||
13 | export LC_ALL=en_US.UTF-8 | ||||
14 | export LANG=en_us.UTF-8 | ||||
15 | | ||||
16 | # We want to use $prefix/deps/usr/ for all our dependencies | ||||
17 | export DEPS_INSTALL_PREFIX=$BUILD_PREFIX/deps/usr/ | ||||
18 | export DOWNLOADS_DIR=$BUILD_PREFIX/downloads/ | ||||
19 | | ||||
20 | # Setup variables needed to help everything find what we build | ||||
21 | export LD_LIBRARY_PATH=$DEPS_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH | ||||
22 | export PATH=$DEPS_INSTALL_PREFIX/bin:$PATH | ||||
23 | export PKG_CONFIG_PATH=$DEPS_INSTALL_PREFIX/share/pkgconfig:$DEPS_INSTALL_PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH | ||||
24 | export CMAKE_PREFIX_PATH=$DEPS_INSTALL_PREFIX:$CMAKE_PREFIX_PATH | ||||
25 | | ||||
26 | # Make sure our build directory exists | ||||
27 | if [ ! -d $BUILD_PREFIX/kmymoney-build/ ] ; then | ||||
28 | mkdir -p $BUILD_PREFIX/kmymoney-build/ | ||||
29 | fi | ||||
30 | | ||||
31 | # Now switch to it | ||||
32 | cd $BUILD_PREFIX/kmymoney-build/ | ||||
33 | | ||||
34 | # Determine how many CPUs we have | ||||
35 | CPU_COUNT=`grep processor /proc/cpuinfo | wc -l` | ||||
36 | | ||||
37 | # Configure KMyMoney | ||||
38 | cmake $KMYMONEY_SOURCES \ | ||||
39 | -DCMAKE_INSTALL_PREFIX:PATH=$BUILD_PREFIX/kmymoney.appdir/usr \ | ||||
40 | -DCMAKE_BUILD_TYPE=Release \ | ||||
41 | -DBUILD_TESTING=FALSE | ||||
42 | | ||||
43 | # Build and Install KMyMoney (ready for the next phase) | ||||
44 | make -j$CPU_COUNT install |