]> git.pld-linux.org Git - packages/nut.git/blob - nut.spec
- updated to 0.45.2
[packages/nut.git] / nut.spec
1 Summary:        Network UPS Tools
2 Summary(pl):    Sieciowe narzêdzie do UPS-ów
3 Name:           nut
4 Version:        0.45.2
5 Release:        1
6 License:        GPL
7 Group:          Applications/System
8 Group(de):      Applikationen/System
9 Group(pl):      Aplikacje/System
10 Source0:        http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
11 Source1:        %{name}.init
12 Source2:        %{name}.sysconfig
13 Source3:        %{name}-upsmon.init
14 Patch0:         %{name}-DESTDIR.patch
15 Patch1:         %{name}-client.patch
16 Patch2:         %{name}-lookup_for_libgd_ac_fix.patch
17 URL:            http://www.exploits.org/nut/
18 BuildRequires:  autoconf
19 BuildRequires:  gd-devel >= 2.0.1
20 BuildRequires:  libpng-devel
21 Prereq:         rc-scripts
22 Prereq:         /sbin/chkconfig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _sysconfdir     /etc/ups
26
27 %description
28 These programs are part of a developing project to monitor the
29 assortment of UPSes that are found out there in the field. Many models
30 have serial serial ports of some kind that allow some form of state
31 checking. This capability has been harnessed where possible to allow
32 for safe shutdowns, live status tracking on web pages, and more.
33
34 %description -l pl
35 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
36 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
37 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
38 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
39
40 %package client
41 Summary:        Multi-vendor UPS Monitoring Project Client Utilities
42 Summary(pl):    Narzêdzia klienckie do monitorowania UPS-ów
43 Group:          Applications/System
44 Group(de):      Applikationen/System
45 Group(pl):      Aplikacje/System
46 Prereq:         rc-scripts
47 Prereq:         /sbin/chkconfig
48
49 %description client
50 This package includes the client utilities that are required to
51 monitor a UPS that the client host is plugged into but monitored via
52 serial cable by another host on the network....
53
54 %description client -l pl
55 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
56 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
57 UPS-a jest pod³±czony do innego komputera w sieci.
58
59 %package cgi
60 Summary:        Multi-vendor UPS Monitoring Project Server - CGI utils
61 Summary(pl):    Narzêdzia CGI do monitorowania UPS-ów
62 Group:          Applications/System
63 Group(de):      Applikationen/System
64 Group(pl):      Aplikacje/System
65
66 %description cgi
67 These programs are part of a developing project to monitor the
68 assortment of UPSes that are found out there in the field. Many models
69 have serial serial ports of some kind that allow some form of state
70 checking. This capability has been harnessed where possible to allow
71 for safe shutdowns, live status tracking on web pages, and more.
72 This package contains CGI utils.
73
74 %description cgi -l pl
75 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
76 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
77 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
78 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
79 Ten pakiet zawiera narzêdzia CGI.
80
81 %prep
82 %setup -q
83 %patch0 -p1
84 %patch1 -p1
85 %patch2 -p1
86
87 %build
88 autoconf
89 %configure \
90         --with-statepath=/var/lib/ups \
91         --with-uid=nobody \
92         --with-group=ttyS
93 %{__make} all cgi
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},/var/lib/ups}
98
99 %{__make} install install-cgi \
100         DESTDIR=$RPM_BUILD_ROOT \
101         CGIPATH=/home/httpd/cgi-bin
102
103 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
104 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
105 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
106 install conf/ups.conf $RPM_BUILD_ROOT%{_sysconfdir}/ups.conf
107
108 gzip -9nf CREDITS README docs/{FAQ,Changes*,*.txt,cables/*}
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 #%pre
114 #if [ -n "`id -u ups 2>/dev/null`" ]; then
115 #       if [ "`id -u ups`" != "68" ]; then
116 #               echo "Warning: user ups does not have uid=68. Correct this before installing NUT" 1>&2
117 #               exit 1
118 #       fi
119 #else
120 #       /usr/sbin/useradd -u 68 -r -d /var/lib/ups -s /bin/sh -c "Network UPS Tools User" -g ttyS ups 1>&2
121 #fi
122
123 %post
124 /sbin/chkconfig --add ups
125 if [ -f /var/lock/subsys/ups ]; then
126         /etc/rc.d/init.d/ups restart >&2
127 else
128         echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
129 fi
130
131 %post client
132 /sbin/chkconfig --add upsmon
133 if [ -f /var/lock/subsys/upsmon ]; then
134         /etc/rc.d/init.d/upsmon restart >&2
135 else
136         echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
137 fi
138
139 %preun
140 if [ "$1" = "0" ]; then
141         if [ -f /var/lock/subsys/ups ]; then
142                 /etc/rc.d/init.d/ups stop >&2
143         fi
144         /sbin/chkconfig --del ups
145 fi
146
147 #%postun
148 #if [ "$1" = "0" ]; then
149 #       userdel ups 2>&1
150 #fi
151
152 %preun client
153 if [ "$1" = "0" ]; then
154         if [ -f /var/lock/subsys/upsmon ]; then
155                 /etc/rc.d/init.d/upsmon stop >&2
156         fi
157         /sbin/chkconfig --del upsmon
158 fi
159         
160 %files
161 %defattr(644,root,root,755)
162 %doc *.gz docs/{,cables}/*.gz
163 %attr(755,root,root) %{_bindir}/aeg
164 %attr(755,root,root) %{_bindir}/apcsmart
165 %attr(755,root,root) %{_bindir}/belkin
166 %attr(755,root,root) %{_bindir}/bestfort
167 %attr(755,root,root) %{_bindir}/bestuferrups
168 %attr(755,root,root) %{_bindir}/bestups
169 %attr(755,root,root) %{_bindir}/engetron
170 %attr(755,root,root) %{_bindir}/everups
171 %attr(755,root,root) %{_bindir}/fentonups
172 %attr(755,root,root) %{_bindir}/genericups
173 %attr(755,root,root) %{_bindir}/ipt-anzen
174 %attr(755,root,root) %{_bindir}/mge-ellipse
175 %attr(755,root,root) %{_bindir}/mgeups
176 %attr(755,root,root) %{_bindir}/masterguard
177 %attr(755,root,root) %{_bindir}/multilink
178 %attr(755,root,root) %{_bindir}/mustekups
179 %attr(755,root,root) %{_bindir}/newapc
180 %attr(755,root,root) %{_bindir}/optiups
181 %attr(755,root,root) %{_bindir}/powercom
182 %attr(755,root,root) %{_bindir}/sec
183 %attr(755,root,root) %{_bindir}/sms
184 %attr(755,root,root) %{_bindir}/toshiba1500
185 %attr(755,root,root) %{_bindir}/upscmd
186 %attr(755,root,root) %{_bindir}/upsdrvctl
187 %attr(755,root,root) %{_bindir}/upseyeux
188 %attr(755,root,root) %{_bindir}/ups-trust425+625
189 %attr(755,root,root) %{_sbindir}/upsd
190 %attr(755,root,root) %{_bindir}/upslog
191 %attr(755,root,root) %{_bindir}/victronups
192 %config(noreplace) /etc/sysconfig/ups
193 %attr(754,root,root) /etc/rc.d/init.d/ups
194 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
195 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/ups.conf
196 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.users
197 %{_mandir}/man5/*
198 %{_mandir}/man8/*
199 %dir %attr(750,nobody,root) /var/lib/ups
200
201 %files client
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_bindir}/upsc
204 %attr(755,root,root) %{_bindir}/upsct
205 %attr(755,root,root) %{_bindir}/upsct2
206 %attr(755,root,root) %{_sbindir}/upsmon
207 %attr(755,root,root) %{_sbindir}/upssched
208 %attr(755,root,root) %{_sbindir}/upssched-cmd
209 %attr(754,root,root) /etc/rc.d/init.d/upsmon
210 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
211 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upssched.conf
212
213 %files cgi
214 %defattr(644,root,root,755)
215 %attr(755,root,root) /home/httpd/cgi-bin/*.cgi
216 %config(noreplace) %{_sysconfdir}/hosts.conf
217 %config(noreplace) %{_sysconfdir}/multimon.conf
218 %config(noreplace) %{_sysconfdir}/upsset.conf
This page took 0.072409 seconds and 4 git commands to generate.