-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.platform
92 lines (70 loc) · 2.17 KB
/
Dockerfile.platform
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# ARG needs repeating for every FROM statement
ARG SFOS_VERSION=latest
ARG SFOS_ARCH=armv7hl
FROM coderus/sailfishos-platform-sdk-$SFOS_ARCH:$SFOS_VERSION as coderus_base
ARG SFOS_VERSION=latest
ARG SFOS_ARCH=armv7hl
ARG RUST_TARGET=armv7-unknown-linux-gnueabihf
RUN sdk-manage develpkg install SailfishOS-$SFOS_VERSION-$SFOS_ARCH \
sqlcipher-devel \
qtmozembed-qt5-devel \
xulrunner-qt5 \
sqlite-devel \
openssl-libs \
openssl-devel \
dbus-devel \
libnemotransferengine-qt5-devel \
tcl
RUN sudo rm -rf /srv/mer/targets/SailfishOS-$SFOS_VERSION-$SFOS_ARCH/var/cache/zypp/*
FROM debian:latest
ARG SFOS_VERSION=latest
ARG SFOS_ARCH=armv7hl
ARG GCC_TARGET=arm-linux-gnueabihf
ARG RUST_TARGET=armv7-unknown-linux-gnueabihf
# Install cross compilers
RUN apt-get update
RUN apt-get install -y \
gcc-$GCC_TARGET g++-$GCC_TARGET binutils-$GCC_TARGET \
curl \
qttools5-dev-tools qtchooser qtbase5-dev-tools qttools5-dev-tools \
desktop-file-utils \
protobuf-compiler \
rpm \
curl \
coreutils
RUN apt-get install -y \
build-essential \
pkg-config \
tcl
RUN apt-get install -y \
libsqlcipher-dev \
qtbase5-dev \
qt5-qmake \
qtdeclarative5-dev \
qtbase5-dev-tools qttools5-dev-tools
# Install MER SDK
COPY --from=coderus_base /srv/mer /srv/mer
# Install Rust
ENV RUSTUP_HOME /usr/local/rustup
ENV CARGO_HOME /usr/local/cargo
ENV PATH="$CARGO_HOME/bin:$PATH"
RUN curl --proto '=https' --tlsv1.2 -sSf -JO "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"
RUN chmod +x rustup-init
RUN ./rustup-init -y --no-modify-path --default-toolchain stable
RUN rustup --version
RUN cargo --version
RUN rustc --version
# Install nightly and beta
RUN rustup toolchain install nightly
RUN rustup toolchain install beta
# Install cargo-rpm
RUN cargo install --git https://github.com/RustRPM/cargo-rpm --branch develop
# Add cargo targets
RUN rustup target add \
$RUST_TARGET
# Additional C dependencies for Whisperfish
RUN apt-get install -y cmake git
RUN mkdir /root/.cargo
COPY platform-cross-cargo.toml /root/.cargo/config
# Set environment
ENV MERSDK /srv/mer