File: Dockerfile.hamlib

package info (click to toggle)
js8call 2.5.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,720 kB
  • sloc: cpp: 562,655; sh: 898; python: 132; ansic: 102; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 899 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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