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

  ViewVC Help
Powered by ViewVC 1.1.28