]> git.pld-linux.org Git - packages/PowerChutePlus.git/blob - PowerChutePlus.spec
- converted to UTF-8
[packages/PowerChutePlus.git] / PowerChutePlus.spec
1 Summary:        UPS management software for APC UPS models
2 Summary(pl.UTF-8):   Oprogramowanie do obsługi UPS-ów APC
3 Name:           PowerChutePlus
4 Version:        4.5.3
5 Release:        1
6 License:        (c) 1999 APC, inc.
7 Group:          Applications/System
8 Source0:        ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/453/pcplus_453_caldera.tar
9 # Source0-md5:  5eb99efd5561694b9f692aa713bd974d
10 Source1:        ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/453/pc453ug.pdf
11 # Source1-md5:  0c2a621adcad8fdcb6064ed3cb042711
12 Source2:        upsd.init
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 # Source7-md5:  c69abad141a836fd12ced0cc39049dc6
19 Patch0:         %{name}-fix-sh.patch
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires(post,preun):   /sbin/chkconfig
22 Requires(postun):       /usr/sbin/groupdel
23 Requires(postun):       /usr/sbin/userdel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/bin/getgid
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /usr/sbin/useradd
28 Requires:       rc-scripts
29 Provides:       group(pwrchute)
30 Provides:       user(pwrchute)
31 ExclusiveArch:  %{ix86}
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 This program allows users to safely shut down their system in response
36 to power failures and other power events. It also allows users to
37 configure and manage UPS models.
38
39 Please note that %{_libdir}/powerchute/Config.sh should be run in order
40 to configure PowerChute plus.
41
42 %description -l pl.UTF-8
43 Ten program pozwala użytkownikom bezpiecznie wyłączyć system w
44 przypadku awarii zasilania. Pozwala także na skonfigurowanie UPS.
45
46 Uwaga: aby skonfigurować PowerChute Plus należy uruchomić
47 /usr/lib/powerchute/Config.sh .
48
49 %prep
50 %setup -q -c
51 for i in BI_LINUX CI_LINUX COMMON FI_LINUX HELP; do
52         tar xf $i
53 done
54 %patch0 -p1
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/powerchute} \
59         $RPM_BUILD_ROOT/etc/rc.d/init.d \
60         $RPM_BUILD_ROOT%{_prefix}/X11R6/{bin,lib/X11/{app-defaults,uid}}
61
62 install %{SOURCE1} .
63 install %{SOURCE7} .
64 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsd
65 install %{SOURCE3} $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/xpowerchute
66 install %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/powerchute/Config.sh
67 install %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/powerchute/powerchute.ini_templ
68 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/powerchute.ini
69
70 ln -sf %{_sysconfdir}/powerchute.ini $RPM_BUILD_ROOT%{_libdir}/powerchute
71
72 install _upsd $RPM_BUILD_ROOT%{_sbindir}/upsd
73
74 install _xpwrchute $RPM_BUILD_ROOT%{_libdir}/powerchute
75 install addpage.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
76 install apacheshut $RPM_BUILD_ROOT%{_libdir}/powerchute
77 install bkupsd $RPM_BUILD_ROOT%{_libdir}/powerchute
78 install dialpager.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
79 install killbk.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
80 install killpc.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
81 install machine_id $RPM_BUILD_ROOT%{_libdir}/powerchute
82 install mailer.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
83 install notifier.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
84 install pcshut.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
85 install portcheck $RPM_BUILD_ROOT%{_libdir}/powerchute
86 install ttycheck $RPM_BUILD_ROOT%{_libdir}/powerchute
87 install ups_adjust $RPM_BUILD_ROOT%{_libdir}/powerchute
88 install upsoff $RPM_BUILD_ROOT%{_libdir}/powerchute
89 install upswrite $RPM_BUILD_ROOT%{_libdir}/powerchute
90 install wall.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
91 install what_os.sh $RPM_BUILD_ROOT%{_libdir}/powerchute
92 install pwrchute.uid $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/uid
93
94 install pwrchute.ad $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/app-defaults/pwrchute
95
96 ln -sf /var/run/upsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute
97 ln -sf /var/run/bkupsd.pid $RPM_BUILD_ROOT%{_libdir}/powerchute
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %pre
103 %groupadd -g 68 pwrchute
104 %useradd -u 68 -g 68 -d /usr/share/empty -s /bin/false -c "PowerChute Plus" pwrchute
105
106 %post
107 /sbin/chkconfig --add upsd
108 %service upsd restart "UPSd server"
109 cd %{_libdir}/powerchute
110 ./machine_id
111 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
112 echo "Remember to set the password for pwrchute account"
113
114 %preun
115 if [ "$1" = "0" ]; then
116         %service upsd stop
117         /sbin/chkconfig --del upsd
118 fi
119
120 %postun
121 if [ "$1" = "0" ]; then
122         %userremove pwrchute
123         %groupremove pwrchute
124 fi
125
126 %files
127 %defattr(644,root,root,755)
128 %doc help/* apachesh.pdf language.txt readme_apache pc453ug.pdf settings.pdf
129 %attr(754,root,root) /etc/rc.d/init.d/upsd
130 %attr(640,root,pwrchute) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powerchute.ini
131 %attr(755,root,root) %{_sbindir}/upsd
132 %dir %{_libdir}/powerchute
133 %attr(755,root,root) %{_libdir}/powerchute/Config.sh
134 %attr(755,root,root) %{_libdir}/powerchute/_xpwrchute
135 %attr(755,root,root) %{_libdir}/powerchute/addpage.sh
136 %attr(755,root,root) %{_libdir}/powerchute/apacheshut
137 %attr(755,root,root) %{_libdir}/powerchute/bkupsd
138 %attr(755,root,root) %{_libdir}/powerchute/dialpager.sh
139 %attr(755,root,root) %{_libdir}/powerchute/killbk.sh
140 %attr(755,root,root) %{_libdir}/powerchute/killpc.sh
141 %attr(755,root,root) %{_libdir}/powerchute/machine_id
142 %attr(755,root,root) %{_libdir}/powerchute/mailer.sh
143 %attr(755,root,root) %{_libdir}/powerchute/notifier.sh
144 %attr(755,root,root) %{_libdir}/powerchute/pcshut.sh
145 %attr(755,root,root) %{_libdir}/powerchute/portcheck
146 %attr(755,root,root) %{_libdir}/powerchute/ttycheck
147 %attr(755,root,root) %{_libdir}/powerchute/ups_adjust
148 %attr(755,root,root) %{_libdir}/powerchute/upsoff
149 %attr(755,root,root) %{_libdir}/powerchute/upswrite
150 %attr(755,root,root) %{_libdir}/powerchute/wall.sh
151 %attr(755,root,root) %{_libdir}/powerchute/what_os.sh
152 %{_libdir}/powerchute/powerchute.ini
153 %{_libdir}/powerchute/powerchute.ini_templ
154 %attr(755,root,root) %{_prefix}/X11R6/bin/xpowerchute
155 %{_prefix}/X11R6/lib/X11/app-defaults/*
156 %{_prefix}/X11R6/lib/X11/uid/*
157 %config(noreplace) %verify(not md5 mtime size) %{_libdir}/powerchute/upsd.pid
158 %config(noreplace) %verify(not md5 mtime size) %{_libdir}/powerchute/bkupsd.pid
This page took 0.103389 seconds and 3 git commands to generate.