summaryrefslogtreecommitdiff
path: root/sysutils/sensors-applet/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/sensors-applet/Makefile')
-rw-r--r--sysutils/sensors-applet/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/sysutils/sensors-applet/Makefile b/sysutils/sensors-applet/Makefile
index 7990eb1a6aa5..03bc4d26c2ba 100644
--- a/sysutils/sensors-applet/Makefile
+++ b/sysutils/sensors-applet/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sensors-applet
PORTVERSION= 1.6.1
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -14,16 +15,28 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= jylefort@FreeBSD.org
COMMENT= A GNOME applet displaying hardware sensor values
-RUN_DEPENDS= mbmon:${PORTSDIR}/sysutils/mbmon
+RUN_DEPENDS= mbmon:${PORTSDIR}/sysutils/mbmon \
+ smartctl:${PORTSDIR}/sysutils/smartmontools
USE_X_PREFIX= yes
USE_GNOME= gnomehack gnomeprefix intlhack gnomepanel
GNU_CONFIGURE= yes
USE_GMAKE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -DMBMON_EXECUTABLE=\\\"${LOCALBASE}/bin/mbmon\\\"" \
+DEFINES= -DMBMON_EXECUTABLE=\\\"${LOCALBASE}/bin/mbmon\\\" \
+ -DSMARTCTL_HELPER=\\\"${PREFIX}/libexec/smartctl-helper\\\"
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${DEFINES}" \
LDFLAGS="-L${LOCALBASE}/lib"
post-patch:
- @${CP} -f ${FILESDIR}/mbmon-sensors-interface.* ${WRKSRC}/src
+ @${CP} -f ${FILESDIR}/mbmon-sensors-interface.* \
+ ${FILESDIR}/smartctl-sensors-interface.* ${WRKSRC}/src
+
+post-build:
+ ${CC} ${CFLAGS} -DSMARTCTL=\"${LOCALBASE}/sbin/smartctl\" \
+ -o ${WRKSRC}/smartctl-helper ${FILESDIR}/smartctl-helper.c
+
+post-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/smartctl-helper ${PREFIX}/libexec
+ ${CHMOD} u+s ${PREFIX}/libexec/smartctl-helper
.include <bsd.port.mk>