| 1 |
|
| 2 |
|
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
export TOOLCFLAGS = -Wno-error -g |
| 5 |
|
| 6 |
include /usr/share/dpkg/default.mk |
| 7 |
|
| 8 |
COREBOOT_UTILS = cbfstool cbmem ifdtool intelvbttool kbc1126 nvramtool |
| 9 |
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 x32)) |
| 10 |
COREBOOT_UTILS += bucts ectool intelmetool inteltool msrtool pmh7tool superiotool |
| 11 |
endif |
| 12 |
|
| 13 |
%: |
| 14 |
dh $@ --with sphinxdoc |
| 15 |
|
| 16 |
override_dh_auto_configure: |
| 17 |
|
| 18 |
|
| 19 |
sed -e "s#@VERSION@#${DEB_VERSION}#g" -e "s#@CC@#${CC}#g" -e "s#@CFLAGS@#${CFLAGS}#g" \ |
| 20 |
-e "s#@LDFLAGS@#${LDFLAGS} -lpci#g" -e "s#@INSTALL@#install#g" -e "s#@PREFIX@#/usr#g" \ |
| 21 |
util/msrtool/Makefile.in > util/msrtool/Makefile |
| 22 |
|
| 23 |
override_dh_auto_build: |
| 24 |
set -e; \ |
| 25 |
for f in $(COREBOOT_UTILS); do \ |
| 26 |
$(MAKE) -C util/$$f; \ |
| 27 |
done |
| 28 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 29 |
|
| 30 |
PYTHONPATH=. DEB_VERSION=$(DEB_VERSION) http_proxy='http://127.0.0.1:9/' \ |
| 31 |
sphinx-build -N -E -bhtml Documentation build/html |
| 32 |
endif |
| 33 |
|
| 34 |
override_dh_clean: |
| 35 |
|
| 36 |
dh_auto_clean |
| 37 |
dh_clean --exclude=src/sbom/TAGS |
| 38 |
|
| 39 |
execute_before_dh_install-arch: |
| 40 |
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 x32)) |
| 41 |
dh_install util/bucts/bucts usr/sbin |
| 42 |
endif |
| 43 |
|
| 44 |
override_dh_sphinxdoc: |
| 45 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) |
| 46 |
dh_sphinxdoc -p coreboot-utils-doc |
| 47 |
endif |