summaryrefslogtreecommitdiff
path: root/sysutils/ipmitool/Makefile
blob: 2c7f05cf0d4b1dca79f78b7db8cf1b5a4d4c755d (plain)
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
55
56
57
58
59
60
61
62
63
64
65
# New ports collection makefile for:	ipmitool
# Date created:				25/Oct/2004
# Whom:					Dmitry Frolov <frol@nov.net>
#
# $FreeBSD$
#

PORTNAME=	ipmitool
PORTVERSION=	1.8.9
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	frolov@riss-telecom.ru
COMMENT=	CLI to manage IPMI systems

USE_BZIP2=	yes
USE_GMAKE=	yes
USE_OPENSSL=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	--enable-intf-lan --enable-intf-lanplus \
		--disable-intf-imb --disable-intf-lipmi --disable-intf-bmc
CONFIGURE_ENV+=	CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" \
	LDFLAGS="${LDFLAGS}"
PLIST_FILES=	bin/ipmitool sbin/ipmievd
PORTDOCS=	*
MAN1+=		${PORTNAME}.1
MAN8+=		ipmievd.8

.if defined(WITH_DEBUG)
CFLAGS+=	-ggdb -Wall
.endif

.include <bsd.port.pre.mk>

.if exists(/usr/include/sys/ipmi.h)
CONFIGURE_ARGS+=	--enable-intf-open
.elif defined(WITH_IPMI_KMOD) || \
	exists(${LOCALBASE}/include/sys/ipmi.h)
BUILD_DEPENDS+=	${LOCALBASE}/include/sys/ipmi.h:${PORTSDIR}/sysutils/ipmi-kmod
CPPFLAGS+=	-I${LOCALBASE}/include
CONFIGURE_ARGS+=	--enable-intf-open
.else
CONFIGURE_ARGS+=	--disable-intf-open
.endif

.if defined(WITH_FREEIPMI) || \
	(exists(${LOCALBASE}/include/freeipmi/freeipmi.h) && \
		!defined(WITHOUT_FREEIPMI))
# Support for FreeIPMI 0.4.x and 0.5.x API
EXTRA_PATCHES+=	${FILESDIR}/freeipmi-support.patch
USE_AUTOTOOLS+=	autoconf:262 libtool:15 aclocal:19 automake:19
# libtool15 installs it's aclocal macros into ${LOCALBASE}/share/aclocal
ACLOCAL_ARGS+=	--acdir=${ACLOCAL_DIR} -I ${LOCALBASE}/share/aclocal
# Make automake quiet about missing NEWS and ChangeLog files
AUTOMAKE_ARGS+=	--foreign
LIB_DEPENDS+=	freeipmi:${PORTSDIR}/sysutils/freeipmi
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS+=	--enable-intf-free
.else
CONFIGURE_ARGS+=	--disable-intf-free
.endif

.include <bsd.port.post.mk>