1 Summary: UPS management software for APC UPS models
5 Copyright: (c) 1999 APC, inc.
6 Group: Applications/System
7 Group(de): Applikationen/System
8 Group(pl): Aplikacje/System
9 Source0: ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/4521/pc4521_glibc.tar
10 Source1: ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/4521/pclinxug.pdf
12 Source3: %{name}-xpowerchute.sh
13 Source4: %{name}-Config.sh
14 Source5: %{name}-powerchute.ini
15 Source6: %{name}-powerchute.ini_templ
16 Patch0: %{name}-fix-sh.patch
18 ExclusiveArch: %{ix86}
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 This program allows users to safely shut down their system in response
23 to power failures and other power events. It also allows users to
24 configure and manage UPS models.
26 Please note that /usr/lib/powerchute/Config.sh should be run in order
27 to configure PowerChute plus.
31 for i in BI_LINUX CI_LINUX COMMON FI_LINUX HELP ; do
37 # No build, binaty package
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/powerchute} \
42 $RPM_BUILD_ROOT/etc/rc.d/init.d \
43 $RPM_BUILD_ROOT%{_prefix}/X11R6/{bin,lib/X11/{app-defaults,uid}}
46 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsd
47 install %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/xpowerchute
48 install %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/powerchute/Config.sh
49 install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/powerchute/powerchute.ini_templ
50 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/powerchute.ini
52 ln -s %{_sysconfdir}/powerchute.ini $RPM_BUILD_ROOT%{_libdir}/powerchute/
54 install _upsd $RPM_BUILD_ROOT%{_sbindir}/upsd
56 install _xpwrchute $RPM_BUILD_ROOT%{_libdir}/powerchute
57 install addpage.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
58 install apacheshut $RPM_BUILD_ROOT%{_libdir}/powerchute
59 install bkupsd $RPM_BUILD_ROOT%{_libdir}/powerchute
60 install dialpager.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
61 install killbk.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
62 install killpc.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
63 install machine_id $RPM_BUILD_ROOT%{_libdir}/powerchute
64 install mailer.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
65 install notifier.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
66 install pcshut.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
67 install portcheck $RPM_BUILD_ROOT%{_libdir}/powerchute
68 install ttycheck $RPM_BUILD_ROOT%{_libdir}/powerchute
69 install ups_adjust $RPM_BUILD_ROOT%{_libdir}/powerchute
70 install upsoff $RPM_BUILD_ROOT%{_libdir}/powerchute
71 install upswrite $RPM_BUILD_ROOT%{_libdir}/powerchute
72 install wall.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
73 install what_os.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
74 install pwrchute.uid $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/uid/
76 install pwrchute.ad $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/app-defaults/pwrchute
78 ln -s /var/run/upsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute/
79 ln -s /var/run/bkupsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute/
81 gzip -9nf language.txt readme_apache
84 GROUP=pwrchute; GID=68; %groupadd
85 USER=pwrchute; UID=68; HOMEDIR=/dev/null; COMMENT="PowerChute Plus"
89 NAME=upsd; DESC="UPSd server"; %chkconfig_add
90 cd %{_libdir}/powerchute
92 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
93 echo "Remember to set the password for pwrchute account"
96 NAME=upsd; %chkconfig_del
99 USER=pwrchute; %userdel
100 GROUP=pwrchute; %groupdel
103 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %doc help/* apachesh.pdf language.txt.gz readme_apache.gz pclinxug.pdf
108 %attr(754,root,root) /etc/rc.d/init.d/upsd
109 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/powerchute.ini
110 %attr(755,root,root) %{_sbindir}/upsd
111 %attr(755,root,root) %{_libdir}/powerchute/Config.sh
112 %attr(755,root,root) %{_libdir}/powerchute/_xpwrchute
113 %attr(755,root,root) %{_libdir}/powerchute/addpage.sh
114 %attr(755,root,root) %{_libdir}/powerchute/apacheshut
115 %attr(755,root,root) %{_libdir}/powerchute/bkupsd
116 %attr(755,root,root) %{_libdir}/powerchute/dialpager.sh
117 %attr(755,root,root) %{_libdir}/powerchute/killbk.sh
118 %attr(755,root,root) %{_libdir}/powerchute/killpc.sh
119 %attr(755,root,root) %{_libdir}/powerchute/machine_id
120 %attr(755,root,root) %{_libdir}/powerchute/mailer.sh
121 %attr(755,root,root) %{_libdir}/powerchute/notifier.sh
122 %attr(755,root,root) %{_libdir}/powerchute/pcshut.sh
123 %attr(755,root,root) %{_libdir}/powerchute/portcheck
124 %attr(755,root,root) %{_libdir}/powerchute/ttycheck
125 %attr(755,root,root) %{_libdir}/powerchute/ups_adjust
126 %attr(755,root,root) %{_libdir}/powerchute/upsoff
127 %attr(755,root,root) %{_libdir}/powerchute/upswrite
128 %attr(755,root,root) %{_libdir}/powerchute/wall.sh
129 %attr(755,root,root) %{_libdir}/powerchute/what_os.sh
130 %{_libdir}/powerchute/powerchute.ini
131 %{_libdir}/powerchute/powerchute.ini_templ
132 %attr(755,root,root) %{_prefix}/X11R6/bin/xpowerchute
133 %{_prefix}/X11R6/lib/X11/app-defaults/*
134 %{_prefix}/X11R6/lib/X11/uid/*
135 %config(noreplace) %verify(not size mtime md5) %{_libdir}/powerchute/upsd.pid
136 %config(noreplace) %verify(not size mtime md5) %{_libdir}/powerchute/bkupsd.pid