1 Summary: UPS management software for APC UPS models
2 Summary(pl): Oprogramowanie do obs³ugi UPS-ów APC
6 Copyright: (c) 1999 APC, inc.
7 Group: Applications/System
8 Group(de): Applikationen/System
9 Group(pl): Aplikacje/System
10 Source0: ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/453/pcplus_453_caldera.tar
11 Source1: ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/453/pc453ug.pdf
13 Source3: %{name}-xpowerchute.sh
14 Source4: %{name}-Config.sh
15 Source5: %{name}-powerchute.ini
16 Source6: %{name}-powerchute.ini_templ
17 Source7: ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/settings.pdf
18 Patch0: %{name}-fix-sh.patch
20 ExclusiveArch: %{ix86}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 This program allows users to safely shut down their system in response
26 to power failures and other power events. It also allows users to
27 configure and manage UPS models.
29 Please note that /usr/lib/powerchute/Config.sh should be run in order
30 to configure PowerChute plus.
33 Ten program pozwala u¿ytkownikom bezpiecznie wy³±czyæ system w
34 przypadku awarii zasilania. Pozwala tak¿e na skonfigurowanie UPS.
36 Uwaga: aby skonfigurowaæ PowerChute Plus nale¿y uruchomiæ
37 /usr/lib/powerchute/Config.sh .
41 for i in BI_LINUX CI_LINUX COMMON FI_LINUX HELP ; do
47 # No build, binary package
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/powerchute} \
52 $RPM_BUILD_ROOT/etc/rc.d/init.d \
53 $RPM_BUILD_ROOT%{_prefix}/X11R6/{bin,lib/X11/{app-defaults,uid}}
57 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsd
58 install %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/xpowerchute
59 install %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/powerchute/Config.sh
60 install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/powerchute/powerchute.ini_templ
61 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/powerchute.ini
63 ln -sf %{_sysconfdir}/powerchute.ini $RPM_BUILD_ROOT%{_libdir}/powerchute/
65 install _upsd $RPM_BUILD_ROOT%{_sbindir}/upsd
67 install _xpwrchute $RPM_BUILD_ROOT%{_libdir}/powerchute
68 install addpage.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
69 install apacheshut $RPM_BUILD_ROOT%{_libdir}/powerchute
70 install bkupsd $RPM_BUILD_ROOT%{_libdir}/powerchute
71 install dialpager.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
72 install killbk.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
73 install killpc.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
74 install machine_id $RPM_BUILD_ROOT%{_libdir}/powerchute
75 install mailer.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
76 install notifier.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
77 install pcshut.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
78 install portcheck $RPM_BUILD_ROOT%{_libdir}/powerchute
79 install ttycheck $RPM_BUILD_ROOT%{_libdir}/powerchute
80 install ups_adjust $RPM_BUILD_ROOT%{_libdir}/powerchute
81 install upsoff $RPM_BUILD_ROOT%{_libdir}/powerchute
82 install upswrite $RPM_BUILD_ROOT%{_libdir}/powerchute
83 install wall.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
84 install what_os.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
85 install pwrchute.uid $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/uid/
87 install pwrchute.ad $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/app-defaults/pwrchute
89 ln -sf /var/run/upsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute/
90 ln -sf /var/run/bkupsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute/
92 gzip -9nf language.txt readme_apache
95 rm -rf $RPM_BUILD_ROOT
98 if ! id -g pwrchute > /dev/null 2>&1 ; then
99 %{_sbindir}/groupadd -g 68 pwrchute
101 if ! id -u pwrchute > /dev/null 2>&1 ; then
102 %{_sbindir}/useradd -u 68 -g 68 -d /dev/null -s /bin/false -c "PowerChute Plus" pwrchute
106 /sbin/chkconfig --add upsd
107 if [ -f /var/lock/subsys/upsd ]; then
108 /etc/rc.d/init.d/upsd restart 1>&2
110 echo "Type \"/etc/rc.d/init.d/upsd start\" to start UPSd server" 1>&2
112 cd %{_libdir}/powerchute
114 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
115 echo "Remember to set the password for pwrchute account"
118 if [ "$1" = "0" ]; then
119 if [ -f /var/lock/subsys/upsd ]; then
120 /etc/rc.d/init.d/upsd stop 1>&2
122 /sbin/chkconfig --del upsd
126 if [ "$1" = "0" ]; then
127 %{_sbindir}/userdel pwrchute
128 %{_sbindir}/groupdel pwrchute
132 %defattr(644,root,root,755)
133 %doc help/* apachesh.pdf language.txt.gz readme_apache.gz pc453ug.pdf settings.pdf
134 %attr(754,root,root) /etc/rc.d/init.d/upsd
135 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/powerchute.ini
136 %attr(755,root,root) %{_sbindir}/upsd
137 %attr(755,root,root) %{_libdir}/powerchute/Config.sh
138 %attr(755,root,root) %{_libdir}/powerchute/_xpwrchute
139 %attr(755,root,root) %{_libdir}/powerchute/addpage.sh
140 %attr(755,root,root) %{_libdir}/powerchute/apacheshut
141 %attr(755,root,root) %{_libdir}/powerchute/bkupsd
142 %attr(755,root,root) %{_libdir}/powerchute/dialpager.sh
143 %attr(755,root,root) %{_libdir}/powerchute/killbk.sh
144 %attr(755,root,root) %{_libdir}/powerchute/killpc.sh
145 %attr(755,root,root) %{_libdir}/powerchute/machine_id
146 %attr(755,root,root) %{_libdir}/powerchute/mailer.sh
147 %attr(755,root,root) %{_libdir}/powerchute/notifier.sh
148 %attr(755,root,root) %{_libdir}/powerchute/pcshut.sh
149 %attr(755,root,root) %{_libdir}/powerchute/portcheck
150 %attr(755,root,root) %{_libdir}/powerchute/ttycheck
151 %attr(755,root,root) %{_libdir}/powerchute/ups_adjust
152 %attr(755,root,root) %{_libdir}/powerchute/upsoff
153 %attr(755,root,root) %{_libdir}/powerchute/upswrite
154 %attr(755,root,root) %{_libdir}/powerchute/wall.sh
155 %attr(755,root,root) %{_libdir}/powerchute/what_os.sh
156 %{_libdir}/powerchute/powerchute.ini
157 %{_libdir}/powerchute/powerchute.ini_templ
158 %attr(755,root,root) %{_prefix}/X11R6/bin/xpowerchute
159 %{_prefix}/X11R6/lib/X11/app-defaults/*
160 %{_prefix}/X11R6/lib/X11/uid/*
161 %config(noreplace) %verify(not size mtime md5) %{_libdir}/powerchute/upsd.pid
162 %config(noreplace) %verify(not size mtime md5) %{_libdir}/powerchute/bkupsd.pid