mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
31 lines
No EOL
899 B
Text
31 lines
No EOL
899 B
Text
# Hamlib builder image - built separately and cached
|
|
# This rarely changes, so it's perfect for caching
|
|
|
|
FROM js8call-base:ubuntu-24.04
|
|
|
|
# Build argument for Hamlib version/commit
|
|
ARG HAMLIB_VERSION=master
|
|
|
|
# Clone and build Hamlib
|
|
WORKDIR /hamlib-prefix
|
|
RUN git clone https://github.com/Hamlib/Hamlib.git src && \
|
|
cd src && \
|
|
git checkout ${HAMLIB_VERSION}
|
|
|
|
WORKDIR /hamlib-prefix/src
|
|
RUN ./bootstrap
|
|
|
|
WORKDIR /hamlib-prefix/build
|
|
RUN ../src/configure --prefix=/hamlib-prefix \
|
|
--disable-shared --enable-static \
|
|
--without-cxx-binding --disable-winradio \
|
|
CFLAGS="-g -O2 -fdata-sections -ffunction-sections" \
|
|
LDFLAGS="-Wl,--gc-sections" \
|
|
&& make -j$(nproc) \
|
|
&& make install-strip
|
|
|
|
# Clean up source to reduce image size
|
|
RUN rm -rf /hamlib-prefix/src /hamlib-prefix/build
|
|
|
|
# This image serves as a base for the main build
|
|
# The compiled Hamlib is in /hamlib-prefix |