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