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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 202314 - (hide annotations) (download)
Fri Jan 27 22:15:43 2012 UTC (12 years, 2 months ago) by luigiwalser
File size: 2746 byte(s)
minor spec fixes (from mdv)
1 mikala 99236 %define _halpolicydir %{_datadir}/hal/fdi/policy/20thirdparty
2     %define _cgibin /var/www/cgi-bin
3     %define _sbindir /sbin
4    
5     Summary: Power management software for APC UPS hardware
6     Name: apcupsd
7 luigiwalser 189396 Version: 3.14.10
8 luigiwalser 202313 Release: %mkrel 2
9 mikala 99236 License: GPLv2
10     Group: System/Servers
11     URL: http://sourceforge.net/projects/apcupsd/
12     Source0: http://mesh.dl.sourceforge.net/sourceforge/apcupsd/%{name}-%{version}.tar.gz
13     Patch1: apcupsd-3.10.16-staleusb.patch
14     Patch2: apcupsd-3.14.4-mdv_conf.diff
15 luigiwalser 202313 Patch3: apcupsd-3.14.10-link.patch
16 mikala 99236 Requires(post): rpm-helper
17     Requires(preun):rpm-helper
18     Requires: tcp_wrappers
19     Requires: nail
20     BuildRequires: gd-devel
21     BuildRequires: ncurses-devel
22     BuildRequires: tcp_wrappers-devel
23 luigiwalser 202314 BuildRequires: libstdc++-static-devel
24 mikala 99236
25     %description
26     UPS power management under Linux for APCC Products. It allows your
27     computer/server to run during power problems for a specified length of time or
28     the life of the batteries in your BackUPS, BackUPS Pro, SmartUPS v/s, or
29     SmartUPS, and then properly executes a controlled shutdown during an extended
30     power failure.
31    
32     %prep
33    
34     %setup -q
35     %patch1 -p1 -b .usbstale
36     %patch2 -p0 -b .mdv_conf
37     %patch3 -p0 -b .link
38    
39     # fix attribs
40     find examples -type f | xargs chmod 644
41    
42     %build
43     %serverbuild
44    
45     %configure2_5x \
46     --sysconfdir=%{_sysconfdir}/apcupsd \
47     --enable-usb \
48     --enable-net \
49     --enable-master-slave \
50     --enable-pthreads \
51     --enable-cgi \
52     --with-cgi-bin=%{_cgibin} \
53     --with-serial-dev= \
54     --with-upstype=usb \
55     --with-halpolicydir=%{_halpolicydir} \
56     --with-upscable=usb \
57     --with-nisip=127.0.0.1 \
58     --with-libwrap
59    
60     %make VERBOSE=1
61    
62     %install
63     rm -rf %{buildroot}
64    
65     install -d %{buildroot}%{_initrddir}
66     install -d %{buildroot}%{_cgibin}
67    
68     %makeinstall_std
69     #cgibin=%{buildroot}%{_cgibin}
70    
71     install -m0644 platforms/etc/apcupsd.conf %{buildroot}%{_sysconfdir}/apcupsd/
72     install -m0755 platforms/apccontrol %{buildroot}%{_sysconfdir}/apcupsd/
73     install -m0755 platforms/mandrake/apcupsd %{buildroot}%{_initrddir}/
74    
75     for src in changeme commfailure commok onbattery offbattery; do
76     install -m0744 platforms/etc/$src %{buildroot}%{_sysconfdir}/apcupsd/$src
77     done
78    
79     # cleanup
80     pushd doc/manual
81     rm -f *.rst publishdoc Makefile
82     popd
83    
84     %post
85     %_post_service apcupsd
86    
87     %preun
88     %_preun_service apcupsd
89    
90     %clean
91     rm -rf %{buildroot}
92    
93 luigiwalser 202314 %files
94 mikala 99236 %defattr(-,root,root)
95     %doc ChangeLog DISCLAIMER Developers ReleaseNotes examples doc/manual
96     %{_initrddir}/apcupsd
97     %dir %{_sysconfdir}/apcupsd
98     %config(noreplace) %{_sysconfdir}/apcupsd/*
99     %{_halpolicydir}/80-apcupsd-ups-policy.fdi
100     %{_sbindir}/apcaccess
101     %{_sbindir}/apctest
102     %{_sbindir}/apcupsd
103     %{_sbindir}/smtp
104     %{_cgibin}/multimon.cgi
105     %{_cgibin}/upsfstats.cgi
106     %{_cgibin}/upsimage.cgi
107     %{_cgibin}/upsstats.cgi
108     %{_mandir}/man8/*
109     %{_mandir}/man5/apcupsd.conf.5*
110    
111    

  ViewVC Help
Powered by ViewVC 1.1.30