]> git.pld-linux.org Git - packages/nut.git/blob - nut.spec
- updated for 0.44.2.
[packages/nut.git] / nut.spec
1 Summary:        Network UPS Tools
2 Name:           nut
3 Version:        0.44.1
4 Release:        2
5 License:        GPL
6 Group:          Utilities/System
7 Group(pl):      Narzêdzia/System
8 Source0:        http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
9 Source1:        ups.init
10 Patch0:         %{name}-DESTDIR.patch
11 URL:            http://www.exploits.org/nut/
12 BuildRequires:  gd-devel
13 BuildRequires:  libpng-devel
14 Prereq:         chkconfig
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         _sysconfdir     /etc/ups
18
19 %description
20 These programs are part of a developing project to monitor the assortment
21 of UPSes that are found out there in the field. Many models have serial
22 serial ports of some kind that allow some form of state checking. This
23 capability has been harnessed where possible to allow for safe shutdowns,
24 live status tracking on web pages, and more.
25
26 %package client
27 Summary:        Multi-vendor UPS Monitoring Project Client Utilities
28 Group:          Utilities/System
29 Group(pl):      Narzêdzia/System
30
31 %description client
32 This package includes the client utilities that are required to monitor a
33 ups that the client host is plugged into but monitored via serial cable by
34 another host on the network....
35
36 %package cgi
37 Summary:        Multi-vendor UPS Monitoring Project Server - CGI utils
38 Group:          Utilities/System
39 Group(pl):      Narzêdzia/System
40 Requires:       %{name} = %{version}
41
42 %description cgi
43 These programs are part of a developing project to monitor the assortment
44 of UPSes that are found out there in the field. Many models have serial
45 serial ports of some kind that allow some form of state checking. This
46 capability has been harnessed where possible to allow for safe shutdowns,
47 live status tracking on web pages, and more.
48
49 %prep
50 %setup -q
51 %patch -p1
52
53 %build
54 %configure \
55         --with-statepath=/var/lib/ups \
56         --with-uid=99 \
57         --with-gid=99
58 %{__make}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},%{_mandir}/man8,/var/lib/ups}
63
64 %{__make} install install-cgi \
65         DESTDIR=$RPM_BUILD_ROOT \
66         CGIPATH=/home/httpd/cgi-bin
67
68 install scripts/RedHat-6.0/ups-config $RPM_BUILD_ROOT/etc/sysconfig/ups
69 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
70
71 install man/powercom.8 $RPM_BUILD_ROOT%{_mandir}/man8
72
73 gzip -9nf CREDITS Changes QUICKSTART README docs/{FAQ,Changes*,*.txt,cables/*}
74
75 %post
76 /sbin/chkconfig --add ups
77 if [ -f /var/lock/subsys/ups ]; then
78         /etc/rc.d/init.d/ups restart >&2
79 else
80         echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
81 fi
82
83 %preun
84 if [ "$1" = "0" ]; then
85         if [ -f /var/lock/subsys/ups ]; then
86                 /etc/rc.d/init.d/ups stop >&2
87         fi
88         /sbin/chkconfig --del ups
89 fi
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %files
95 %defattr(644,root,root,755)
96 %doc *.gz docs/{,cables}/*.gz
97 %attr(755,root,root) %{_bindir}/apcsmart
98 %attr(755,root,root) %{_bindir}/bestups
99 %attr(755,root,root) %{_bindir}/fentonups
100 %attr(755,root,root) %{_bindir}/genericups
101 %attr(755,root,root) %{_bindir}/optiups
102 %attr(755,root,root) %{_bindir}/ups-trust425+625
103 %attr(755,root,root) %{_bindir}/upsd
104 %attr(755,root,root) %{_bindir}/upslog
105 %config(noreplace) /etc/sysconfig/ups
106 %attr(754,root,root) /etc/rc.d/init.d/ups
107 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
108 %{_mandir}/man8/*
109
110 %files client
111 %defattr(644,root,root,755)
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 %config(noreplace) %{_sysconfdir}/hosts.conf
117 %config(noreplace) %{_sysconfdir}/multimon.conf
118 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
119 %dir %attr(775,root,nobody) /var/lib/ups
120
121 %files cgi
122 %defattr(644,root,root,755)
123 %attr(755,root,root) /home/httpd/cgi-bin/*.cgi
124 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsset.passwd
This page took 0.037603 seconds and 3 git commands to generate.