blob: 754779815f47afd7d322a39b748ae1bb0de0763a [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001FROM anibali/djgpp:6.1.0
2
3USER root
4RUN \
5 userdel appuser && \
6 useradd -p locked -m mani && \
7 zypper -q install -y tar make git ccache
8
Nico Huberfb433ba2023-03-04 19:09:47 +00009RUN mkdir -p -m 1777 /ccache
10
Nico Huberc0b52db2022-12-15 12:42:32 +000011ENV GIT_SSL_NO_VERIFY=1
12USER mani
13
Nico Huberc3b02dc2023-08-12 01:13:45 +020014ARG ORIGIN=https://review.sourcearcade.org/flashprog.git
Nico Huberc0b52db2022-12-15 12:42:32 +000015RUN cd && \
16 mkdir .ccache && chown mani:users .ccache && \
Nico Huberc3b02dc2023-08-12 01:13:45 +020017 git clone ${ORIGIN} flashprog && \
Nico Huberc0b52db2022-12-15 12:42:32 +000018 git clone https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git && \
19 cd pciutils && \
20 git checkout v3.5.6 && \
Nico Huberc3b02dc2023-08-12 01:13:45 +020021 curl --insecure https://flashprog.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \
Nico Huberc0b52db2022-12-15 12:42:32 +000022 make ZLIB=no DNS=no HOST=i386-djgpp-djgpp \
23 CROSS_COMPILE=i586-pc-msdosdjgpp- \
24 PREFIX=/ DESTDIR=$PWD/../ \
25 STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" \
26 install install-lib && \
27 cd ../ && \
Nico Huberc3b02dc2023-08-12 01:13:45 +020028 curl --insecure https://flashprog.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \
Nico Huberc0b52db2022-12-15 12:42:32 +000029 cd libgetopt && \
30 make && cp libgetopt.a ../lib/ && cp getopt.h ../include/
31
Nico Huberfb433ba2023-03-04 19:09:47 +000032ARG IDENT=mani
33ARG CCACHE_MAX=32M
34RUN \
35 ccache --set-config cache_dir=/ccache/${IDENT} && \
36 ccache --set-config max_size=${CCACHE_MAX}
37
Nico Huberc0b52db2022-12-15 12:42:32 +000038ENV DEVSHELL /bin/bash
39COPY mani-wrapper.sh /home/mani/
40ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]