summaryrefslogtreecommitdiff
path: root/slcl/0.4.2/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'slcl/0.4.2/Dockerfile')
-rw-r--r--slcl/0.4.2/Dockerfile34
1 files changed, 34 insertions, 0 deletions
diff --git a/slcl/0.4.2/Dockerfile b/slcl/0.4.2/Dockerfile
new file mode 100644
index 0000000..e9fab47
--- /dev/null
+++ b/slcl/0.4.2/Dockerfile
@@ -0,0 +1,34 @@
+FROM alpine as base
+RUN apk update && apk add \
+ git \
+ cmake \
+ make \
+ gcc \
+ pkgconf \
+ musl-dev
+COPY --from=zlib:1.3.1 /opt/spm/zlib-1.3.1/ /usr/local/
+COPY --from=libcjson:1.7.19 /opt/spm/cjson-1.7.19/ /usr/local/
+COPY --from=libsodium:1.0.21 /opt/spm/libsodium-1.0.21/ /usr/local/
+COPY --from=libjpeg:10 /opt/spm/libjpeg-10/ /usr/local/
+COPY --from=libpng:1.6.54 /opt/spm/libpng-1.6.54/ /usr/local/
+COPY --from=libimagemagick:6.9.13-38-jpeg-png /opt/spm/imagemagick-6.9.13-38-jpeg-png /usr/local/
+ARG PREFIX=/opt/spm/slcl-0.4.2
+RUN git clone --depth 1 -b v0.4.2 --recursive \
+ https://gitea.privatedns.org/xavi/slcl
+WORKDIR /slcl/patches
+COPY 0001-thumbnail-CMakeLists.txt-Link-ImageMagick-dependenci.patch .
+WORKDIR /slcl
+RUN git apply patches/0001-thumbnail-CMakeLists.txt-Link-ImageMagick-dependenci.patch
+RUN LDFLAGS='-static -Wl,--gc-sections' cmake -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DTHUMBNAIL=ON \
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
+ -DCMAKE_INSTALL_PREFIX=$PREFIX
+RUN cmake --build build -j$(nproc)
+RUN cmake --install build
+WORKDIR $PREFIX/bin
+RUN strip slcl usergen thumbnail
+FROM scratch
+COPY --from=base /opt/spm/slcl-0.4.2/bin/slcl /opt/spm/slcl-0.4.2/bin/slcl
+COPY --from=base /opt/spm/slcl-0.4.2/bin/usergen /opt/spm/slcl-0.4.2/bin/usergen
+COPY --from=base /opt/spm/slcl-0.4.2/bin/thumbnail /opt/spm/slcl-0.4.2/bin/thumbnail