diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 945ac53..2e04f23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install deps run: | @@ -42,12 +42,13 @@ jobs: test-package: strategy: + fail-fast: false matrix: - os: ["buster", "bullseye", "testing", "unstable"] + os: ["buster", "bullseye", "stable", "testing", "unstable"] cpu: ["i386", "amd64", "armhf", "aarch64"] runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -67,7 +68,7 @@ jobs: head debian/changelog - name: Build Debian package - uses: dawidd6/action-debian-package@v1 + uses: dawidd6/action-debian-package@v1.6.0 with: source_directory: . artifacts_directory: output @@ -75,7 +76,7 @@ jobs: cpu_architecture: ${{ matrix.cpu }} - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: output name: debs-${{ matrix.os }}-${{ matrix.cpu }} diff --git a/Makefile b/Makefile index 6acd906..c87dfff 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ CC = gcc RM = rm -f AR = ar RANLIB = ranlib +PKG_CONFIG ?= pkg-config OWNERSHIP ?= --owner root --group root @@ -46,25 +47,25 @@ CFLAGS ?= -O0 -g -Wall -Wextra -Werror CFLAGS += -std=c99 ifeq ($(TARGET),linux) - $(shell which pkg-config > /dev/null) + $(shell which $(PKG_CONFIG) > /dev/null) ifeq ($(.SHELLSTATUS), 1) $(error "can't find pkg-config") endif - $(shell pkg-config --exists libpci > /dev/null) + $(shell $(PKG_CONFIG) --exists libpci > /dev/null) ifeq ($(.SHELLSTATUS), 1) $(error "pkg-config can't find libpci") endif - $(shell pkg-config --exists libmd > /dev/null) + $(shell $(PKG_CONFIG) --exists libmd > /dev/null) ifeq ($(.SHELLSTATUS), 1) $(error "pkg-config can't find libmd") endif - LIBPCI_CFLAGS := $(shell pkg-config --cflags libpci) - LIBPCI_LDFLAGS := $(shell pkg-config --libs libpci) - LIBMD_CFLAGS := $(shell pkg-config --cflags libmd) - LIBMD_LDFLAGS := $(shell pkg-config --libs libmd) + LIBPCI_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpci) + LIBPCI_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpci) + LIBMD_CFLAGS := $(shell $(PKG_CONFIG) --cflags libmd) + LIBMD_LDFLAGS := $(shell $(PKG_CONFIG) --libs libmd) BIN = mesaflash LDFLAGS = -lm $(LIBPCI_LDFLAGS) $(LIBMD_LDFLAGS) CFLAGS += -D_GNU_SOURCE $(LIBPCI_CFLAGS) $(LIBMD_CFLAGS) -D_FILE_OFFSET_BITS=64 diff --git a/debian/rules b/debian/rules index 4acc9f1..2f70542 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,13 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk +DPKG_EXPORT_BUILDTOOLS=1 +include /usr/share/dpkg/buildtools.mk include /usr/share/dpkg/pkg-info.mk +# Makefile uses uname, which is wrong for cross builds. +MESAFLASH_IO:=$(if $(wildcard /usr/include/$(DEB_HOST_MULTIARCH)/asm/io.h),1,0) +export MESAFLASH_IO + %: dh $@