ports/sysutils/cpu-microcode-intel/Makefile
Joseph Mingrone bc7829212d
sysutils/cpu-microcode-*: Reorganize CPU microcode ports
Prior to this update, sysutils/devcpu-data, which only contained an RC
script, had run dependencies on the AMD and Intel microcode ports.  This
made it cumbersome to have just the AMD or just the Intel microcode
ports installed.  With this change, the microcode ports now depend on
the RC script.

Other changes:

- Use more intuitive port names: cpu-microcode, cpu-microcode-amd,
  cpu-microcode-intel, and cpu-microcode-rc.
- Add the metaport, cpu-microcode, which pulls in all related ports.
- Pet portclippy/portfmt

Reviewed by:	lwhsu, markj
Approved by:	sbruno (maintainer)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41406
2023-08-16 14:06:40 -03:00

48 lines
1.4 KiB
Makefile

PORTNAME= microcode
DISTVERSIONPREFIX= microcode-
DISTVERSION= 20230808
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
RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/microcode_update:sysutils/cpu-microcode-rc
USES= cpe
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:
${CP} -p ${FILESDIR}/Makefile ${FILESDIR}/ucode-split.c ${WRKSRC}
${REINPLACE_CMD} 's|%%GH_TAGNAME%%|${GH_TAGNAME}|g' ${WRKSRC}/Makefile
${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
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/mcodes/* ${STAGEDIR}${DATADIR}/
${MKDIR} ${STAGEDIR}${FWDIR}
${INSTALL_DATA} ${WRKSRC}/intel-ucode.bin ${STAGEDIR}${FWDIR}/
.include <bsd.port.mk>