blob: 87b6ea774835468e564459f1eef66230a27be940 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# New ports collection makefile for: nut
# Date created: 08 Jan 2000
# Whom: Boris Popov <bp@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= nut
PORTVERSION= 0.44.2
CATEGORIES= sysutils
MASTER_SITES= http://www.exploits.org/nut/release/
MAINTAINER= bp@butya.kz
.if defined(CGI)
LIB_DEPENDS= gd.1:${PORTSDIR}/graphics/gd
.endif
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
--with-cgipath=${PREFIX}/share/nut/cgi \
--with-modelpath=${PREFIX}/libexec/nut \
--with-statepath=/var/db
ALL_TARGET= all
PLIST= ${WRKDIR}/PLIST.DYN
NDOCDIR= ${PREFIX}/share/doc/nut
.if defined(CGI)
NCGIDIR= ${PREFIX}/share/nut/cgi
ALL_TARGET+= cgi
.endif
pre-fetch:
.if !defined(CGI)
@${ECHO_MSG} "Type \"make CGI=yes\" if you want to build CGI scripts."
.endif
pre-install:
@cp ${PKGDIR}/pkg-plist ${WRKDIR}/PLIST.DYN
.if !defined(NOPORSDOCS)
@cat ${PKGDIR}/pkg-plist.doc >> ${WRKDIR}/PLIST.DYN
.endif
.if defined(CGI)
@cat ${PKGDIR}/pkg-plist.cgi >> ${WRKDIR}/PLIST.DYN
.endif
post-install:
@${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" \
${WRKSRC}/scripts/FreeBSD/upsd.sh.sample \
>${PREFIX}/etc/rc.d/nut.sh.sample
@${CHMOD} 0755 ${PREFIX}/etc/rc.d/nut.sh.sample
.if !defined(NOPORTDOCS)
@if ! [ -d ${NDOCDIR} ]; then ${MKDIR} ${NDOCDIR}; fi
@if ! [ -d ${NDOCDIR}/cables ]; then ${MKDIR} ${NDOCDIR}/cables; fi
${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${NDOCDIR}/cables
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${NDOCDIR}
${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${NDOCDIR}
${INSTALL_DATA} ${WRKSRC}/docs/Changes.trust ${NDOCDIR}
${INSTALL_DATA} ${WRKSRC}/README ${NDOCDIR}
${INSTALL_DATA} ${WRKSRC}/QUICKSTART ${NDOCDIR}
.endif
.if defined(CGI)
@if ! [ -d ${NCGIDIR} ]; then ${MKDIR} ${NCGIDIR}; fi
${INSTALL_DATA} ${WRKSRC}/clients/*.cgi ${NCGIDIR}
@${ECHO_MSG} "Look in ${NCGIDIR} for cgi scripts."
.endif
@${ECHO_MSG} "Look in ${NDOCDIR} for documentation."
.include <bsd.port.mk>
|