]>
Commit | Line | Data |
---|---|---|
256539ca | 1 | Summary: Multi-vendor UPS Monitoring Project |
2 | Name: nut | |
3 | Version: 0.42.2 | |
4 | Release: 1 | |
5 | Group: Applications/System | |
6 | Source: http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz | |
7 | Copyright: GPL | |
8 | BuildRoot: /var/tmp/%{name}-%{version}-root | |
9 | Requires: nut-client | |
10 | Prereq: chkconfig fileutils | |
11 | ||
12 | # remove chown /var/state so that we don't have to build rpms as root. | |
13 | Patch01: nut-makefile-rpm-%{version}.patch | |
14 | ||
15 | ||
16 | %description | |
17 | These programs are part of a developing project to monitor the assortment | |
18 | of UPSes that are found out there in the field. Many models have serial | |
19 | serial ports of some kind that allow some form of state checking. This | |
20 | capability has been harnessed where possible to allow for safe shutdowns, | |
21 | live status tracking on web pages, and more. | |
22 | ||
23 | %package client | |
24 | Group: Applications/System | |
25 | Summary: Multi-vendor UPS Monitoring Project Client Utilities | |
26 | ||
27 | %description client | |
28 | This package includes the client utilities that are required to monitor a | |
29 | ups that the client host is plugged into but monitored via serial cable by | |
30 | another host on the network.... | |
31 | ||
32 | %package nocgi | |
33 | Group: Applications/System | |
34 | Summary: Multi-vendor UPS Monitoring Project Server w/o CGI utils | |
35 | ||
36 | %description nocgi | |
37 | These programs are part of a developing project to monitor the assortment | |
38 | of UPSes that are found out there in the field. Many models have serial | |
39 | serial ports of some kind that allow some form of state checking. This | |
40 | capability has been harnessed where possible to allow for safe shutdowns, | |
41 | live status tracking on web pages, and more. | |
42 | ||
43 | %prep | |
44 | %setup | |
45 | %patch01 -p0 | |
46 | ||
47 | ||
48 | %build | |
49 | ./configure \ | |
50 | --prefix=/usr \ | |
51 | --sysconfdir=/etc/ups \ | |
52 | --with-statepath=/var/state/ups \ | |
53 | --with-uid=99 \ | |
54 | --with-gid=99 | |
55 | make | |
56 | ||
57 | %install | |
58 | rm -rf %{buildroot} | |
59 | make CONFPATH=%{buildroot}/etc/ups BASEPATH=%{buildroot}/usr STATEPATH=%{buildroot}/var/state/ups install | |
60 | make CONFPATH=%{buildroot}/etc/ups BASEPATH=%{buildroot}/usr STATEPATH=%{buildroot}/var/state/ups install-cgi | |
61 | mkdir -p %{buildroot}/etc/sysconfig | |
62 | cp scripts/RedHat-6.0/ups-config %{buildroot}/etc/sysconfig/ups | |
63 | ||
64 | mkdir -p %{buildroot}/var/state/ups | |
65 | ||
66 | # install SYSV init stuff | |
67 | mkdir -p %{buildroot}/etc/rc.d/init.d | |
68 | cp scripts/RedHat-6.0/ups %{buildroot}/etc/rc.d/init.d | |
69 | ||
70 | %preun client | |
71 | /etc/rc.d/init.d/ups stop | |
72 | ||
73 | %postun | |
74 | echo "You may want to chown root:tty /dev/ttyS#, where # is the \n" | |
75 | echo "number of the serial port that the UPS was connected to... \n" | |
76 | ||
77 | %postun client | |
78 | /sbin/chkconfig --del ups | |
79 | ||
80 | %post client | |
81 | /sbin/chkconfig --add ups | |
82 | ||
83 | %clean | |
84 | rm -rf %{buildroot} | |
85 | ||
86 | %files | |
87 | %defattr(-,root,root) | |
88 | %doc COPYING CREDITS Changes QUICKSTART README docs | |
89 | /usr/bin/apcsmart | |
90 | /usr/bin/bestups | |
91 | /usr/bin/fentonups | |
92 | /usr/bin/genericups | |
93 | /usr/bin/optiups | |
94 | /usr/bin/ups-trust425+625 | |
95 | /usr/bin/upsd | |
96 | /usr/bin/upslog | |
97 | /usr/cgi-bin/multimon.cgi | |
98 | /usr/cgi-bin/upsimage.cgi | |
99 | /usr/cgi-bin/upsset.cgi | |
100 | /usr/cgi-bin/upsstats.cgi | |
101 | ||
102 | %files client | |
103 | %defattr(-,root,root) | |
104 | %config(noreplace) /etc/ups/hosts.conf | |
105 | %config(noreplace) /etc/ups/multimon.conf | |
106 | %config(noreplace) %attr(600,root,root) /etc/ups/upsd.conf | |
107 | %config(noreplace) %attr(600,root,root) /etc/ups/upsmon.conf | |
108 | %config(noreplace) %attr(644,root,root) /etc/sysconfig/ups | |
109 | %dir %attr(755,nobody,nobody) /var/state/ups | |
110 | %attr(755,root,root) /etc/rc.d/init.d/ups | |
111 | /usr/bin/upsc | |
112 | /usr/bin/upsct | |
113 | /usr/bin/upsct2 | |
114 | /usr/bin/upsmon | |
115 | ||
116 | %files nocgi | |
117 | %defattr(-,root,root) | |
118 | %doc COPYING CREDITS Changes QUICKSTART README docs | |
119 | /usr/bin/apcsmart | |
120 | /usr/bin/bestups | |
121 | /usr/bin/fentonups | |
122 | /usr/bin/genericups | |
123 | /usr/bin/optiups | |
124 | /usr/bin/ups-trust425+625 | |
125 | /usr/bin/upsd | |
126 | /usr/bin/upslog | |
127 | ||
128 | ||
129 | %changelog | |
130 | * Thu Jan 20 2000 <bo-rpm@vircio.com> (0.42.2-1) | |
131 | - Updated package to new release | |
132 | - Dropped bestups patch since that is fixed in 0.42.2 | |
133 | ||
134 | * Sat Dec 18 1999 <bo-rpm@vircio.com> (0.42.1-4) | |
135 | - Package now uses chkconfig | |
136 | ||
137 | * Sat Dec 18 1999 <bo-rpm@vircio.com> (0.42.1-3) | |
138 | - applied an improved patch to deal with the | |
139 | bestups string length issue. | |
140 | ||
141 | * Sat Dec 11 1999 <bo-rpm@vircio.com> (0.42.1-1) | |
142 | - fixed string length in bestups.c line 279. | |
143 | ||
144 | * Sat Dec 11 1999 <bo-rpm@vircio.com> (0.42.1-1) | |
145 | - upgraded package to 0.42.1 from 0.42.0 | |
146 | ||
147 | * Mon Dec 6 1999 <bo-rpm@vircio.com> (0.42.0-8) | |
148 | - added requirement of nut-client for nut. | |
149 | ||
150 | * Mon Dec 6 1999 <bo-rpm@vircio.com> (0.42.0-7) | |
151 | - removed overlapping files between the nut and nut-client rpms | |
152 | ||
153 | * Mon Nov 23 1999 <bo-rpm@vircio.com> (0.42.0-6) | |
154 | - stop ups before uninstalling | |
155 | ||
156 | * Mon Nov 23 1999 <bo-rpm@vircio.com> (0.42.0-5) | |
157 | - build against gd 1.6.3 | |
158 | ||
159 | * Thu Nov 03 1999 <bo-rpm@vircio.com> (0.42.0-4) | |
160 | - Initial build of nut (well almost). | |
161 | - Removed chmod from the make file so that the package | |
162 | does not have to be built as root..... |