1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

sysutils/xmbmon: Strip installed binary

Move installation from vendor makefile to do-install target to properly
install the executables, man pages, and documentation.

PR:		185354
Submitted by:	takefu (airport.fm)
Reworked by:	maintainer (Mohammad M. Rahman)
tweaked by:	marino
This commit is contained in:
John Marino 2014-06-18 21:10:46 +00:00
parent 795cf5e8ae
commit d00ecce924
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358319
2 changed files with 16 additions and 46 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= xmbmon
PORTVERSION= 205
PORTREVISION= 10
PORTREVISION= 11
CATEGORIES= sysutils
MASTER_SITES= http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/${PORTNAME}/
DISTNAME= ${PORTNAME}${PORTVERSION}
@ -26,9 +26,9 @@ OPTIONS_DEFINE= ASUS SMB DOCS
OPTIONS_MULTI= INTERFACE
OPTIONS_MULTI_INTERFACE= CLI X11
OPTIONS_DEFAULT=SMB CLI
ASUS_DESC= "Enable A7N8X-VM support"
SMB_DESC= "Enable smb(4) support"
CLI_DESC= "CLI support only"
ASUS_DESC= Enable A7N8X-VM support
SMB_DESC= Enable smb(4) support
CLI_DESC= CLI support only
ASUS_PATCHFILES= ${PORTNAME}${PORTVERSION}_A7N8X-VM.patch
X11_PLIST_FILES= lib/X11/app-defaults/${PORTNAME} \
@ -49,18 +49,22 @@ USE_RC_SUBR= mbmon
.endif
post-patch:
@${REINPLACE_CMD} -e 's+/usr/share/doc/mbmon+${STAGEIR}${DOCSDIR}+' ${WRKSRC}/mbmon.1
@${REINPLACE_CMD} -e 's+%%STAGEDIR%%%%PREFIX%%+${STAGEDIR}${PREFIX}+' ${WRKSRC}/Makefile.in
.if !${PORT_OPTIONS:MX11}
@${REINPLACE_CMD} -e '/p xmbmon/d' ${WRKSRC}/Makefile.in
.endif
.if !${PORT_OPTIONS:MCLI}
@${REINPLACE_CMD} -e '/p mbmon/d' ${WRKSRC}/Makefile.in
.endif
@${REINPLACE_CMD} -e 's+/usr/share/doc/mbmon+${STAGEDIR}${DOCSDIR}+' \
${WRKSRC}/mbmon.1
.if ${PORT_OPTIONS:MSMB}
@${REINPLACE_CMD} -e 's/^DEFS=/&-DSMBUS_IOCTL /' ${WRKSRC}/Makefile.in
.endif
do-install:
.if ${PORT_OPTIONS:MX11}
${INSTALL_PROGRAM} ${WRKSRC}/xmbmon \
${STAGEDIR}${PREFIX}/lib/X11/app-defaults
${INSTALL_MAN} ${WRKSRC}/xmbmon.1x ${STAGEDIR}${MANPREFIX}/man/man1
.endif
.if ${PORT_OPTIONS:MCLI}
${INSTALL_PROGRAM} ${WRKSRC}/mbmon ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/mbmon.1 ${STAGEDIR}${MANPREFIX}/man/man1
.endif
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View File

@ -12,37 +12,3 @@
LINT=lint
# LINT=$(CC) -c -Wall -Wshadow -Wpointer-arith
@@ -37,9 +37,9 @@
RM=rm -f
INSTALL=install
-INST_DIR=/usr/local/bin
-INST_MANDIR=/usr/local/man/man1
-INST_XDIR=/usr/X11R6/bin
+INST_DIR=%%STAGEDIR%%%%PREFIX%%/bin
+INST_MANDIR=%%STAGEDIR%%%%PREFIX%%/man/man1
+INST_XDIR=%%STAGEDIR%%%%PREFIX%%/lib/X11/app-defaults
INST_MANXDIR=/usr/X11R6/man/man1
INST_XRDIR=/usr/X11R6/lib/X11/app-defaults
@@ -56,7 +56,7 @@
HWM_OBJ = sens_winbond.o sens_via686.o sens_it87.o sens_gl52.o sens_lm85.o sens_lm80.o sens_lm90.o sens_lm75.o sens_wl784.o smb_extemp.o
OBJS = getMBinfo.o tyan_tiger.o pci_pm.o sensors.o $(MB_OBJ) $(SMB_OBJ) $(HWM_OBJ)
-all: $(PROGRAM)
+all: $(PROGRAM) $(MANPAGE)
mbmon: mbmon.c mbmon.h methods.h pci_pm.h smbuses.h sensors.h $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ mbmon.c $(OBJS) $(LIBS)
@@ -135,10 +135,8 @@
install: $(PROGRAM)
$(INSTALL) -o root -g wheel -m 4555 -c -p mbmon $(INST_DIR)
$(INSTALL) -o root -g wheel -m 4555 -c -p xmbmon $(INST_XDIR)
-
-install-man: $(MANPAGE)
$(INSTALL) -o root -g wheel -m 444 -c -p mbmon.1 $(INST_MANDIR)
- $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(INST_MANXDIR)
+ $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(INST_MANDIR)
lint:
$(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm