]> git.proxmox.com Git - efi-boot-shim.git/blobdiff - debian/rules
Build using gcc-7
[efi-boot-shim.git] / debian / rules
index 06c7b422cbb87e3ffb258da980ef256b5fd148b3..0f125340f64cf4fced6a88420e9e231dc55e2fb9 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 # Other vendors, add your certs here.  No sense in using
 # dpkg-vendor --derives-from, because only Canonical-generated binaries will
 # be signed with this key; so if you are building your own shim binary you
@@ -7,12 +9,13 @@
 ifeq ($(shell dpkg-vendor --is ubuntu && echo yes),yes)
        cert=debian/canonical-uefi-ca.der
        distributor=ubuntu
+COMMON_OPTIONS ?= ENABLE_SHIM_CERT=1 ENABLE_SBSIGN=1
 else
        cert=debian/debian-uefi-ca.der
        distributor=debian
 endif
 
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+include /usr/share/dpkg/architecture.mk
 
 ifeq ($(DEB_HOST_ARCH),amd64)
 export EFI_ARCH := x64
@@ -24,16 +27,16 @@ ifeq ($(DEB_HOST_ARCH),i386)
 export EFI_ARCH := ia32
 endif
 
-COMMON_OPTIONS = \
+COMMON_OPTIONS += \
        RELEASE=15 \
        COMMIT_ID=3beb971b10659cf78144ddc5eeea83501384440c \
        MAKELEVEL=0 \
        EFI_PATH=/usr/lib \
        ENABLE_HTTPBOOT=true \
-       ENABLE_SHIM_CERT=1 \
-       ENABLE_SBSIGN=1 \
        VENDOR_CERT_FILE=$(cert) \
        EFIDIR=$(distributor) \
+       CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- \
+       CC=$(DEB_HOST_GNU_TYPE)-gcc-7 \
        $(NULL)
 
 %:
@@ -47,3 +50,4 @@ override_dh_auto_build:
 
 override_dh_auto_install:
        dh_auto_install --destdir=debian/tmp -- $(COMMON_OPTIONS)
+       ./debian/signing-template.generate