]> git.pld-linux.org Git - packages/nut.git/blob - nut.spec
- release 1,
[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.0
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:        ups.init
12 Patch0:         %{name}-DESTDIR.patch
13 Patch1:         %{name}-ever.patch
14 URL:            http://www.exploits.org/nut/
15 BuildRequires:  gd-devel
16 BuildRequires:  libpng-devel
17 Prereq:         rc-scripts
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _sysconfdir     /etc/ups
21
22 %description
23 These programs are part of a developing project to monitor the
24 assortment of UPSes that are found out there in the field. Many models
25 have serial serial ports of some kind that allow some form of state
26 checking. This capability has been harnessed where possible to allow
27 for safe shutdowns, live status tracking on web pages, and more.
28
29 %package client
30 Summary:        Multi-vendor UPS Monitoring Project Client Utilities
31 Group:          Applications/System
32 Group(de):      Applikationen/System
33 Group(pl):      Aplikacje/System
34
35 %description client
36 This package includes the client utilities that are required to
37 monitor a ups that the client host is plugged into but monitored via
38 serial cable by another host on the network....
39
40 %package cgi
41 Summary:        Multi-vendor UPS Monitoring Project Server - CGI utils
42 Group:          Applications/System
43 Group(de):      Applikationen/System
44 Group(pl):      Aplikacje/System
45 Requires:       %{name} = %{version}
46
47 %description cgi
48 These programs are part of a developing project to monitor the
49 assortment of UPSes that are found out there in the field. Many models
50 have serial serial ports of some kind that allow some form of state
51 checking. This capability has been harnessed where possible to allow
52 for safe shutdowns, live status tracking on web pages, and more.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57 %patch1 -p1
58
59 %build
60 %configure \
61         --with-statepath=/var/lib/ups \
62         --with-uid=99 \
63         --with-gid=99
64 %{__make} all cgi
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},/var/lib/ups}
69
70 %{__make} install install-cgi \
71         DESTDIR=$RPM_BUILD_ROOT \
72         CGIPATH=/home/httpd/cgi-bin
73
74 install scripts/RedHat-6.0/ups-config $RPM_BUILD_ROOT/etc/sysconfig/ups
75 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
76
77 (
78 cd $RPM_BUILD_ROOT%{_sysconfdir}
79 for i in `ls *`
80 do
81         mv $i `basename $i .sample`
82 done
83 )
84
85 gzip -9nf CREDITS README docs/{FAQ,Changes*,*.txt,cables/*}
86
87 %post
88 /sbin/chkconfig --add ups
89 if [ -f /var/lock/subsys/ups ]; then
90         /etc/rc.d/init.d/ups restart >&2
91 else
92         echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
93 fi
94
95 %preun
96 if [ "$1" = "0" ]; then
97         if [ -f /var/lock/subsys/ups ]; then
98                 /etc/rc.d/init.d/ups stop >&2
99         fi
100         /sbin/chkconfig --del ups
101 fi
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %files
107 %defattr(644,root,root,755)
108 %doc *.gz docs/{,cables}/*.gz
109 %attr(755,root,root) %{_bindir}/apcsmart
110 %attr(755,root,root) %{_bindir}/bestups
111 %attr(755,root,root) %{_bindir}/fentonups
112 %attr(755,root,root) %{_bindir}/genericups
113 %attr(755,root,root) %{_bindir}/optiups
114 %attr(755,root,root) %{_bindir}/ups-trust425+625
115
116 %attr(755,root,root) %{_bindir}/belkin
117 %attr(755,root,root) %{_bindir}/bestfort
118 %attr(755,root,root) %{_bindir}/bestuferrups
119 %attr(755,root,root) %{_bindir}/engetron
120 %attr(755,root,root) %{_bindir}/ipt-anzen
121 %attr(755,root,root) %{_bindir}/mge-ellipse
122 %attr(755,root,root) %{_bindir}/mgeups
123 %attr(755,root,root) %{_bindir}/multilink
124 %attr(755,root,root) %{_bindir}/mustekups
125 %attr(755,root,root) %{_bindir}/powercom
126 %attr(755,root,root) %{_bindir}/sec
127 %attr(755,root,root) %{_bindir}/toshiba1500
128 %attr(755,root,root) %{_bindir}/upseyeux
129 %attr(755,root,root) %{_bindir}/victronups
130 %attr(755,root,root) %{_bindir}/everups
131
132 %attr(755,root,root) %{_sbindir}/upsd
133 %attr(755,root,root) %{_bindir}/upslog
134 %config(noreplace) /etc/sysconfig/ups
135 %attr(754,root,root) /etc/rc.d/init.d/ups
136 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
137 %{_mandir}/man8/*
138 %dir %attr(775,root,nobody) /var/lib/ups
139
140 %files client
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_bindir}/upsc
143 %attr(755,root,root) %{_bindir}/upsct
144 %attr(755,root,root) %{_bindir}/upsct2
145 %attr(755,root,root) %{_sbindir}/upsmon
146 %attr(755,root,root) %{_sbindir}/upssched
147 %config(noreplace) %{_sysconfdir}/hosts.conf
148 %config(noreplace) %{_sysconfdir}/multimon.conf
149 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
150
151 %files cgi
152 %defattr(644,root,root,755)
153 %attr(755,root,root) /home/httpd/cgi-bin/*.cgi
154 #%attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsset.passwd
This page took 0.035286 seconds and 4 git commands to generate.