]> git.proxmox.com Git - shim-signed.git/commitdiff
Instead of hard-coding amd64 (x64), use a per-arch variable
authorSteve McIntyre <steve@einval.com>
Fri, 19 Apr 2019 14:19:43 +0000 (15:19 +0100)
committerSteve McIntyre <steve@einval.com>
Fri, 19 Apr 2019 14:19:43 +0000 (15:19 +0100)
Makefile
debian/rules

index cfc0b2fec645686f7e6d2a7ff6d99c7a88703816..06443ef099f0556040ed71bcfdb398ec7cb9bea6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,12 @@ all:
 check:
        mkdir -p build
        # Verifying that the image is signed with the correct key.
-       sbverify --cert MicCorUEFCA2011_2011-06-27.crt shimx64.efi.signed
+       sbverify --cert MicCorUEFCA2011_2011-06-27.crt shim$(EFI_ARCH).efi.signed
        # Verifying that we have the correct binary.
-       sbattach --detach build/detached-sig shimx64.efi.signed 
-       cp /usr/lib/shim/shimx64.efi build/shimx64.efi.signed
-       sbattach --attach build/detached-sig build/shimx64.efi.signed
-       cmp shimx64.efi.signed build/shimx64.efi.signed
-       cp /usr/lib/shim/fbx64.efi.signed build
-       cp /usr/lib/shim/mmx64.efi.signed build
+       sbattach --detach build/detached-sig shim$(EFI_ARCH).efi.signed 
+       cp /usr/lib/shim/shim$(EFI_ARCH).efi build/shim$(EFI_ARCH).efi.signed
+       sbattach --attach build/detached-sig build/shim$(EFI_ARCH).efi.signed
+       cmp shim$(EFI_ARCH).efi.signed build/shim$(EFI_ARCH).efi.signed
 
 clean:
        rm -rf build
index 60c3577b28e9a2a721d6cd99b3c2c22f277819ed..9c7880dea5b9f7c71bd9416b4c29af4ce9d00030 100755 (executable)
@@ -3,14 +3,23 @@
 VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
 SHIM_VERSION := $(shell dpkg-query -f '$${Version}\n' -W shim)
 
+include /usr/share/dpkg/architecture.mk
+
+ifeq ($(DEB_HOST_ARCH),amd64)
+export EFI_ARCH := x64
+endif
+ifeq ($(DEB_HOST_ARCH),arm64)
+export EFI_ARCH := aa64
+endif
+ifeq ($(DEB_HOST_ARCH),i386)
+export EFI_ARCH := ia32
+endif
+
 %:
        dh $@
 
 docdir := debian/shim-signed/usr/share/doc/shim-signed
 
-override_dh_install:
-       dh_install
-
 override_dh_installchangelogs:
        dh_installchangelogs
        # Quieten lintian, which otherwise gets confused by our odd version