/[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 411555 - (hide annotations) (download)
Mon Apr 29 00:54:48 2013 UTC (10 years, 11 months ago) by luigiwalser
File size: 2799 byte(s)
hardcode LOCKDIR due to failed detection in build chroots
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 411555 Release: %mkrel 4
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 luigiwalser 411555 Patch4: apcupsd-3.14.10-lockdir.patch
17 mikala 99236 Requires(post): rpm-helper
18     Requires(preun):rpm-helper
19     Requires: tcp_wrappers
20     Requires: nail
21     BuildRequires: gd-devel
22     BuildRequires: ncurses-devel
23     BuildRequires: tcp_wrappers-devel
24 luigiwalser 202316 BuildRequires: libstdc++-devel
25 mikala 99236
26     %description
27     UPS power management under Linux for APCC Products. It allows your
28     computer/server to run during power problems for a specified length of time or
29     the life of the batteries in your BackUPS, BackUPS Pro, SmartUPS v/s, or
30     SmartUPS, and then properly executes a controlled shutdown during an extended
31     power failure.
32    
33     %prep
34    
35     %setup -q
36     %patch1 -p1 -b .usbstale
37     %patch2 -p0 -b .mdv_conf
38     %patch3 -p0 -b .link
39 luigiwalser 411555 %patch4 -p1 -b .lock
40 mikala 99236
41     # fix attribs
42     find examples -type f | xargs chmod 644
43    
44     %build
45     %serverbuild
46    
47     %configure2_5x \
48     --sysconfdir=%{_sysconfdir}/apcupsd \
49     --enable-usb \
50     --enable-net \
51     --enable-master-slave \
52     --enable-pthreads \
53     --enable-cgi \
54     --with-cgi-bin=%{_cgibin} \
55     --with-serial-dev= \
56     --with-upstype=usb \
57     --with-halpolicydir=%{_halpolicydir} \
58     --with-upscable=usb \
59     --with-nisip=127.0.0.1 \
60     --with-libwrap
61    
62     %make VERBOSE=1
63    
64     %install
65     rm -rf %{buildroot}
66    
67     install -d %{buildroot}%{_initrddir}
68     install -d %{buildroot}%{_cgibin}
69    
70     %makeinstall_std
71     #cgibin=%{buildroot}%{_cgibin}
72    
73     install -m0644 platforms/etc/apcupsd.conf %{buildroot}%{_sysconfdir}/apcupsd/
74     install -m0755 platforms/apccontrol %{buildroot}%{_sysconfdir}/apcupsd/
75     install -m0755 platforms/mandrake/apcupsd %{buildroot}%{_initrddir}/
76    
77     for src in changeme commfailure commok onbattery offbattery; do
78     install -m0744 platforms/etc/$src %{buildroot}%{_sysconfdir}/apcupsd/$src
79     done
80    
81     # cleanup
82     pushd doc/manual
83     rm -f *.rst publishdoc Makefile
84     popd
85    
86     %post
87     %_post_service apcupsd
88    
89     %preun
90     %_preun_service apcupsd
91    
92     %clean
93     rm -rf %{buildroot}
94    
95 luigiwalser 202314 %files
96 mikala 99236 %defattr(-,root,root)
97     %doc ChangeLog DISCLAIMER Developers ReleaseNotes examples doc/manual
98     %{_initrddir}/apcupsd
99     %dir %{_sysconfdir}/apcupsd
100     %config(noreplace) %{_sysconfdir}/apcupsd/*
101     %{_halpolicydir}/80-apcupsd-ups-policy.fdi
102     %{_sbindir}/apcaccess
103     %{_sbindir}/apctest
104     %{_sbindir}/apcupsd
105     %{_sbindir}/smtp
106     %{_cgibin}/multimon.cgi
107     %{_cgibin}/upsfstats.cgi
108     %{_cgibin}/upsimage.cgi
109     %{_cgibin}/upsstats.cgi
110     %{_mandir}/man8/*
111     %{_mandir}/man5/apcupsd.conf.5*
112    
113    

  ViewVC Help
Powered by ViewVC 1.1.30