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