Last active
April 17, 2025 23:56
-
-
Save MasWag/57adac122f35b53e379f63b606d7d3a7 to your computer and use it in GitHub Desktop.
Dockerfile to build LTSMin 3.1.0-beta2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stage 0: Builder | |
FROM debian:bookworm AS builder | |
# 1) Base tools & Spot repo key | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
ca-certificates wget gnupg lsb-release | |
# 2) Add Spot’s Debian repo (stable) | |
RUN wget -qO- https://www.lrde.epita.fr/repo/debian.gpg | apt-key add - && \ | |
echo "deb http://www.lrde.epita.fr/repo/debian/ stable/" >> /etc/apt/sources.list | |
# 3) Install ALL build deps + Spot | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
autoconf automake bison build-essential \ | |
doxygen flex git libpopt-dev libtool libltdl-dev liblzma-dev \ | |
libxml2-dev pkgconf python3 python3-dev xmlto zlib1g-dev \ | |
asciidoc openjdk-17-jdk ant \ | |
spot libspot-dev python3-spot \ | |
&& rm -rf /var/lib/apt/lists/* | |
# 4) Clone LTSmin (with submodules) & bootstrap autotools | |
WORKDIR /build | |
RUN git clone --branch v3.1.0-beta2 --recursive https://github.com/Meijuh/ltsmin.git | |
WORKDIR /build/ltsmin | |
RUN ./ltsminreconf | |
# 5) Update ltl2ba to avoid its link-time conflict | |
RUN cd ltl2ba && git checkout master && git pull | |
# Make some variables extern to avoid link errors. | |
RUN sed -i 's/^ltsmin_expr_t/extern ltsmin_expr_t/;s/^ltsmin_parse_env_t/extern ltsmin_parse_env_t/;' ./src/pins2lts-sym/aux/options.h | |
# 6) Configure, build & install | |
ENV PREFIX=/ltsmin-install | |
RUN ./configure --disable-dependency-tracking --prefix=$PREFIX --enable-pkgconf-static && \ | |
make -j$(nproc) && \ | |
make install | |
# 7) Package the install-tree into a tarball | |
WORKDIR $PREFIX | |
RUN tar czf /ltsmin-3.1.0-beta2-install.tar.gz . | |
# Stage 1: Minimal runtime image | |
FROM debian:bookworm-slim | |
COPY --from=builder /ltsmin-3.1.0-beta2-install.tar.gz / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The resulting tarball is available from https://www.fos.kuis.kyoto-u.ac.jp/~mwaga/contents/misc/ltsmin-3.1.0-beta2-install.tar.gz