diff options
author | Eugene Grosbein <eugen@FreeBSD.org> | 2018-03-23 22:12:05 +0800 |
---|---|---|
committer | Eugene Grosbein <eugen@FreeBSD.org> | 2018-03-23 22:12:05 +0800 |
commit | 10dd205fbed7209da2d04b6097329f3e725bf114 (patch) | |
tree | f6e9f17e09d98db58f04c0688637a18766b26e99 | |
parent | 16c9d9599cfecaf03cc92812525770af45b9558e (diff) | |
download | freebsd-ports-10dd205fbed7209da2d04b6097329f3e725bf114.tar.gz freebsd-ports-10dd205fbed7209da2d04b6097329f3e725bf114.tar.zst freebsd-ports-10dd205fbed7209da2d04b6097329f3e725bf114.zip |
sysutils/cpupdate: new convenience target "install-microcodes"
Some users may prefer copying the whole bunch of CPU microcodes
to their system instead of just needed one. Add new Makefile target
"install-microcodes" to ease such copying and mention it in the pkg-message.
This is still for convenience only and those blobs do not get into
the pkg-plist and the package and need to be manually removed
if not needed anymore.
PR: 226620
Notes
Notes:
svn path=/head/; revision=465359
-rw-r--r-- | sysutils/cpupdate/Makefile | 38 | ||||
-rw-r--r-- | sysutils/cpupdate/files/pkg-message.in | 5 |
2 files changed, 36 insertions, 7 deletions
diff --git a/sysutils/cpupdate/Makefile b/sysutils/cpupdate/Makefile index e0d27cff98e8..8ce22d091b1c 100644 --- a/sysutils/cpupdate/Makefile +++ b/sysutils/cpupdate/Makefile @@ -30,18 +30,20 @@ CPM_ACCOUNT= platomav CPM_PROJECT= CPUMicrocodes CPM_TAGNAME= a0371d6 -OPTIONS_DEFINE= CPM INTEL -CPM_DESC= Download platomav/CPUMicrocodes collection -CPM_GH_ACCOUNT= ${CPM_ACCOUNT}:cpm -CPM_GH_PROJECT= ${CPM_PROJECT}:cpm -CPM_GH_TAGNAME= ${CPM_TAGNAME}:cpm -CPM_DIR=${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME} +OPTIONS_DEFINE= CPM INTEL +CPM_DESC= Download platomav/CPUMicrocodes collection +CPM_GH_ACCOUNT= ${CPM_ACCOUNT}:cpm +CPM_GH_PROJECT= ${CPM_PROJECT}:cpm +CPM_GH_TAGNAME= ${CPM_TAGNAME}:cpm +CPM_DIR= ${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME} +CPM_DATADIR= ${DATADIR}/CPUMicrocodes/secondary/Intel INTEL_PACK= microcode-20180312.tgz INTEL_DESC= Download Intel microcode pack ${INTEL_PACK} INTEL_MASTER_SITES= https://downloadmirror.intel.com/27591/eng/:intel INTEL_DISTFILES= ${INTEL_PACK}:intel INTEL_DIR= ${WRKDIR}/intel-ucode +INTEL_DATADIR= ${DATADIR}/CPUMicrocodes/primary/Intel post-patch: ${REINPLACE_CMD} -e "s,/usr/local/share/cpupdate,${DATADIR},g" ${WRKSRC}/cpupdate.h @@ -50,4 +52,28 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MANPREFIX}/man/man8 +.include <bsd.port.options.mk> + +install-microcodes: +.if ${PORT_OPTIONS:MINTEL} + ${RM} -rf ${INTEL_DATADIR} + ${MKDIR} ${INTEL_DATADIR} + (cd ${INTEL_DIR} && ${COPYTREE_SHARE} . ${INTEL_DATADIR}) +.endif +.if ${PORT_OPTIONS:MCPM} + ${RM} -rf ${CPM_DATADIR} + ${MKDIR} ${CPM_DATADIR} + (cpupdate -IC -S ${CPM_DIR}/Intel -T ${CPM_DATADIR}) +.endif +.for _o in INTEL CPM +.if ${PORT_OPTIONS:M${_o}} + @${ECHO} '' + @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + @${ECHO} NOTE: you have to manually remove the directory + @${ECHO} ${${_o}_DATADIR} + @${ECHO} after deinstallation of ${PORTNAME}. + @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' +.endif +.endfor + .include <bsd.port.mk> diff --git a/sysutils/cpupdate/files/pkg-message.in b/sysutils/cpupdate/files/pkg-message.in index c05033c34866..f8c810968213 100644 --- a/sysutils/cpupdate/files/pkg-message.in +++ b/sysutils/cpupdate/files/pkg-message.in @@ -5,5 +5,8 @@ NOTE: The following directories %%INTEL_DIR%% contain Intel and/or platomav/CPUMicrocodes collections respectively -if you have just built the port with corresponding CPM/INTEL option(s) enabled +if you have just built the port with corresponding CPM/INTEL option(s) enabled. +In this case you can run "make install-microcodes" to install them to + +%%DATADIR%% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |