Merge branch 'master' of github.com:Hamlib/Hamlib

pull/1640/head
Michael Black W9MDB 2024-12-21 14:59:06 -06:00
commit 3329311274
4 zmienionych plików z 89 dodań i 26 usunięć

Wyświetl plik

@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail,
dnl however, the use of '~' should be fine as apt (others?) will treat dnl however, the use of '~' should be fine as apt (others?) will treat
dnl it as an earlier version than the actual release. TNX KA6MAL dnl it as an earlier version than the actual release. TNX KA6MAL
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
AC_INIT([Hamlib],[4.6~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org]) AC_INIT([Hamlib],[4.7~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org])
#AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_INIT([PRODUCT_NAME], [Hamlib])
#AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE])

Wyświetl plik

@ -1,21 +1,26 @@
# Idea from https://github.com/ok2cqr/cqrlog # Base Image
FROM ubuntu:latest AS hamlib-base-image
FROM ubuntu:latest ENV DEBIAN_FRONTEND="noninteractive" TZ="Etc/UTC"
RUN apt-get update && apt-get -y upgrade RUN apt-get update \
&& apt-get install -y vim git build-essential automake libtool python-is-python3 \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" # Builder Image
RUN apt-get install -y git build-essential automake libtool FROM hamlib-base-image AS hamlib-builder
RUN mkdir -p /usr/local/hamlib-alpha /home/hamlib/build COPY . /wip
# Mount point for the git repository: WORKDIR /wip
VOLUME ["/home/hamlib/build"]
# Mount point for the result of the build: RUN ./bootstrap && ./configure --prefix=/usr/local \
VOLUME ["/usr/local/hamlib-alpha"] && make clean && make -j${nproc} && make install
WORKDIR /home/hamlib/build # Runtime Image
FROM ubuntu:latest AS hamlib-runtime
ENTRYPOINT rm -rf build && mkdir -p build && cd build && ../bootstrap && ../configure --prefix=/usr/local/hamlib-alpha && make clean && make && make install COPY --from=hamlib-builder /usr/local /usr/local
ENV LD_LIBRARY_PATH="/usr/local/lib"

Wyświetl plik

@ -0,0 +1,71 @@
# Build the hamlib-runtime from the repository root
```
docker buildx build \
--platform linux/amd64,linux/arm64 \
--target hamlib-runtime \
-t hamlib-runtime \
-f docker-build/Dockerfile \
.
```
# Interactively, develop with the hamlib-base-image
## Support the linux/amd64 and linux/arm64 platforms
```
docker buildx build \
--platform linux/amd64,linux/arm64 \
--target hamlib-base-image \
-t hamlib-base-image \
-f docker-build/Dockerfile \
.
```
## Develop on the linux/amd64 hamlib-base-image
```
docker run \
-it \
--rm \
--platform linux/amd64 \
-v $(pwd):/wip \
-w /wip \
-u $(id -u):$(id -g) \
hamlib-base-image bash
```
...or the linux/arm64 hamlib-base-image
```
docker run \
-it \
--rm \
--platform linux/arm64 \
-v $(pwd):/wip \
-w /wip \
-u $(id -u):$(id -g) \
hamlib-base-image bash
```
# Run the linux/amd64 hamlib-runtime
```
docker run \
-it \
--rm \
--platform linux/amd64 \
hamlib-runtime bash
```
...or the linux/arm64 hamlib-runtime
```
docker run \
-it \
--rm \
--platform linux/arm64 \
hamlib-runtime bash
```

Wyświetl plik

@ -1,13 +0,0 @@
This is all about building hamlib inside docker container - so that you do not need to install dependencies on your local machine.
1. Build docker container
(cd docker-build && docker build --no-cache -t this.registry.is.invalid/hamlib-build .)
2. Build hamlib
docker run -ti -u root -v $(pwd):/home/hamlib/build -v /usr/local/hamlib-alpha:/usr/local/hamlib-alpha this.registry.is.invalid/hamlib-build
3. Execute hamlib
/usr/local/hamlib-alpha/bin/rigctl <your options here>