diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:11:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:11:02 +0000 |
commit | 7e0d55c5e855f10238cd8b93fd0ab27d87d41240 (patch) | |
tree | 80e4b213385d8810c639ca9c8758d84de5f0e7e2 /debian/rules | |
parent | Adding upstream version 3.20231114.1~deb12u1. (diff) | |
download | intel-microcode-debian/3.20231114.1_deb12u1.tar.xz intel-microcode-debian/3.20231114.1_deb12u1.zip |
Adding debian version 3.20231114.1~deb12u1.debian/3.20231114.1_deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..eac0d2e --- /dev/null +++ b/debian/rules @@ -0,0 +1,62 @@ +#!/usr/bin/make -f +# debian/rules for intel-microcode, dh version +# Copyright (C) 2011,2016 by Henrique de Moraes Holschuh +# Published under the GNU GPL license version 2 or any later versions + +PACKAGE := intel-microcode +DEBDIR := $(CURDIR)/debian +PKGDIR := $(DEBDIR)/$(PACKAGE) + +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +export PATH := $(PATH):/sbin:/usr/sbin +IUCODE_TOOL := iucode_tool + +# DebHelper control +export DH_ALWAYS_EXCLUDE=CVS:.svn:.git + +ifneq (,$(filter amd64 x32,$(DEB_HOST_ARCH))) +IUCODE_FILE := intel-microcode-64.bin +else +IUCODE_FILE := intel-microcode.bin +endif + +# Work around Debian bug #688794 +INITRAMFS_NAME := $(subst -,_,$(subst +,_,$(subst .,_,$(PACKAGE)))) + +%: + dh $@ + +override_dh_auto_install: + dh_testdir + dh_install + + # split microcode pack + $(IUCODE_TOOL) -q --write-firmware="$(PKGDIR)/lib/firmware/intel-ucode" $(IUCODE_FILE) + + # apply best-effort blacklist + if [ -r debian/ucode-blacklist.txt ] ; then \ + cat debian/ucode-blacklist.txt | while read -r fn crap ; do \ + if [ -r "$(PKGDIR)/lib/firmware/intel-ucode/$${fn}" ] ; then \ + mv "$(PKGDIR)/lib/firmware/intel-ucode/$${fn}" "$(PKGDIR)/lib/firmware/intel-ucode/$${fn}.initramfs" ;\ + echo "Renaming blacklisted microcode $${fn}" ; \ + fi ; \ + done ; \ + fi + + mkdir -p "$(PKGDIR)/usr/share/initramfs-tools/hooks" + install -m 755 "$(DEBDIR)/initramfs.hook" \ + "$(PKGDIR)/usr/share/initramfs-tools/hooks/$(INITRAMFS_NAME)" + mkdir -p "$(PKGDIR)/etc/kernel/preinst.d" + install -m 755 "$(DEBDIR)/$(PACKAGE).kpreinst" \ + "$(PKGDIR)/etc/kernel/preinst.d/$(PACKAGE)" + + # We have a /etc/default file, but no initscript + install -m 644 "$(DEBDIR)/$(PACKAGE).default" "$(PKGDIR)/etc/default/$(PACKAGE)" + + # modprobe.d blacklist + install -m 644 "$(DEBDIR)/$(PACKAGE).modprobe-blacklist" "$(PKGDIR)/etc/modprobe.d/$(PACKAGE)-blacklist.conf" + +override_dh_installchangelogs: + dh_installchangelogs changelog + |