View | Details | Raw Unified | Return to bug 95015 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-19 / +19 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	nut
8
PORTNAME=	nut
9
PORTVERSION=	2.0.2
9
PORTVERSION=	2.0.3
10
PORTREVISION=	1
10
PORTREVISION=	0
11
CATEGORIES=	sysutils
11
CATEGORIES=	sysutils
12
MASTER_SITES=	http://eu1.networkupstools.org/source/${PORTVERSION:R}/ \
12
MASTER_SITES=	http://eu1.networkupstools.org/source/${PORTVERSION:R}/ \
13
		http://us1.networkupstools.org/source/${PORTVERSION:R}/
13
		http://us1.networkupstools.org/source/${PORTVERSION:R}/
Lines 30-52 Link Here
30
		--with-statepath=${STATEDIR} \
30
		--with-statepath=${STATEDIR} \
31
		--with-altpidpath=${STATEDIR} \
31
		--with-altpidpath=${STATEDIR} \
32
		--with-pidpath=${STATEDIR} \
32
		--with-pidpath=${STATEDIR} \
33
		--with-linux-hiddev=no
33
		--with-linux-hiddev=no \
34
USE_RC_SUBR=	yes
34
		--with-user=${NUT_USER}
35
36
NUT_USER?=	uucp
35
STATEDIR=	${DESTDIR}/var/db/nut
37
STATEDIR=	${DESTDIR}/var/db/nut
36
38
37
.include <bsd.port.pre.mk>
39
.include <bsd.port.pre.mk>
38
40
39
.if ${SUBSYS} == base
41
.if ${SUBSYS} == base
42
USE_RC_SUBR=	nut.sh nut_upsmon.sh nut_upslog.sh
43
SUB_LIST+=	STATEDIR=${STATEDIR}
44
PLIST_SUB+=	STATEDIR=${STATEDIR}
45
40
MAN5=		ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
46
MAN5=		ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
41
		upssched.conf.5
47
		upssched.conf.5
42
MAN8=		apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 bestuferrups.8 \
48
MAN8=		apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 bestuferrups.8 \
43
		bestups.8 bestfcom.8 cpsups.8 cyberpower.8 etapro.8 everups.8 \
49
		bestups.8 bestfcom.8 cpsups.8 cyberpower.8 etapro.8 everups.8 \
44
		fentonups.8 genericups.8 ippon.8 isbmex.8 liebert.8 \
50
		fentonups.8 gamatronic.8 genericups.8 ippon.8 isbmex.8 \
45
		masterguard.8 metasys.8 mge-shut.8 mge-utalk.8 mustek.8 \
51
		liebert.8 masterguard.8 metasys.8 mge-shut.8 mge-utalk.8 \
46
		nutupsdrv.8 oneac.8 powercom.8 powermust.8 safenet.8 sms.8 \
52
		mustek.8 nutupsdrv.8 oneac.8 powercom.8 powermust.8 safenet.8 \
47
		solis.8 tripplite.8 tripplitesu.8 upsc.8 upscmd.8 upscode2.8 \
53
		sms.8 solis.8 tripplite.8 tripplitesu.8 upsc.8 upscmd.8 \
48
		upsd.8 upsdrvctl.8 upslog.8 upsmon.8 upsrw.8 upssched.8 \
54
		upscode2.8 upsd.8 upsdrvctl.8 upslog.8 upsmon.8 upsrw.8 \
49
		victronups.8
55
		upssched.8 victronups.8
50
56
51
ALL_TARGET=	all
57
ALL_TARGET=	all
52
INSTALL_TARGET=	install install-conf
58
INSTALL_TARGET=	install install-conf
Lines 80-86 Link Here
80
ALL_TARGET=	usb
86
ALL_TARGET=	usb
81
INSTALL_TARGET=	install-usb
87
INSTALL_TARGET=	install-usb
82
88
83
MAN8=		newhidups.8
89
MAN8=		bcmxcp_usb.8 newhidups.8 tripplite_usb.8
84
.endif
90
.endif
85
91
86
.if ${SUBSYS} == snmp
92
.if ${SUBSYS} == snmp
Lines 112-129 Link Here
112
.endif
118
.endif
113
	@${MKDIR} ${PREFIX}/libexec/nut
119
	@${MKDIR} ${PREFIX}/libexec/nut
114
	@${MKDIR} ${STATEDIR}
120
	@${MKDIR} ${STATEDIR}
115
	@${CHOWN} uucp:wheel ${STATEDIR}
121
	@${CHOWN} ${NUT_USER}:wheel ${STATEDIR}
116
	@${CHMOD} 0750 ${STATEDIR}
122
	@${CHMOD} 0750 ${STATEDIR}
117
123
118
post-install:
119
	@${SED} -e "s#%%PREFIX%%#${PREFIX}#g" \
120
		-e "s#%%RC_SUBR%%#${RC_SUBR}#g" \
121
		-e "s#%%STATEDIR%%#${STATEDIR}#g" \
122
		<${FILESDIR}/nut.sh.sample >${WRKSRC}/nut.sh
123
	${INSTALL_SCRIPT} ${WRKSRC}/nut.sh ${PREFIX}/etc/rc.d/nut.sh
124
.if !defined(NOPORTDOCS)
124
.if !defined(NOPORTDOCS)
125
post-install:
125
	@${MKDIR} ${DOCSDIR}/cables
126
	@${MKDIR} ${DOCSDIR}/cables
126
	@${MKDIR} ${DOCSDIR}/drivers
127
	${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DOCSDIR}/cables
127
	${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DOCSDIR}/cables
128
	${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DOCSDIR}
128
	${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DOCSDIR}
129
	${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DOCSDIR}
129
	${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DOCSDIR}
(-)distinfo (-6 / +6 lines)
Lines 1-6 Link Here
1
MD5 (nut-2.0.2.tar.gz) = 6560df8d0a42f0f585d34ed1ae8c6f67
1
MD5 (nut-2.0.3.tar.gz) = ed2d3104d021a6ddb864f23d8cbd1cf6
2
SHA256 (nut-2.0.2.tar.gz) = 0d79137da31bea3a042c0300ebada73fe46a7f1b4051e75c9b4acc94b2719c51
2
SHA256 (nut-2.0.3.tar.gz) = e4ded1fd1f119a71ee500d043bfa08d912d84793738d81b2bd08871e34ed8f95
3
SIZE (nut-2.0.2.tar.gz) = 609977
3
SIZE (nut-2.0.3.tar.gz) = 656376
4
MD5 (nut-2.0.2.tar.gz.sig) = 65bfaa136df1b0a1b73f983f51d706b3
4
MD5 (nut-2.0.3.tar.gz.sig) = fa059f3c1310b80f36ba80f13e417bc2
5
SHA256 (nut-2.0.2.tar.gz.sig) = 4fd823488011fc924039ddbbe0112af2a961a4e019b78219d22386e5d217ff29
5
SHA256 (nut-2.0.3.tar.gz.sig) = 3677a547953abb04200ddf912bf07e9b06f81135a02edda5d31a5325f7c23a89
6
SIZE (nut-2.0.2.tar.gz.sig) = 65
6
SIZE (nut-2.0.3.tar.gz.sig) = 65
(-)pkg-plist (-4 / +9 lines)
Lines 1-4 Link Here
1
@unexec %D/etc/rc.d/nut_upslog.sh forcestop 2>/dev/null || true
2
@unexec %D/etc/rc.d/nut_upsmon.sh forcestop 2>/dev/null || true
1
@unexec %D/etc/rc.d/nut.sh forcestop 2>/dev/null || true
3
@unexec %D/etc/rc.d/nut.sh forcestop 2>/dev/null || true
4
@unexec %D/etc/rc.d/nut_upslog forcestop 2>/dev/null || true
5
@unexec %D/etc/rc.d/nut_upsmon forcestop 2>/dev/null || true
6
@unexec %D/etc/rc.d/nut forcestop 2>/dev/null || true
2
bin/upsc
7
bin/upsc
3
bin/upscmd
8
bin/upscmd
4
bin/upslog
9
bin/upslog
Lines 10-17 Link Here
10
etc/nut/upsd.users.sample
15
etc/nut/upsd.users.sample
11
etc/nut/upsmon.conf.sample
16
etc/nut/upsmon.conf.sample
12
etc/nut/upssched.conf.sample
17
etc/nut/upssched.conf.sample
13
@dirrmtry etc/nut
14
etc/rc.d/nut.sh
15
libexec/nut/apcsmart
18
libexec/nut/apcsmart
16
libexec/nut/bcmxcp
19
libexec/nut/bcmxcp
17
libexec/nut/belkin
20
libexec/nut/belkin
Lines 26-31 Link Here
26
libexec/nut/etapro
29
libexec/nut/etapro
27
libexec/nut/everups
30
libexec/nut/everups
28
libexec/nut/fentonups
31
libexec/nut/fentonups
32
libexec/nut/gamatronic
29
libexec/nut/genericups
33
libexec/nut/genericups
30
libexec/nut/ippon
34
libexec/nut/ippon
31
libexec/nut/isbmex
35
libexec/nut/isbmex
Lines 84-89 Link Here
84
%%PORTDOCS%%%%DOCSDIR%%/design.txt
88
%%PORTDOCS%%%%DOCSDIR%%/design.txt
85
%%PORTDOCS%%%%DOCSDIR%%/developers.txt
89
%%PORTDOCS%%%%DOCSDIR%%/developers.txt
86
%%PORTDOCS%%%%DOCSDIR%%/ideas.txt
90
%%PORTDOCS%%%%DOCSDIR%%/ideas.txt
91
%%PORTDOCS%%%%DOCSDIR%%/hid-subdrivers.txt
87
%%PORTDOCS%%%%DOCSDIR%%/new-drivers.txt
92
%%PORTDOCS%%%%DOCSDIR%%/new-drivers.txt
88
%%PORTDOCS%%%%DOCSDIR%%/new-names.txt
93
%%PORTDOCS%%%%DOCSDIR%%/new-names.txt
89
%%PORTDOCS%%%%DOCSDIR%%/osd-notify.txt
94
%%PORTDOCS%%%%DOCSDIR%%/osd-notify.txt
Lines 96-103 Link Here
96
%%PORTDOCS%%%%DOCSDIR%%/ssl.txt
101
%%PORTDOCS%%%%DOCSDIR%%/ssl.txt
97
%%PORTDOCS%%%%DOCSDIR%%/upssched.txt
102
%%PORTDOCS%%%%DOCSDIR%%/upssched.txt
98
%%PORTDOCS%%@dirrm %%DOCSDIR%%/cables
103
%%PORTDOCS%%@dirrm %%DOCSDIR%%/cables
99
%%PORTDOCS%%@dirrm %%DOCSDIR%%/drivers
100
%%PORTDOCS%%@dirrm %%DOCSDIR%%
104
%%PORTDOCS%%@dirrm %%DOCSDIR%%
105
@dirrmtry etc/nut
101
@dirrmtry libexec/nut
106
@dirrmtry libexec/nut
102
@unexec rmdir /var/db/nut 2>/dev/null || true
107
@dirrmtry %%STATEDIR%%
103
%%CGIDIRRM%%
108
%%CGIDIRRM%%
(-)files/nut.sh.in (+44 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/sysutils/nut/files/nut.sh.sample,v 1.5 2005/07/14 08:21:12 sem Exp $
4
#
5
6
# PROVIDE: nut
7
# REQUIRE: NETWORKING
8
# BEFORE: LOGIN
9
# KEYWORD: shutdown
10
11
# Define these nut_* variables in one of these files:
12
#       /etc/rc.conf
13
#       /etc/rc.conf.local
14
#       /etc/rc.conf.d/nut
15
#
16
# DO NOT CHANGE THESE DEFAULT VALUES HERE
17
#
18
nut_enable=${nut_enable-"NO"}
19
nut_prefix=${nut_prefix-"%%PREFIX%%"}
20
21
. %%RC_SUBR%%
22
23
name="nut"
24
rcvar=`set_rcvar`
25
26
load_rc_config $name
27
28
required_dirs="%%STATEDIR%%"
29
required_files="${nut_prefix}/etc/nut/ups.conf ${nut_prefix}/etc/nut/upsd.conf ${nut_prefix}/etc/nut/upsd.users"
30
command="${nut_prefix}/sbin/upsd"
31
pidfile="%%STATEDIR%%/upsd.pid"
32
33
start_precmd="nut_prestart"
34
stop_postcmd="nut_poststop"
35
36
nut_prestart() {
37
	${nut_prefix}/libexec/nut/upsdrvctl start
38
}
39
40
nut_poststop() {
41
	${nut_prefix}/libexec/nut/upsdrvctl stop
42
}
43
44
run_rc_command "$1"
(-)files/nut.sh.sample (-49 lines)
Removed Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/sysutils/nut/files/nut.sh.sample,v 1.5 2005/07/14 08:21:12 sem Exp $
4
#
5
6
# PROVIDE: nut
7
# REQUIRE: NETWORKING
8
# BEFORE: LOGIN
9
# KEYWORD: shutdown
10
11
# Define these nut_* variables in one of these files:
12
#       /etc/rc.conf
13
#       /etc/rc.conf.local
14
#       /etc/rc.conf.d/nut
15
#
16
# DO NOT CHANGE THESE DEFAULT VALUES HERE
17
#
18
nut_enable=${nut_enable-"NO"}
19
nut_prefix=${nut_prefix-"%%PREFIX%%"}
20
nut_pidfile=${nut_pidfile-"%%STATEDIR%%/nut.pid"}
21
nut_upslog=${nut_upslog-"/var/log/ups.log"}
22
nut_upsloginterval=${nut_upsloginterval-"300"}
23
nut_upslogmail=${nut_upslogmail-"backups@localhost"}
24
25
. %%RC_SUBR%%
26
27
name="nut"
28
rcvar=`set_rcvar`
29
30
required_dirs="%%STATEDIR%%"
31
required_files="${nut_prefix}/etc/nut/ups.conf ${nut_prefix}/etc/nut/upsd.conf ${nut_prefix}/etc/nut/upsd.users ${nut_prefix}/etc/nut/upsmon.conf"
32
33
start_postcmd="nut_start"
34
stop_cmd="nut_stop"
35
36
nut_start() {
37
	${nut_prefix}/libexec/nut/upsdrvctl start
38
	${nut_prefix}/sbin/upsd
39
	${nut_prefix}/sbin/upsmon localhost
40
	${nut_prefix}/bin/upslog -s ${nut_upslogmail} -l ${nut_upslog} -i ${nut_upsloginterval}
41
}
42
43
nut_stop() {
44
	/usr/bin/killall upslog upsmon upsd
45
	${nut_prefix}/libexec/nut/upsdrvctl stop
46
}
47
48
load_rc_config $name
49
run_rc_command "$1"
(-)files/nut_upslog.sh.in (+36 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: nut_upslog
7
# REQUIRE: NETWORKING nut
8
# BEFORE: LOGIN
9
# KEYWORD: shutdown
10
11
# Define these nut_upslog* variables in one of these files:
12
#       /etc/rc.conf
13
#       /etc/rc.conf.local
14
#       /etc/rc.conf.d/nut_upslog
15
#
16
# DO NOT CHANGE THESE DEFAULT VALUES HERE
17
#
18
nut_upslog_enable=${nut_upslog_enable-"NO"}
19
nut_upslog_prefix=${nut_upslog_prefix-"%%PREFIX%%"}
20
nut_upslog_logfile=${nut_upslog_logfile-"/var/log/ups.log"}
21
nut_upslog_interval=${nut_upslog_interval-"300"}
22
nut_upslog_ups=${nut_upslog_ups-"myups@localhost"}
23
24
. %%RC_SUBR%%
25
26
name="nut_upslog"
27
rcvar=`set_rcvar`
28
29
load_rc_config $name
30
31
required_dirs="%%STATEDIR%%"
32
command="${nut_upslog_prefix}/bin/upslog"
33
pidfile="%%STATEDIR%%/upslog.pid"
34
nut_upslog_flags=${nut_upslog_flags-"-s ${nut_upslog_ups} -l ${nut_upslog_logfile} -i ${nut_upslog_interval}"}
35
36
run_rc_command "$1"
(-)files/nut_upsmon.sh.in (+34 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: nut_upsmon
7
# REQUIRE: NETWORKING nut
8
# BEFORE: LOGIN
9
# KEYWORD: shutdown
10
11
# Define these nut_upsmon* variables in one of these files:
12
#       /etc/rc.conf
13
#       /etc/rc.conf.local
14
#       /etc/rc.conf.d/nut_upsmon
15
#
16
# DO NOT CHANGE THESE DEFAULT VALUES HERE
17
#
18
nut_upsmon_enable=${nut_upsmon_enable-"NO"}
19
nut_upsmon_prefix=${nut_upsmon_prefix-"%%PREFIX%%"}
20
21
. %%RC_SUBR%%
22
23
name="nut_upsmon"
24
rcvar=`set_rcvar`
25
26
load_rc_config $name
27
28
required_dirs="%%STATEDIR%%"
29
required_files="${nut_upsmon_prefix}/etc/nut/upsmon.conf"
30
command="${nut_upsmon_prefix}/sbin/upsmon"
31
pidfile="%%STATEDIR%%/upsmon.pid"
32
nut_upsmon_flags=${nut_upsmon_flags-"localhost"}
33
34
run_rc_command "$1"
(-)files/patch-Makefile.in (-9 / +5 lines)
Lines 1-5 Link Here
1
--- Makefile.in.orig	Thu Jan 27 15:33:15 2005
1
--- Makefile.in.orig	Mon Oct 10 04:12:51 2005
2
+++ Makefile.in	Fri Jul  8 21:45:32 2005
2
+++ Makefile.in	Thu Feb 23 19:44:12 2006
3
@@ -90,6 +90,12 @@
3
@@ -90,6 +90,12 @@
4
 install-cgi-conf:
4
 install-cgi-conf:
5
 	@cd conf; $(MAKE) install-cgi-conf; cd ..;
5
 	@cd conf; $(MAKE) install-cgi-conf; cd ..;
Lines 13-31 Link Here
13
 install-lib:
13
 install-lib:
14
 	@cd clients; $(MAKE) install-lib; cd ..;
14
 	@cd clients; $(MAKE) install-lib; cd ..;
15
 	@cd man; $(MAKE) install-lib-man; cd ..;
15
 	@cd man; $(MAKE) install-lib-man; cd ..;
16
@@ -98,9 +104,8 @@
16
@@ -98,6 +104,7 @@
17
 usb: build-usb
17
 usb: build-usb
18
 
18
 
19
 build-usb:
19
 build-usb:
20
-	@cd drivers; $(MAKE) hidups; cd ..;
21
-	@cd drivers; $(MAKE) newhidups; cd ..;
22
-	@cd drivers; $(MAKE) energizerups; cd ..;
23
+	@cd common ; $(MAKE) || exit 1; cd ..;
20
+	@cd common ; $(MAKE) || exit 1; cd ..;
24
+	@cd drivers; $(MAKE) newhidups || exit 1; cd ..;
21
 	@cd drivers; $(MAKE) build-usb; cd ..;
25
 
22
 
26
 install-usb:
23
 install-usb:
27
 	@cd drivers; $(MAKE) install-usb; cd ..;
24
@@ -107,7 +114,8 @@
28
@@ -109,7 +114,8 @@
29
 snmp: build-snmp
25
 snmp: build-snmp
30
 
26
 
31
 build-snmp:
27
 build-snmp:
(-)files/patch-drivers_Makefile.in (+11 lines)
Added Link Here
1
--- drivers/Makefile.in.orig	Thu Feb 23 19:38:14 2006
2
+++ drivers/Makefile.in	Thu Feb 23 19:38:43 2006
3
@@ -8,7 +8,7 @@
4
 
5
 # other definitions
6
 CC	= @CC@
7
-CFLAGS	= -I../include @CFLAGS@
8
+CFLAGS	= -I../include @CFLAGS@ @LIBUSB_CFLAGS@
9
 PROGS	= bestups fentonups apcsmart everups belkin masterguard powercom \
10
 	  cyberpower tripplite victronups genericups mge-utalk bestuferrups \
11
 	  isbmex etapro liebert sms esupssmart tripplitesu blazer safenet \

Return to bug 95015