File: prepare_offline_dependencies.sh

package info (click to toggle)
audacity 3.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 125,252 kB
  • sloc: cpp: 358,238; ansic: 75,458; lisp: 7,761; sh: 3,410; python: 1,503; xml: 1,385; perl: 854; makefile: 122
file content (63 lines) | stat: -rwxr-xr-x 1,353 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash

# Usage prepare_offline_environment.sh cmake-options...

set -euxo pipefail

packageName="audacity-dependencies-3.2.0"
scriptLocation=$(dirname "$(readlink -f "$0")")
audacityLocation=$(readlink -f "$scriptLocation/../..")
resultsLocation=$(pwd)
packageLocation="$resultsLocation/$packageName"

echo "Audacity location: $audacityLocation"
echo "Result location: $resultsLocation"

mkdir -p $packageLocation

cd $packageLocation

# Create pip download cache containing all the
# packages requiredf to istall Conan

mkdir -p pip_cache

pushd pip_cache

    pip3 download conan

popd

# Cache all Conan dependencies

mkdir -p temp

pushd temp
    python3 -m venv conan_env

    source conan_env/bin/activate
    pip3 install --no-index --find-links "$packageLocation/pip_cache" conan

    export CONAN_USER_HOME="$packageLocation/conan_home"
    mkdir -p $CONAN_USER_HOME

    conan config home
    conan config init
    conan config set storage.download_cache="$CONAN_USER_HOME/download_cache"
    conan profile update settings.compiler.libcxx=libstdc++11 default

    # Configure Audacity so we can collect the required
    # packages.

    cmake ${@} $audacityLocation

    conan remove "*" --src --builds --packages --force
popd

rm -R temp

cd $resultsLocation

tar -czf "$packageName.tar.gz" $packageName

rm -R $packageLocation