22# Build the docker image from the root of the project with the following command :
33# $ docker build -t librespot-cross -f contrib/Dockerfile .
44#
5- # The resulting image can be used to build librespot for linux x86_64, armhf, armel, mipsel, aarch64
5+ # The resulting image can be used to build librespot for linux x86_64, armhf, armel, aarch64
66# $ docker run -v /tmp/librespot-build:/build librespot-cross
77#
88# The compiled binaries will be located in /tmp/librespot-build
@@ -22,33 +22,29 @@ RUN echo "deb http://archive.debian.org/debian-security stretch/updates main" >>
2222RUN dpkg --add-architecture arm64
2323RUN dpkg --add-architecture armhf
2424RUN dpkg --add-architecture armel
25- RUN dpkg --add-architecture mipsel
2625RUN apt-get update
2726
28- RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-mipsel pkg-config
29- RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf libasound2-dev:mipsel
27+ RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf pkg-config
28+ RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf
3029RUN apt-get install -y libpulse0 libpulse0:arm64 libpulse0:armel libpulse0:armhf
3130
3231RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.73 -y
3332ENV PATH="/root/.cargo/bin/:${PATH}"
3433RUN rustup target add aarch64-unknown-linux-gnu
3534RUN rustup target add arm-unknown-linux-gnueabi
3635RUN rustup target add arm-unknown-linux-gnueabihf
37- RUN rustup target add mipsel-unknown-linux-gnu
3836
3937RUN mkdir /.cargo && \
4038 echo '[target.aarch64-unknown-linux-gnu]\n linker = "aarch64-linux-gnu-gcc"' > /.cargo/config && \
4139 echo '[target.arm-unknown-linux-gnueabihf]\n linker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config && \
42- echo '[target.arm-unknown-linux-gnueabi]\n linker = "arm-linux-gnueabi-gcc"' >> /.cargo/config && \
43- echo '[target.mipsel-unknown-linux-gnu]\n linker = "mipsel-linux-gnu-gcc"' >> /.cargo/config
40+ echo '[target.arm-unknown-linux-gnueabi]\n linker = "arm-linux-gnueabi-gcc"' >> /.cargo/config
4441
4542ENV CARGO_TARGET_DIR /build
4643ENV CARGO_HOME /build/cache
4744ENV PKG_CONFIG_ALLOW_CROSS=1
4845ENV PKG_CONFIG_PATH_aarch64-unknown-linux-gnu=/usr/lib/aarch64-linux-gnu/pkgconfig/
4946ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabihf=/usr/lib/arm-linux-gnueabihf/pkgconfig/
5047ENV PKG_CONFIG_PATH_arm-unknown-linux-gnueabi=/usr/lib/arm-linux-gnueabi/pkgconfig/
51- ENV PKG_CONFIG_PATH_mipsel-unknown-linux-gnu=/usr/lib/mipsel-linux-gnu/pkgconfig/
5248
5349ADD . /src
5450WORKDIR /src
0 commit comments