]> git.pld-linux.org Git - packages/nut.git/blob - nut.spec
fcf93b30ab2950a34f7ebae4dbaf451e6cf405d6
[packages/nut.git] / nut.spec
1 Summary:        Network UPS Tools
2 Name:           nut
3 Version:        0.43.0
4 Release:        1
5 License:        GPL
6 Group:          Utilities/System
7 Group(pl):      Narzêdzia/System
8 Source:         http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
9 URL:            http://www.exploits.org/nut/
10 Prereq:         chkconfig
11 Prereq:         fileutils
12 Requires:       nut-client
13 BuildRoot:      /tmp/%{name}-%{version}-root
14
15 %define         _sysconfdir     /etc/ups
16
17 %description
18 These programs are part of a developing project to monitor the assortment
19 of UPSes that are found out there in the field. Many models have serial
20 serial ports of some kind that allow some form of state checking. This
21 capability has been harnessed where possible to allow for safe shutdowns,
22 live status tracking on web pages, and more.
23
24 %package client
25 Summary:        Multi-vendor UPS Monitoring Project Client Utilities
26 Group:          Utilities/System
27 Group(pl):      Narzêdzia/System
28
29 %description client
30 This package includes the client utilities that are required to monitor a
31 ups that the client host is plugged into but monitored via serial cable by
32 another host on the network....
33
34 %package cgi
35 Summary:        Multi-vendor UPS Monitoring Project Server - CGI utils
36 Group:          Utilities/System
37 Group(pl):      Narzêdzia/System
38
39 %description cgi
40 These programs are part of a developing project to monitor the assortment
41 of UPSes that are found out there in the field. Many models have serial
42 serial ports of some kind that allow some form of state checking. This
43 capability has been harnessed where possible to allow for safe shutdowns,
44 live status tracking on web pages, and more.
45
46 %prep
47 %setup -q
48
49 %build
50 LDFLAGS="-s"; export LDFLAGS
51 %configure \
52         --with-statepath=/var/state/ups \
53         --with-uid=99 \
54         --with-gid=99
55 make
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},var/state/ups}
60 make CONFPATH=$RPM_BUILD_ROOT%{_sysconfdir}/ups BASEPATH=$RPM_BUILD_ROOT%{_prefix} STATEPATH=$RPM_BUILD_ROOT/var/state/ups install
61 make CONFPATH=$RPM_BUILD_ROOT%{_sysconfdir}/ups BASEPATH=$RPM_BUILD_ROOT%{_prefix} STATEPATH=$RPM_BUILD_ROOT/var/state/ups install-cgi
62
63 install scripts/RedHat-6.0/ups-config $RPM_BUILD_ROOT/etc/sysconfig/ups
64 install scripts/RedHat-6.0/ups $RPM_BUILD_ROOT/etc/rc.d/init.d
65
66 %preun client
67 /etc/rc.d/init.d/ups stop
68
69 %postun
70 echo "You may want to chown root:tty /dev/ttyS#, where # is the \n"
71 echo "number of the serial port that the UPS was connected to... \n"
72
73 %postun client
74 /sbin/chkconfig --del ups
75
76 %post client
77 /sbin/chkconfig --add ups
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc CREDITS Changes QUICKSTART README docs
85 %attr(755,root,root) %{_bindir}/apcsmart
86 %attr(755,root,root) %{_bindir}/bestups
87 %attr(755,root,root) %{_bindir}/fentonups
88 %attr(755,root,root) %{_bindir}/genericups
89 %attr(755,root,root) %{_bindir}/optiups
90 %attr(755,root,root) %{_bindir}/ups-trust425+625
91 %attr(755,root,root) %{_bindir}/upsd
92 %attr(755,root,root) %{_bindir}/upslog
93
94 %files client
95 %defattr(644,root,root,755)
96 %config(noreplace) %{_sysconfdir}/ups/hosts.conf
97 %config(noreplace) %{_sysconfdir}/ups/multimon.conf
98 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
99 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
100 %attr(644,root,root) %config(noreplace) /etc/sysconfig/ups
101 %attr(754,root,root) /etc/rc.d/init.d/ups
102 %attr(755,root,root) %{_bindir}/upsc
103 %attr(755,root,root) %{_bindir}/upsct
104 %attr(755,root,root) %{_bindir}/upsct2
105 %attr(755,root,root) %{_bindir}/upsmon
106 %dir %attr(755,nobody,nobody) /var/state/ups
107
108 %files cgi
109 %defattr(644,root,root,755)
110 %doc CREDITS Changes QUICKSTART README docs
111 %{_prefix}/cgi-bin/multimon.cgi
112 %{_prefix}/cgi-bin/upsimage.cgi
113 %{_prefix}/cgi-bin/upsset.cgi
114 %{_prefix}/cgi-bin/upsstats.cgi
This page took 0.026875 seconds and 2 git commands to generate.