]>
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 | |
f3ac9371 JR |
35 | make linux \ |
36 | MANPREFIX=$RPM_BUILD_ROOT%{_mandir} \ | |
37 | CFLAGS="$RPM_OPT_FLAGS -I./include" | |
03dfd68e | 38 | |
39 | %install | |
40 | ||
41 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/rc.d/init.d,%{_bindir},%{_sbindir},%{_mandir}/man8,/var/log} | |
42 | ||
43 | install installs/apcupsd.conf $RPM_BUILD_ROOT%{_sysconfdir} | |
44 | ||
45 | install -s apcupsd-linux $RPM_BUILD_ROOT%{_sbindir}/apcupsd | |
46 | install -s apcaccess-linux $RPM_BUILD_ROOT%{_bindir}/apcaccess | |
47 | ||
48 | install installs/powersc $RPM_BUILD_ROOT%{_sbindir} | |
49 | ||
50 | install docs/apcupsd.man8 $RPM_BUILD_ROOT%{_mandir}/man8/apcupsd.8 | |
51 | ||
52 | install apcupsd ${RPM_BUILD_ROOT}/etc/rc.d/init.d/apcupsd | |
53 | ||
54 | touch ${RPM_BUILD_ROOT}/var/log/apcupsd.log | |
55 | touch ${RPM_BUILD_ROOT}/etc/apcupsd.status | |
56 | ||
57 | gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man8/* | |
58 | ||
59 | %clean | |
60 | rm -rf ${RPM_BUILD_ROOT} | |
61 | ||
62 | %post | |
63 | /sbin/chkconfig --add apcupsd | |
64 | ||
65 | %preun | |
66 | /sbin/chkconfig --del apcupsd | |
67 | ||
68 | %files | |
69 | %defattr(644, root, root,755) | |
70 | %doc README.NEW Changelog port.gif Statement.APCC | |
71 | %attr(644, root, root) %{_mandir}/man8/apcupsd.8.gz | |
72 | %attr(755, root, bin) %{_sbindir}/apcupsd | |
73 | %attr(755, root, root) %{_bindir}/apcaccess | |
74 | %attr(755, root, bin) %config %{_sbindir}/powersc | |
75 | %config(noreplace) /etc/apcupsd.conf | |
76 | %config /etc/rc.d/init.d/apcupsd | |
77 | %ghost /var/log/apcupsd.log | |
78 | %ghost /etc/apcupsd.status |