Changeset View
Changeset View
Standalone View
Standalone View
packaging/linux/appimage/build-deps.sh
- This file was added.
1 | #!/bin/bash | ||||
---|---|---|---|---|---|
2 | # | ||||
3 | # Build all KMyMoney's dependencies on Ubuntu 14.04. | ||||
4 | # | ||||
5 | # Prerequisites: cmake git build-essential libxcb-keysyms1-dev plus all deps for Qt5 | ||||
6 | # | ||||
7 | | ||||
8 | # Halt on errors and be verbose about what we are doing | ||||
9 | set -e | ||||
10 | set -x | ||||
11 | | ||||
12 | # Read in our parameters | ||||
13 | export BUILD_PREFIX=$1 | ||||
14 | export KMYMONEY_SOURCES=$2 | ||||
15 | | ||||
16 | # qjsonparser, used to add metadata to the plugins needs to work in a en_US.UTF-8 environment. | ||||
17 | # That's not always the case, so make sure it is | ||||
18 | export LC_ALL=en_US.UTF-8 | ||||
19 | export LANG=en_us.UTF-8 | ||||
20 | | ||||
21 | # We want to use $prefix/deps/usr/ for all our dependencies | ||||
22 | export DEPS_INSTALL_PREFIX=$BUILD_PREFIX/deps/usr/ | ||||
23 | export DOWNLOADS_DIR=$BUILD_PREFIX/downloads/ | ||||
24 | | ||||
25 | # Setup variables needed to help everything find what we build | ||||
26 | export LD_LIBRARY_PATH=$DEPS_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH | ||||
27 | export PATH=$DEPS_INSTALL_PREFIX/bin:$PATH | ||||
28 | export PKG_CONFIG_PATH=$DEPS_INSTALL_PREFIX/share/pkgconfig:$DEPS_INSTALL_PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH | ||||
29 | export CMAKE_PREFIX_PATH=$DEPS_INSTALL_PREFIX:$CMAKE_PREFIX_PATH | ||||
30 | | ||||
31 | # A kmymoney build layout looks like this: | ||||
32 | # kmymoney/ -- the source directory | ||||
33 | # downloads/ -- downloads of the dependencies from files.kde.org | ||||
34 | # deps-build/ -- build directory for the dependencies | ||||
35 | # deps/ -- the location for the built dependencies | ||||
36 | # build/ -- build directory for kmymoney itself | ||||
37 | # kmymoney.appdir/ -- install directory for kmymoney and the dependencies | ||||
38 | | ||||
39 | # Make sure our downloads directory exists | ||||
40 | if [ ! -d $DOWNLOADS_DIR ] ; then | ||||
41 | mkdir -p $DOWNLOADS_DIR | ||||
42 | fi | ||||
43 | | ||||
44 | # Make sure our build directory exists | ||||
45 | if [ ! -d $BUILD_PREFIX/deps-build/ ] ; then | ||||
46 | mkdir -p $BUILD_PREFIX/deps-build/ | ||||
47 | fi | ||||
48 | | ||||
49 | # The 3rdparty dependency handling in KMyMoney also requires the install directory to be pre-created | ||||
50 | if [ ! -d $DEPS_INSTALL_PREFIX ] ; then | ||||
51 | mkdir -p $DEPS_INSTALL_PREFIX | ||||
52 | fi | ||||
53 | | ||||
54 | # Switch to our build directory as we're basically ready to start building... | ||||
55 | cd $BUILD_PREFIX/deps-build/ | ||||
56 | | ||||
57 | # Configure the dependencies for building | ||||
58 | cmake $KMYMONEY_SOURCES/3rdparty -DCMAKE_INSTALL_PREFIX=$DEPS_INSTALL_PREFIX -DINSTALL_ROOT=$DEPS_INSTALL_PREFIX -DEXTERNALS_DOWNLOAD_DIR=$DOWNLOADS_DIR | ||||
59 | | ||||
60 | # Now start building everything we need, in the appropriate order | ||||
61 | cmake --build . --config RelWithDebInfo --target ext_iconv | ||||
62 | cmake --build . --config RelWithDebInfo --target ext_gettext | ||||
63 | cmake --build . --config RelWithDebInfo --target ext_zlib | ||||
64 | cmake --build . --config RelWithDebInfo --target ext_boost | ||||
65 | cmake --build . --config RelWithDebInfo --target ext_png | ||||
66 | cmake --build . --config RelWithDebInfo --target ext_xml | ||||
67 | cmake --build . --config RelWithDebInfo --target ext_xslt | ||||
68 | cmake --build . --config RelWithDebInfo --target ext_lzma | ||||
69 | cmake --build . --config RelWithDebInfo --target ext_fontconfig | ||||
70 | cmake --build . --config RelWithDebInfo --target ext_freetype | ||||
71 | cmake --build . --config RelWithDebInfo --target ext_qt | ||||
72 | cmake --build . --config RelWithDebInfo --target ext_frameworks | ||||
73 | cmake --build . --config RelWithDebInfo --target ext_gmp | ||||
74 | cmake --build . --config RelWithDebInfo --target ext_alkimia | ||||
75 | cmake --build . --config RelWithDebInfo --target ext_kdiagram | ||||
76 | cmake --build . --config RelWithDebInfo --target ext_icu |