/[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 99236 - (show annotations) (download)
Mon May 16 13:01:05 2011 UTC (12 years, 11 months ago) by mikala
File size: 3030 byte(s)
imported package apcupsd
1 %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 Version: 3.14.8
8 Release: %mkrel 3
9 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 Patch0: apcupsd-3.12.2-usbhiddev.patch
14 Patch1: apcupsd-3.10.16-staleusb.patch
15 Patch2: apcupsd-3.14.4-mdv_conf.diff
16 Patch3: apcupsd-3.14.8-link.patch
17 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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
25
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 %patch0 -p0 -b .usbhid
37 %patch1 -p1 -b .usbstale
38 %patch2 -p0 -b .mdv_conf
39 %patch3 -p0 -b .link
40
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 #perl -pi -e 's|/etc|\$\%{buildroot}/etc|g' platforms/mandrake/Makefile.in
71 perl -pi -e 's|\@/sbin/chkconfig|\#\@/sbin/chkconfig|' platforms/mandrake/Makefile.in
72
73 %makeinstall_std
74 #cgibin=%{buildroot}%{_cgibin}
75
76 install -m0644 platforms/etc/apcupsd.conf %{buildroot}%{_sysconfdir}/apcupsd/
77 install -m0755 platforms/apccontrol %{buildroot}%{_sysconfdir}/apcupsd/
78 install -m0755 platforms/mandrake/apcupsd %{buildroot}%{_initrddir}/
79
80 for src in changeme commfailure commok onbattery offbattery; do
81 install -m0744 platforms/etc/$src %{buildroot}%{_sysconfdir}/apcupsd/$src
82 done
83
84 %find_lang %{name}
85
86 # cleanup
87 pushd doc/manual
88 rm -f *.rst publishdoc Makefile
89 popd
90
91 %post
92 %_post_service apcupsd
93
94 %preun
95 %_preun_service apcupsd
96
97 %clean
98 rm -rf %{buildroot}
99
100 %files -f %{name}.lang
101 %defattr(-,root,root)
102 %doc ChangeLog DISCLAIMER Developers ReleaseNotes examples doc/manual
103 %{_initrddir}/apcupsd
104 %dir %{_sysconfdir}/apcupsd
105 %config(noreplace) %{_sysconfdir}/apcupsd/*
106 %{_halpolicydir}/80-apcupsd-ups-policy.fdi
107 %{_sbindir}/apcaccess
108 %{_sbindir}/apctest
109 %{_sbindir}/apcupsd
110 %{_sbindir}/smtp
111 %{_cgibin}/multimon.cgi
112 %{_cgibin}/upsfstats.cgi
113 %{_cgibin}/upsimage.cgi
114 %{_cgibin}/upsstats.cgi
115 %{_mandir}/man8/*
116 %{_mandir}/man5/apcupsd.conf.5*
117
118

  ViewVC Help
Powered by ViewVC 1.1.30