Add slcl 0.2.1
This commit is contained in:
parent
9dd2450bff
commit
643d633286
|
@ -0,0 +1,25 @@
|
|||
From 89a36e6acd724961adafc5b194873748c199ed3a Mon Sep 17 00:00:00 2001
|
||||
From: Xavier Del Campo Romero <xavi.dcr@tutanota.com>
|
||||
Date: Thu, 26 Oct 2023 10:39:36 +0200
|
||||
Subject: [PATCH] configure: Add -static to default_LDFLAGS
|
||||
|
||||
---
|
||||
configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index afe9057..3c66dec 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7,7 +7,7 @@ prefix=$default_prefix
|
||||
default_CC='c99'
|
||||
# FILE_OFFSET_BITS=64 is required for large file support on 32-bit platforms.
|
||||
default_CFLAGS='-O1 -g -D_FILE_OFFSET_BITS=64 -Wall -MD'
|
||||
-default_LDFLAGS="-lcjson -lssl -lm -lcrypto"
|
||||
+default_LDFLAGS="-lcjson -lssl -lm -lcrypto -static"
|
||||
|
||||
CC=${CC:-$default_CC}
|
||||
CFLAGS=${CFLAGS:-"$default_CFLAGS $default_NPCFLAGS"}
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
FROM alpine as base
|
||||
RUN apk update && apk add \
|
||||
git \
|
||||
make \
|
||||
gcc \
|
||||
pkgconf \
|
||||
musl-dev
|
||||
COPY --from=libcjson:1.7.16 /opt/spm/cjson-1.7.16/ /usr/local/
|
||||
COPY --from=libopenssl:3.1.1-minimal /opt/spm/openssl-3.1.1/ /usr/local/
|
||||
ARG PREFIX=/opt/spm/slcl-0.2.1
|
||||
RUN git clone --depth 1 -b v0.2.1 --recursive \
|
||||
https://gitea.privatedns.org/xavi/slcl
|
||||
WORKDIR /slcl
|
||||
RUN mkdir patches
|
||||
COPY 0001-configure-Add-static-to-default_LDFLAGS.patch patches/
|
||||
RUN git apply patches/0001-configure-Add-static-to-default_LDFLAGS.patch
|
||||
RUN ./configure --prefix=$PREFIX
|
||||
RUN make -j$(nproc --all)
|
||||
RUN make install
|
||||
WORKDIR $PREFIX/bin
|
||||
RUN strip slcl
|
||||
FROM scratch
|
||||
COPY --from=base /opt/spm/slcl-0.2.1/bin/slcl /opt/spm/slcl-0.2.1/bin/slcl
|
Loading…
Reference in New Issue