4 name: com.github.knarfs.smuview
5 #version_command: git describe --tags
10 # Taken from some other script
13 - CMAKE_EXPORT_COMPILE_COMMANDS=y
14 - PYBIND11_FINDPYTHON=ON
16 # We have to pre-build some dependencies, and also want to ship our own custom Python environment
17 # the CMake build system has been instructed to load the dependencies via pkg-config
18 - PKG_CONFIG_PATH="$BUILD_DIR"/deps/lib/pkgconfig:"$BUILD_DIR"/AppDir/usr/conda/lib/pkgconfig:"$PKG_CONFIG_PATH"
19 # Also we want to use a newer CMake version
20 - PATH="$BUILD_DIR"/deps/bin:"$PATH"
23 . AppDir/usr/conda/bin/activate
24 echo "PKG_CONFIG_PATH (cmake): $PKG_CONFIG_PATH"
30 # We need the Python environment before the build already, therefore we have to run the conda
31 # plugin manually before the build
32 #wget https://github.com/linuxdeploy/linuxdeploy-plugin-conda/raw/master/linuxdeploy-plugin-conda.sh
33 wget https://github.com/knarfS/linuxdeploy-plugin-conda/raw/master/linuxdeploy-plugin-conda.sh
34 # Skip the built-in cleanup as the build needs the development files (headers, libs, ...)
35 export CONDA_SKIP_CLEANUP=1
36 export CONDA_SKIP_ADJUST_PATHS=1
37 chmod +x linuxdeploy-plugin-conda.sh
38 ./linuxdeploy-plugin-conda.sh --appdir AppDir
39 . AppDir/usr/conda/bin/activate
42 # Build libserialport and libsigrok
43 for i in libserialport libsigrok; do
44 git clone --depth=1 git://sigrok.org/"$i"
47 # Once libserialport is built, libsigrok can be linked against it
48 export PKG_CONFIG_PATH="$BUILD_DIR"/deps/lib/pkgconfig:"$PKG_CONFIG_PATH"
49 echo "PKG_CONFIG_PATH (pre_build): $PKG_CONFIG_PATH"
50 ./configure --prefix="$BUILD_DIR"/deps
59 export CONDA_SKIP_INSTALL=1
60 export CONDA_SKIP_ADJUST_PATHS=0
61 ./linuxdeploy-plugin-conda.sh --appdir AppDir
63 # Generate AppRun.sh scrip
64 cat > "$BUILD_DIR"/AppRun.sh <<\EOF
67 # Load miniconda environment
68 . "$APPDIR"/usr/conda/etc/profile.d/conda.sh
72 exec "$APPDIR"/usr/bin/smuview "$@"
74 - chmod +x "$BUILD_DIR"/AppRun.sh
76 # Set VERSION from CMake generated shell script
77 source cmake-build/contrib/config_version.sh
78 export VERSION=${SV_VERSION_STRING}
84 extra_args: --custom-apprun "$BUILD_DIR"/AppRun.sh
86 - LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$BUILD_DIR"/deps/lib:"$BUILD_DIR"/AppDir/usr/conda/lib