-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathappimagecraft.yml
86 lines (79 loc) · 2.9 KB
/
appimagecraft.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: 1
project:
name: com.github.knarfs.smuview
#version_command: git describe --tags
build:
cmake:
extra_variables:
# Taken from some other script
- DISABLE_WERROR=y
- ENABLE_TESTS=n
- CMAKE_EXPORT_COMPILE_COMMANDS=y
- PYBIND11_FINDPYTHON=ON
raw_environment:
# We have to pre-build some dependencies, and also want to ship our own custom Python environment
# the CMake build system has been instructed to load the dependencies via pkg-config
- PKG_CONFIG_PATH="$BUILD_DIR"/deps/lib/pkgconfig:"$BUILD_DIR"/AppDir/usr/conda/lib/pkgconfig:"$PKG_CONFIG_PATH"
# Also we want to use a newer CMake version
- PATH="$BUILD_DIR"/deps/bin:"$PATH"
script:
- |2
. AppDir/usr/conda/bin/activate
echo "PKG_CONFIG_PATH (cmake): $PKG_CONFIG_PATH"
scripts:
pre_build:
- pushd "$BUILD_DIR"
- |2
# We need the Python environment before the build already, therefore we have to run the conda
# plugin manually before the build
#wget /~https://github.com/linuxdeploy/linuxdeploy-plugin-conda/raw/master/linuxdeploy-plugin-conda.sh
wget /~https://github.com/knarfS/linuxdeploy-plugin-conda/raw/master/linuxdeploy-plugin-conda.sh
# Skip the built-in cleanup as the build needs the development files (headers, libs, ...)
export CONDA_SKIP_CLEANUP=1
export CONDA_SKIP_ADJUST_PATHS=1
chmod +x linuxdeploy-plugin-conda.sh
./linuxdeploy-plugin-conda.sh --appdir AppDir
. AppDir/usr/conda/bin/activate
- popd
- |2
# Build libserialport and libsigrok
for i in libserialport libsigrok; do
git clone --depth=1 git://sigrok.org/"$i"
pushd "$i"
./autogen.sh
# Once libserialport is built, libsigrok can be linked against it
export PKG_CONFIG_PATH="$BUILD_DIR"/deps/lib/pkgconfig:"$PKG_CONFIG_PATH"
echo "PKG_CONFIG_PATH (pre_build): $PKG_CONFIG_PATH"
./configure --prefix="$BUILD_DIR"/deps
make -j$(nprocs)
make install
popd
done
post_build:
- |2
# Cleanup conda
export CONDA_SKIP_INSTALL=1
export CONDA_SKIP_ADJUST_PATHS=0
./linuxdeploy-plugin-conda.sh --appdir AppDir
- |2
# Generate AppRun.sh scrip
cat > "$BUILD_DIR"/AppRun.sh <<\EOF
#! /bin/bash
# Load miniconda environment
. "$APPDIR"/usr/conda/etc/profile.d/conda.sh
conda activate
# Run SmuView
exec "$APPDIR"/usr/bin/smuview "$@"
EOF
- chmod +x "$BUILD_DIR"/AppRun.sh
- |2
# Set VERSION from CMake generated shell script
source cmake-build/contrib/config_version.sh
export VERSION=${SV_VERSION_STRING}
appimage:
linuxdeploy:
plugins:
- qt
extra_args: --custom-apprun "$BUILD_DIR"/AppRun.sh
raw_environment:
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$BUILD_DIR"/deps/lib:"$BUILD_DIR"/AppDir/usr/conda/lib