mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Docker cross compile - remove MIPS target platform
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
This commit is contained in:
parent
6fb3572951
commit
4f8a84e7cb
2 changed files with 4 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
||||||
# Build the docker image from the root of the project with the following command :
|
# Build the docker image from the root of the project with the following command :
|
||||||
# $ docker build -t librespot-cross -f contrib/Dockerfile .
|
# $ docker build -t librespot-cross -f contrib/Dockerfile .
|
||||||
#
|
#
|
||||||
# The resulting image can be used to build librespot for linux x86_64, armhf, armel, mipsel, aarch64
|
# The resulting image can be used to build librespot for linux x86_64, armhf, armel, aarch64
|
||||||
# $ docker run -v /tmp/librespot-build:/build librespot-cross
|
# $ docker run -v /tmp/librespot-build:/build librespot-cross
|
||||||
#
|
#
|
||||||
# The compiled binaries will be located in /tmp/librespot-build
|
# The compiled binaries will be located in /tmp/librespot-build
|
||||||
|
@ -22,11 +22,10 @@ RUN echo "deb http://archive.debian.org/debian-security stretch/updates main" >>
|
||||||
RUN dpkg --add-architecture arm64
|
RUN dpkg --add-architecture arm64
|
||||||
RUN dpkg --add-architecture armhf
|
RUN dpkg --add-architecture armhf
|
||||||
RUN dpkg --add-architecture armel
|
RUN dpkg --add-architecture armel
|
||||||
RUN dpkg --add-architecture mipsel
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-mipsel pkg-config
|
RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf pkg-config
|
||||||
RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf libasound2-dev:mipsel
|
RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf
|
||||||
RUN apt-get install -y libpulse0 libpulse0:arm64 libpulse0:armel libpulse0:armhf
|
RUN apt-get install -y libpulse0 libpulse0:arm64 libpulse0:armel libpulse0:armhf
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.73 -y
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.73 -y
|
||||||
|
@ -34,13 +33,11 @@ ENV PATH="/root/.cargo/bin/:${PATH}"
|
||||||
RUN rustup target add aarch64-unknown-linux-gnu
|
RUN rustup target add aarch64-unknown-linux-gnu
|
||||||
RUN rustup target add arm-unknown-linux-gnueabi
|
RUN rustup target add arm-unknown-linux-gnueabi
|
||||||
RUN rustup target add arm-unknown-linux-gnueabihf
|
RUN rustup target add arm-unknown-linux-gnueabihf
|
||||||
RUN rustup target add mipsel-unknown-linux-gnu
|
|
||||||
|
|
||||||
RUN mkdir /.cargo && \
|
RUN mkdir /.cargo && \
|
||||||
echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \
|
echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \
|
||||||
echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config && \
|
echo '[target.arm-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config && \
|
||||||
echo '[target.arm-unknown-linux-gnueabi]\nlinker = "arm-linux-gnueabi-gcc"' >> /.cargo/config && \
|
echo '[target.arm-unknown-linux-gnueabi]\nlinker = "arm-linux-gnueabi-gcc"' >> /.cargo/config
|
||||||
echo '[target.mipsel-unknown-linux-gnu]\nlinker = "mipsel-linux-gnu-gcc"' >> /.cargo/config
|
|
||||||
|
|
||||||
ENV CARGO_TARGET_DIR /build
|
ENV CARGO_TARGET_DIR /build
|
||||||
ENV CARGO_HOME /build/cache
|
ENV CARGO_HOME /build/cache
|
||||||
|
@ -48,7 +45,6 @@ ENV PKG_CONFIG_ALLOW_CROSS=1
|
||||||
ENV PKG_CONFIG_PATH_aarch64-unknown-linux-gnu=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
ENV PKG_CONFIG_PATH_aarch64-unknown-linux-gnu=/usr/lib/aarch64-linux-gnu/pkgconfig/
|
||||||
ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabihf=/usr/lib/arm-linux-gnueabihf/pkgconfig/
|
ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabihf=/usr/lib/arm-linux-gnueabihf/pkgconfig/
|
||||||
ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabi=/usr/lib/arm-linux-gnueabi/pkgconfig/
|
ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabi=/usr/lib/arm-linux-gnueabi/pkgconfig/
|
||||||
ENV PKG_CONFIG_PATH_mipsel-unknown-linux-gnu=/usr/lib/mipsel-linux-gnu/pkgconfig/
|
|
||||||
|
|
||||||
ADD . /src
|
ADD . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
|
@ -5,4 +5,3 @@ cargo build --release --no-default-features --features alsa-backend
|
||||||
cargo build --release --target aarch64-unknown-linux-gnu --no-default-features --features alsa-backend
|
cargo build --release --target aarch64-unknown-linux-gnu --no-default-features --features alsa-backend
|
||||||
cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend
|
cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend
|
||||||
cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features alsa-backend
|
cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features alsa-backend
|
||||||
cargo build --release --target mipsel-unknown-linux-gnu --no-default-features --features alsa-backend
|
|
||||||
|
|
Loading…
Reference in a new issue