/[packages]/cauldron/apcupsd/current/SPECS/apcupsd.spec
ViewVC logotype

Contents of /cauldron/apcupsd/current/SPECS/apcupsd.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 815016 - (show annotations) (download)
Mon Feb 16 01:14:15 2015 UTC (5 years, 5 months ago) by luigiwalser
File size: 2453 byte(s)
add upstream patch to fix NIS clients trying to run with no network connection
1 %define _cgibin /var/www/cgi-bin
2 %define _sbindir /sbin
3
4 Summary: Power management software for APC UPS hardware
5 Name: apcupsd
6 Version: 3.14.13
7 Release: %mkrel 2
8 License: GPLv2
9 Group: System/Servers
10 URL: http://sourceforge.net/projects/apcupsd/
11 Source0: http://mesh.dl.sourceforge.net/sourceforge/apcupsd/%{name}-%{version}.tar.gz
12 Patch0: apcupsd-3.14-13-invalid-socket.patch
13 Requires(post): rpm-helper
14 Requires(preun):rpm-helper
15 Requires: tcp_wrappers
16 Requires: nail
17 BuildRequires: gd-devel
18 BuildRequires: ncurses-devel
19 BuildRequires: tcp_wrappers-devel
20 BuildRequires: libstdc++-devel
21
22 %description
23 UPS power management under Linux for APCC Products. It allows your
24 computer/server to run during power problems for a specified length of time or
25 the life of the batteries in your BackUPS, BackUPS Pro, SmartUPS v/s, or
26 SmartUPS, and then properly executes a controlled shutdown during an extended
27 power failure.
28
29 %prep
30 %setup -q
31 %patch0 -p0
32
33 # fix attribs
34 find examples -type f | xargs chmod 644
35
36 %build
37 %serverbuild
38
39 %configure2_5x \
40 --sysconfdir=%{_sysconfdir}/apcupsd \
41 --enable-usb \
42 --enable-net \
43 --enable-master-slave \
44 --enable-pthreads \
45 --enable-cgi \
46 --with-cgi-bin=%{_cgibin} \
47 --with-serial-dev= \
48 --with-upstype=usb \
49 --with-halpolicydir="" \
50 --with-upscable=usb \
51 --with-lock-dir=/run/lock \
52 --with-nisip=127.0.0.1 \
53 --with-libwrap
54
55 %make VERBOSE=1
56
57 %install
58 install -d %{buildroot}%{_initrddir}
59 install -d %{buildroot}%{_cgibin}
60
61 %makeinstall_std
62 #cgibin=%{buildroot}%{_cgibin}
63
64 install -m0644 platforms/etc/apcupsd.conf %{buildroot}%{_sysconfdir}/apcupsd/
65 install -m0755 platforms/apccontrol %{buildroot}%{_sysconfdir}/apcupsd/
66 install -m0755 platforms/mandrake/apcupsd %{buildroot}%{_initrddir}/
67
68 for src in changeme commfailure commok onbattery offbattery; do
69 install -m0744 platforms/etc/$src %{buildroot}%{_sysconfdir}/apcupsd/$src
70 done
71
72 # cleanup
73 pushd doc/manual
74 rm -f *.rst publishdoc Makefile
75 popd
76
77 %post
78 %_post_service apcupsd
79
80 %preun
81 %_preun_service apcupsd
82
83 %files
84 %doc ChangeLog DISCLAIMER Developers ReleaseNotes examples doc/manual
85 %{_initrddir}/apcupsd
86 %dir %{_sysconfdir}/apcupsd
87 %config(noreplace) %{_sysconfdir}/apcupsd/*
88 %{_sbindir}/apcaccess
89 %{_sbindir}/apctest
90 %{_sbindir}/apcupsd
91 %{_sbindir}/smtp
92 %{_cgibin}/multimon.cgi
93 %{_cgibin}/upsfstats.cgi
94 %{_cgibin}/upsimage.cgi
95 %{_cgibin}/upsstats.cgi
96 %{_mandir}/man8/*
97 %{_mandir}/man5/apcupsd.conf.5*
98
99

  ViewVC Help
Powered by ViewVC 1.1.28