aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/cpupowerd/Makefile
blob: 9f4c0b96453fddfcd90d2b893713baa6b7658e3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# New ports collection makefile for:   cpupowerd
# Date created:        2008-06-01
# Whom:                Bernhard Froehlich <decke@bluelife.at>
#
# $FreeBSD$
#

PORTNAME=   cpupowerd
PORTVERSION=    0.2.1
PORTREVISION=   1
CATEGORIES= sysutils
MASTER_SITES=   SF

MAINTAINER= decke@FreeBSD.org
COMMENT=    A CPU over- and undervolting daemon

USE_RC_SUBR=    cpupowerd
ONLY_FOR_ARCHS= i386 amd64
WRKSRC=     ${WRKDIR}/${DISTNAME}/src
MAKE_ENV+=  GROUP=wheel \
        RIGHTS=555

OPTIONS=    CREATELOAD "Install createload.sh for stability testing" Off

.include <bsd.port.pre.mk>

.if (${OSVERSION} < 800042 && ${OSVERSION} >= 800000) || ${OSVERSION} < 701102
BUILD_DEPENDS+= ${LOCALBASE}/include/cpu.h:${PORTSDIR}/sysutils/devcpu
SUB_LIST+=  CPUCTL="cpu"
.else
SUB_LIST+=  CPUCTL="cpuctl"
.endif

.if defined(WITH_CREATELOAD)
RUN_DEPENDS+=   burnMMX:${PORTSDIR}/sysutils/cpuburn
PLIST_SUB+= CREATELOAD=""
.else
PLIST_SUB+= CREATELOAD="@comment "
.endif

post-install:
.if defined(WITH_CREATELOAD)
    ${INSTALL_SCRIPT} ${WRKSRC}/../tools/createload.sh ${PREFIX}/bin/createload.sh
.endif
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/../CHANGELOG ${DOCSDIR}/CHANGELOG
    ${INSTALL_DATA} ${WRKSRC}/../COPYING ${DOCSDIR}/COPYING
    ${INSTALL_DATA} ${WRKSRC}/../README ${DOCSDIR}/README
    ${INSTALL_DATA} ${WRKSRC}/../TODO ${DOCSDIR}/TODO
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>