]>
Commit | Line | Data |
---|---|---|
03dfd68e | 1 | Summary: APC UPS Daemon. |
2 | Summary(pl): APC UPS demon. | |
3 | Name: apcupsd | |
4 | Version: 3.5.8 | |
5 | Release: 1 | |
6 | Copyright: GPL | |
7 | Group: Daemons | |
8 | Group(pl): Demony | |
9 | Source: http://www.brisse.dk/site/apcupsd/download/%{name}-%{version}.src.tar.gz | |
10 | Patch0: apcups-initscript.patch | |
11 | Patch1: apcups-Makefile.fix | |
12 | Patch2: apcups-inetd.patch | |
13 | BuildRoot: /tmp/%{name}-root | |
14 | ||
15 | %define _prefix / | |
16 | %define _mandir /usr/share/man | |
17 | ||
18 | %description | |
19 | UPS power management under Linux for APCC Products. | |
20 | It allows your computer/server to run during power problems | |
21 | for a specified length of time or the life of the batteries | |
22 | in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and | |
23 | then properly executes a controlled shutdown during an | |
24 | extended power failure. | |
25 | ||
26 | %description -l pl | |
27 | ||
28 | %prep | |
29 | %setup -q -n %{name}-%{version}.src | |
30 | %patch0 -p1 | |
31 | %patch1 -p0 | |
32 | %patch2 -p1 | |
33 | ||
34 | %build | |
35 | make MANPREFIX=$RPM_BUILD_ROOT%{_mandir} linux | |
36 | ||
37 | %install | |
38 | ||
39 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/rc.d/init.d,%{_bindir},%{_sbindir},%{_mandir}/man8,/var/log} | |
40 | ||
41 | install installs/apcupsd.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
42 | ||
43 | install -s apcupsd-linux $RPM_BUILD_ROOT%{_sbindir}/apcupsd | |
44 | install -s apcaccess-linux $RPM_BUILD_ROOT%{_bindir}/apcaccess | |
45 | ||
46 | install installs/powersc $RPM_BUILD_ROOT%{_sbindir} | |
47 | ||
48 | install docs/apcupsd.man8 $RPM_BUILD_ROOT%{_mandir}/man8/apcupsd.8 | |
49 | ||
50 | install apcupsd ${RPM_BUILD_ROOT}/etc/rc.d/init.d/apcupsd | |
51 | ||
52 | touch ${RPM_BUILD_ROOT}/var/log/apcupsd.log | |
53 | touch ${RPM_BUILD_ROOT}/etc/apcupsd.status | |
54 | ||
55 | gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man8/* | |
56 | ||
57 | %clean | |
58 | rm -rf ${RPM_BUILD_ROOT} | |
59 | ||
60 | %post | |
61 | /sbin/chkconfig --add apcupsd | |
62 | ||
63 | %preun | |
64 | /sbin/chkconfig --del apcupsd | |
65 | ||
66 | %files | |
67 | %defattr(644, root, root,755) | |
68 | %doc README.NEW Changelog port.gif Statement.APCC | |
69 | %attr(644, root, root) %{_mandir}/man8/apcupsd.8.gz | |
70 | %attr(755, root, bin) %{_sbindir}/apcupsd | |
71 | %attr(755, root, root) %{_bindir}/apcaccess | |
72 | %attr(755, root, bin) %config %{_sbindir}/powersc | |
73 | %config(noreplace) /etc/apcupsd.conf | |
74 | %config /etc/rc.d/init.d/apcupsd | |
75 | %ghost /var/log/apcupsd.log | |
76 | %ghost /etc/apcupsd.status | |
77 | ||
78 | %changelog | |
79 |