Update Makefile and Dockerfile

This commit is contained in:
Joseph C. Lehner 2024-10-01 11:29:14 +02:00
parent 11be614310
commit c5f26b85e4
2 changed files with 7 additions and 4 deletions

View file

@ -1,10 +1,9 @@
FROM ubuntu:focal
FROM ubuntu:jammy
ENV TZ=Etc/UTC
ENV TERM=xterm
ENV APPIMAGE_EXTRACT_AND_RUN=1
ARG DEBIAN_FRONTEND=noninteractive
ARG NPCAP_VERSION=1.13
RUN apt-get update
RUN apt-get install -y build-essential pkg-config git zip wget file
@ -18,7 +17,10 @@ ADD "https://api.github.com/repos/jclehner/nmrpflash/commits?per_page=1" latest_
RUN git clone https://github.com/jclehner/nmrpflash
WORKDIR /usr/src/nmrpflash
RUN wget -q -O npcap-sdk.zip https://npcap.com/dist/npcap-sdk-${NPCAP_VERSION}.zip
ARG NPCAP_SDK
RUN wget -q -O npcap-sdk.zip https://npcap.com/dist/npcap-sdk-${NPCAP_SDK}.zip
RUN unzip npcap-sdk.zip -d Npcap
ARG CACHEBUST=1

View file

@ -6,6 +6,7 @@ VERSION := $(shell if [ -d .git ] && which git 2>&1 > /dev/null; then git descri
CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(VERSION)\"
SUFFIX ?=
MACOS_SDK ?= macosx15.0
NPCAP_SDK = 1.13
ARCH := $(shell uname -m)
LINUXDEPLOY = ./linuxdeploy-$(ARCH).AppImage
TMP := $(shell mktemp -d)
@ -115,7 +116,7 @@ nmrpflash.ico: nmrpflash.svg
convert -background transparent -define icon:auto-resize=256,64,48,32,16 $< $@
build-release-with-docker:
docker build --build-arg CACHEBUST=$(shell date +%s) --progress=plain -t nmrpflash .
docker build --build-arg CACHEBUST=$(shell date +%s) --build-arg NPCAP_SDK=$(NPCAP_SDK) --progress=plain -t nmrpflash .
docker create --name dummy nmrpflash
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-linux-$(ARCH).zip .
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-win32.zip .