-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathDockerfile-pbp
More file actions
30 lines (23 loc) · 1.09 KB
/
Dockerfile-pbp
File metadata and controls
30 lines (23 loc) · 1.09 KB
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
FROM ubuntu:noble AS build
WORKDIR /phoneme
RUN apt-get update \
&& apt-get install -y build-essential zip gcc-multilib openjdk-8-jdk-headless git sed wget \
&& git clone --depth=1 https://github.com/magicus/phoneME.git .
WORKDIR /phoneme/cdc/build/linux-x86-generic
RUN wget https://repo1.maven.org/maven2/junit/junit/3.8/junit-3.8.jar \
&& sed -i 's/-march=i686/-march=i686 -m32/g' GNUmakefile \
&& sed -i -E 's/^LINK_ARCH_FLAGS.+$/LINK_ARCH_FLAGS = -m32/g' GNUmakefile \
&& make CVM_PRELOAD_LIB=false J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=gunit JUNIT_JARFILE=./junit-3.8.jar
WORKDIR /pbp
RUN mkdir -p tmp base desktop/java rmi/java \
&& unzip /phoneme/cdc/build/linux-x86-generic/btclasses.zip -d tmp \
&& unzip -o /phoneme/cdc/build/linux-x86-generic/lib/basis.jar -d tmp -x 'META-INF/*' \
&& mv tmp/java/awt desktop/java \
&& mv tmp/java/beans desktop/java \
&& mv tmp/java/rmi rmi/java \
&& mv tmp/java tmp/javax base \
&& jar cvf pbp-base.jar -C base . \
&& jar cvf pbp-desktop.jar -C desktop . \
&& jar cvf pbp-rmi.jar -C rmi .
FROM scratch AS export
COPY --from=build /pbp/pbp*.jar .