blob: 48a8275d46d349a71ff7d5558113e198a385fdd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#! /usr/bin/make -f
VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
SHIM_VERSION := $(shell dpkg-query -f '$${Version}\n' -W shim-unsigned)
VENDOR := $(shell dpkg-vendor --query vendor)
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-common/usr/share/doc/shim-signed-common
override_dh_installdebconf:
dh_installdebconf -p shim-signed-common
override_dh_installdeb:
ifeq ($(VENDOR),Debian)
# Remove apport files from Debian builds, they're not useful
find debian/shim-signed-common -name '*apport*' | xargs rm -rvf
endif
dh_installdeb
override_dh_gencontrol:
ifeq ($(DEB_HOST_ARCH),arm64)
# On arm64, substitute our package description with "not
# signed" warning at build time
dh_gencontrol -pshim-signed -- \
-v$(VERSION)+$(SHIM_VERSION) \
-Vshim:Version=$(SHIM_VERSION) \
-DDescription="$$(cat debian/arm64.description)"
dh_gencontrol --remaining-packages -- \
-v$(VERSION)+$(SHIM_VERSION) \
-Vshim:Version=$(SHIM_VERSION)
else
dh_gencontrol -- -v$(VERSION)+$(SHIM_VERSION) \
-Vshim:Version=$(SHIM_VERSION)
endif
|