freebsd-ports/sysutils/cpu-microcode-intel/Makefile
Marius Strobl d12bc36e76 cpu-microcode-intel: Add knobs for RC RUN_DEPENDS and split files
Split UCODE files as well as dependency on sysutils/cpu-microcode-rc
are only required for use with cpucontrol(8) and update method two
respectively. The first method needs neither so we can spare a few
MiB and a superfluous port.
Given that the automatic update method one is superior, the RC knob
should be deprecated and removed eventually. At that point, split
UCODE files still will be useful for developers and if users want
to update the microcode without a reboot (but otherwise rely on the
loader for automatic updates, i. e. method one).

Reviewed by:	jrm (w/ style suggestions)
Approved by:	jrm (upcoming maintainer)
Differential Revision:	https://reviews.freebsd.org/D41904
2023-11-09 21:20:53 +01:00

64 lines
1.7 KiB
Makefile

PORTNAME= microcode
DISTVERSIONPREFIX= microcode-
DISTVERSION= 20230808
PORTREVISION= 1
CATEGORIES= sysutils
PKGNAMEPREFIX= cpu-
PKGNAMESUFFIX= -intel
MAINTAINER= sbruno@FreeBSD.org
COMMENT= Intel CPU microcode updates
WWW= https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
LICENSE= EULA
LICENSE_NAME= Intel Software License Agreement
LICENSE_FILE= ${FILESDIR}/LICENSE
LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
ONLY_FOR_ARCHS= amd64 i386
USES= cpe
OPTIONS_DEFINE= RC SPLIT
OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
OPTIONS_SUB= yes
RC_DESC= Depend on RC script port (automatic update method two)
SPLIT_DESC= Install split files (for cpucontrol(8) and RC script)
RC_IMPLIES= SPLIT
RC_RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/microcode_update:sysutils/cpu-microcode-rc
SPLIT_VARS_OFF= NO_BUILD=yes
CPE_PART= o
CPE_VENDOR= intel
CPE_PRODUCT= microcode
USE_GITHUB= yes
GH_ACCOUNT= intel
GH_PROJECT= Intel-Linux-Processor-Microcode-Data-Files
DATADIR= ${PREFIX}/share/cpucontrol
FWDIR= /boot/firmware
NO_ARCH= yes
NO_WRKSUBDIR= yes
post-extract:
${CAT} ${WRKSRC}/Intel-Linux-Processor-Microcode-Data-Files-${GH_TAGNAME}/intel-ucode/* \
${WRKSRC}/Intel-Linux-Processor-Microcode-Data-Files-${GH_TAGNAME}/intel-ucode-with-caveats/* \
> ${WRKSRC}/intel-ucode.bin
post-extract-SPLIT-on:
${CP} -p ${FILESDIR}/Makefile ${FILESDIR}/ucode-split.c ${WRKSRC}
${REINPLACE_CMD} 's|%%GH_TAGNAME%%|${GH_TAGNAME}|g' ${WRKSRC}/Makefile
do-install:
${MKDIR} ${STAGEDIR}${FWDIR}
${INSTALL_DATA} ${WRKSRC}/intel-ucode.bin ${STAGEDIR}${FWDIR}/
do-install-SPLIT-on:
${MKDIR} ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/mcodes/* ${STAGEDIR}${DATADIR}/
.include <bsd.port.mk>