1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-22 15:38:02 +02:00
audacity/linux/packages/build_package.sh
Dmitry Vedenko cf328b9d87 Add a framework to generate offline dependencies
`prepare_offline_dependencies.sh` will generate a tarball containing:

* Files required for PIP to install Conan
* Conan download cache

The resulting tarball content depends on CMake flags passed down
to the script.

`build_package.sh` demonstrates how to use the offline dependecies
to build Audacity. The script requires the exact CMake options that were
provided to `prepare_offline_dependencies.sh`

`build_packages.sh` allows validating the build process for different
Linux distros. It uses Docker to:

* Generate the dependencies tarball.
* Execute an offline build using `build_package.sh`.
* Generate distro specific packages, offline as well.
2021-08-02 19:52:15 +03:00

24 lines
608 B
Bash
Executable File

#!/usr/bin/env bash
set -euxo pipefail
if [[ -d "audacity-offline-dependencies" ]]; then
depsDir=$(readlink -f ./audacity-offline-dependencies)
python3 -m venv conan_env
source conan_env/bin/activate
pip3 install --no-index --find-links "$depsDir/pip_cache" conan
export CONAN_USER_HOME="$depsDir/conan_home"
mkdir -p $CONAN_USER_HOME
conan config home
conan config init
conan config set storage.download_cache="$CONAN_USER_HOME/download_cache"
fi
cmake -S audacity -B build $@
cmake --build build -- -j`nproc`
tar -czf audacity-linux_x86_64.tar.gz -C build/bin .