Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 1 | FROM anibali/djgpp:6.1.0 |
| 2 | |
| 3 | USER root |
| 4 | RUN \ |
| 5 | userdel appuser && \ |
| 6 | useradd -p locked -m mani && \ |
| 7 | zypper -q install -y tar make git ccache |
| 8 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 9 | RUN mkdir -p -m 1777 /ccache |
| 10 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 11 | ENV GIT_SSL_NO_VERIFY=1 |
| 12 | USER mani |
| 13 | |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 14 | ARG ORIGIN=https://review.sourcearcade.org/flashprog.git |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 15 | RUN cd && \ |
| 16 | mkdir .ccache && chown mani:users .ccache && \ |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 17 | git clone ${ORIGIN} flashprog && \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 18 | git clone https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git && \ |
| 19 | cd pciutils && \ |
| 20 | git checkout v3.5.6 && \ |
Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 21 | curl --insecure https://flashprog.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 22 | 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 Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame^] | 28 | curl --insecure https://flashprog.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \ |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 29 | cd libgetopt && \ |
| 30 | make && cp libgetopt.a ../lib/ && cp getopt.h ../include/ |
| 31 | |
Nico Huber | fb433ba | 2023-03-04 19:09:47 +0000 | [diff] [blame] | 32 | ARG IDENT=mani |
| 33 | ARG CCACHE_MAX=32M |
| 34 | RUN \ |
| 35 | ccache --set-config cache_dir=/ccache/${IDENT} && \ |
| 36 | ccache --set-config max_size=${CCACHE_MAX} |
| 37 | |
Nico Huber | c0b52db | 2022-12-15 12:42:32 +0000 | [diff] [blame] | 38 | ENV DEVSHELL /bin/bash |
| 39 | COPY mani-wrapper.sh /home/mani/ |
| 40 | ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"] |