From c5f26b85e451260836f88f327122c57a89762925 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Tue, 1 Oct 2024 11:29:14 +0200 Subject: [PATCH] Update Makefile and Dockerfile --- Dockerfile | 8 +++++--- Makefile | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d63af4e..7ac46a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Makefile b/Makefile index 97a915e..fc04195 100644 --- a/Makefile +++ b/Makefile @@ -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 .