Skip to content

Commit

Permalink
Update Makefile and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Oct 1, 2024
1 parent 11be614 commit c5f26b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 .
Expand Down

0 comments on commit c5f26b8

Please sign in to comment.