|
8 | 8 | # The compiled binaries will be located in /tmp/librespot-build |
9 | 9 | # |
10 | 10 | # If only one architecture is desired, cargo can be invoked directly with the appropriate options : |
11 | | -# $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --no-default-features --features "alsa-backend" |
| 11 | +# $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --no-default-features --features alsa-backend |
12 | 12 | # $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend |
13 | 13 | # $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features alsa-backend |
14 | 14 | # $ docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target aarch64-unknown-linux-gnu --no-default-features --features alsa-backend |
15 | 15 |
|
16 | 16 | FROM debian:bookworm |
17 | 17 |
|
18 | | -RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list |
19 | | -RUN echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list |
20 | | -RUN echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list |
| 18 | +RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list && \ |
| 19 | + echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list && \ |
| 20 | + echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list |
21 | 21 |
|
22 | | -RUN dpkg --add-architecture arm64 |
23 | | -RUN dpkg --add-architecture armhf |
24 | | -RUN dpkg --add-architecture armel |
25 | | -RUN apt-get update |
| 22 | +RUN dpkg --add-architecture arm64 && \ |
| 23 | + dpkg --add-architecture armhf && \ |
| 24 | + dpkg --add-architecture armel && \ |
| 25 | + apt-get update && \ |
| 26 | + apt-get install -y \ |
| 27 | + build-essential \ |
| 28 | + cmake \ |
| 29 | + crossbuild-essential-arm64 \ |
| 30 | + crossbuild-essential-armel \ |
| 31 | + crossbuild-essential-armhf \ |
| 32 | + curl \ |
| 33 | + libasound2-dev \ |
| 34 | + libasound2-dev:arm64 \ |
| 35 | + libasound2-dev:armel \ |
| 36 | + libasound2-dev:armhf \ |
| 37 | + libclang-dev \ |
| 38 | + libpulse0 \ |
| 39 | + libpulse0:arm64 \ |
| 40 | + libpulse0:armel \ |
| 41 | + libpulse0:armhf \ |
| 42 | + pkg-config |
26 | 43 |
|
27 | | -RUN apt-get install -y cmake libclang-dev |
28 | | -RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf pkg-config |
29 | | -RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf |
30 | | -RUN apt-get install -y libpulse0 libpulse0:arm64 libpulse0:armel libpulse0:armhf |
31 | | - |
32 | | -RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81 -y |
33 | 44 | ENV PATH="/root/.cargo/bin/:${PATH}" |
34 | | -RUN rustup target add aarch64-unknown-linux-gnu |
35 | | -RUN rustup target add arm-unknown-linux-gnueabi |
36 | | -RUN rustup target add arm-unknown-linux-gnueabihf |
37 | | -RUN cargo install bindgen-cli |
38 | | - |
39 | | -RUN mkdir /.cargo && \ |
40 | | - echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \ |
41 | | - echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config && \ |
42 | | - echo '[target.arm-unknown-linux-gnueabi]\nlinker = "arm-linux-gnueabi-gcc"' >> /.cargo/config |
| 45 | +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.81 -y && \ |
| 46 | + rustup target add aarch64-unknown-linux-gnu && \ |
| 47 | + rustup target add arm-unknown-linux-gnueabi && \ |
| 48 | + rustup target add arm-unknown-linux-gnueabihf && \ |
| 49 | + cargo install bindgen-cli && \ |
| 50 | + mkdir /.cargo && \ |
| 51 | + echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \ |
| 52 | + echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config && \ |
| 53 | + echo '[target.arm-unknown-linux-gnueabi]\nlinker = "arm-linux-gnueabi-gcc"' >> /.cargo/config |
43 | 54 |
|
44 | 55 | ENV CARGO_TARGET_DIR=/build |
45 | 56 | ENV CARGO_HOME=/build/cache |
|
0 commit comments