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