summaryrefslogtreecommitdiff
path: root/sysutils/apcupsd/Makefile
blob: c378cce7860906fc3b9d500f4574438e18d0eae7 (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
66
# $NetBSD: Makefile,v 1.2 2000/08/05 07:31:15 jlam Exp $
#

DISTNAME=		apcupsd-3.6.2
CATEGORIES=		sysutils
MASTER_SITES=		http://www.brisse.dk/dlarea/

MAINTAINER=		bouyer@netbsd.org
HOMEPAGE=		http://www.brisse.dk/site/apcupsd/

BUILD_DEPENDS+=		autoreconf:../../devel/autoconf
DEPENDS+=		gettext>=0.10.35nb1:../../devel/gettext

USE_GMAKE=		# defined

GNU_CONFIGURE=		# defined
CONFIGURE_ARGS+=	--enable-http		# include http support

# Thread support is needed to compile powerflute, which has a curses interface
#
#DEPENDS+=		ncurses-*:../../devel/ncurses
#CONFIGURE_ARGS+=	--enable-threads	# compile threading code
#CONFIGURE_ARGS+=	--enable-powerflute	# compile powerflute program

CONFIGURE_ARGS+=	--with-catgets		# use catgets functions
CONFIGURE_ARGS+=	--enable-nls		# i18n support
CONFIGURE_ENV+=		CPPFLAGS="${CPPFLAGS}"
CPPFLAGS+=		-I${LOCALBASE}/include	# libintl.h
CFLAGS+=		-I${LOCALBASE}/include	# libintl.h

pre-configure:
	cd ${WRKSRC} && autoreconf --force

# we should probably allow the tty to be set in /etc/mk.conf too
#
post-build:
	${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/examples/apcupsd.conf > \
		${WRKDIR}/apcupsd.conf
	${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/apcupsd > \
		${WRKDIR}/apcupsd
	${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${WRKSRC}/doc/apcupsd.man > \
		${WRKSRC}/doc/apcupsd.8

DOCS=	README.BackUPS-Pro	\
	README.NEW		\
	README.NewerBackUPS-Pro	\
	README.Share-UPS	\
	README.SmartUPS-VS	\
	README.apcaccess	\
	README.autoconfig	\
	README.cable		\
	README.developers	\
	Statement.APCC 		\
	minicom.apcupsd		\
	port.gif

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples
	${INSTALL_DATA} ${WRKDIR}/apcupsd.conf ${PREFIX}/share/examples
	${INSTALL_SCRIPT} ${WRKDIR}/apcupsd ${PREFIX}/etc/rc.d
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/apcupsd
.for file in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/apcupsd
.endfor

.include "../../mk/bsd.pkg.mk"