ALT Linux repos
S: | 3.14.14-alt3 |
5.0: | 3.14.4-alt5 |
4.1: | 3.14.8-alt0.M41.1 |
4.0: | 3.14.3-alt0.M40.1 |
3.0: | 3.10.17-alt1 |
+updates: | 3.10.18-alt0.C30.1 |
Other repositories
Upstream: | 3.14.3 |
Group :: System/Servers
RPM: apcupsd
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define _cgibin /var/www/cgi-bin
Name: apcupsd
Version: 3.10.17
Release: alt1
Packager: Sergey Y. Afonin <asy at altlinux.ru>
Summary: Power management software for APC UPS hardware
License: GPL
Group: System/Servers
Url: http://www.apcupsd.org/
Source: ftp://ftp.apcupsd.com/pub/%name/development/%name-%version.tar.gz
Source1: apcupsd-platforms-altlinux.tgz
Source2: apcupsd-makesymlinks
Source3: apcupsd-upsdmessages
Patch2: %name-3.10.17-alt-specific-configure.in.patch
Patch3: %name-3.10.5-alt-usb_killpower.patch
Patch4: %name-3.10.5-cvs-daemonize.patch
Conflicts: nut
# Requires: service
%def_disable cgi
# Automatically added by buildreq on Tue Apr 12 2005
BuildRequires: gzip-utils hostinfo libncurses-devel libtinfo-devel mailx xorg-x11-devel
%description -n %name
UPS power management under Linux for APCC Products.
It allows your computer/server to run during power problems
for a specified length of time or the life of the batteries
in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and
then properly executes a controlled shutdown during an
extended power failure. The "apctest" can change EEPROM values
on some UPS models (via rs-232 cable).
%package doc
Group: System/Servers
Summary: apcupsd documentation
%description doc
The %name-doc package contains Here the documentation about
apcupsd daemon and apctest utility.
%package cgi
Summary: Web status for UPS
Group: Networking/Other
Requires: %name = %version-%release, apache-common
%description cgi
Web status for UPS.
%prep
%setup -q
%patch2 -p0
#%patch3 -p1
#%patch4 -p1
%__tar xzf %{SOURCE1}
%build
export ac_cv_path_MAIL=/bin/mail
export ac_cv_path_ETAGS=/usr/bin/ctags
export ac_cv_path_CTAGS=/usr/bin/ctags
%add_optflags -DCSS_DIR="\"\\\"./\\\"\""
autoconf -I autoconf autoconf/configure.in > configure
#autoheader -I autoconf autoconf/configure.in > autoconf/config.h.in
%configure \
--sbindir=/sbin \
--sysconfdir=%_sysconfdir/%name \
--with-log-dir=%_localstatedir/%name \
--with-lock-dir=%_lockdir/serial \
--enable-powerflute \
--enable-pthreads \
--enable-nls \
%{subst_enable cgi} \
--enable-usb \
--disable-snmp \
--with-cgi-bin=%_cgibin \
--with-css-dir=./ \
--with-nisip=127.0.0.1 \
--with-distname=altlinux
# SMP-incompatible build.
make
%install
%__mkdir_p $RPM_BUILD_ROOT{%_sbindir,%_initdir,%_cgibin,%_localstatedir/%name}
%makeinstall \
sysconfdir=$RPM_BUILD_ROOT%_sysconfdir/%name \
sbindir=$RPM_BUILD_ROOT/sbin \
mandir=$RPM_BUILD_ROOT%_man8dir \
cgibin=$RPM_BUILD_ROOT%_cgibin \
CSS_DIR=$RPM_BUILD_ROOT%_cgibin \
#
pushd $RPM_BUILD_ROOT/sbin
for f in apc*; do
%__ln_s ../../sbin/"$f" ..%_sbindir/
done
%__mv powerflute ..%_sbindir/
popd
# build new action's sript
%__cp %{SOURCE3} $RPM_BUILD_ROOT/%_sysconfdir/%name/upsdmessages
pushd $RPM_BUILD_ROOT/%_sysconfdir/%name
sh %{SOURCE2}
popd
# copy apctest by hand
%__cp $RPM_BUILD_DIR/%name-%version/src/apctest $RPM_BUILD_ROOT/%_sbindir/
touch $RPM_BUILD_ROOT%_sysconfdir/{nologin,%name/powerfail}
%find_lang %name
%post
%post_service %name
%preun
%preun_service %name
%files -n %name -f %name.lang
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*
%config(noreplace) %_initdir/%name
/sbin/*
%_sbindir/*
%_localstatedir/%name
%_mandir/man?/*
%ghost %_sysconfdir/%name/powerfail
%ghost %_sysconfdir/nologin
%doc ChangeLog Developers
%files doc
%doc INSTALL doc examples
%if_enabled cgi
%files cgi
%_cgibin/*
%endif
%changelog
…
Full changelog you can see here
Name: apcupsd
Version: 3.10.17
Release: alt1
Packager: Sergey Y. Afonin <asy at altlinux.ru>
Summary: Power management software for APC UPS hardware
License: GPL
Group: System/Servers
Url: http://www.apcupsd.org/
Source: ftp://ftp.apcupsd.com/pub/%name/development/%name-%version.tar.gz
Source1: apcupsd-platforms-altlinux.tgz
Source2: apcupsd-makesymlinks
Source3: apcupsd-upsdmessages
Patch2: %name-3.10.17-alt-specific-configure.in.patch
Patch3: %name-3.10.5-alt-usb_killpower.patch
Patch4: %name-3.10.5-cvs-daemonize.patch
Conflicts: nut
# Requires: service
%def_disable cgi
# Automatically added by buildreq on Tue Apr 12 2005
BuildRequires: gzip-utils hostinfo libncurses-devel libtinfo-devel mailx xorg-x11-devel
%description -n %name
UPS power management under Linux for APCC Products.
It allows your computer/server to run during power problems
for a specified length of time or the life of the batteries
in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and
then properly executes a controlled shutdown during an
extended power failure. The "apctest" can change EEPROM values
on some UPS models (via rs-232 cable).
%package doc
Group: System/Servers
Summary: apcupsd documentation
%description doc
The %name-doc package contains Here the documentation about
apcupsd daemon and apctest utility.
%package cgi
Summary: Web status for UPS
Group: Networking/Other
Requires: %name = %version-%release, apache-common
%description cgi
Web status for UPS.
%prep
%setup -q
%patch2 -p0
#%patch3 -p1
#%patch4 -p1
%__tar xzf %{SOURCE1}
%build
export ac_cv_path_MAIL=/bin/mail
export ac_cv_path_ETAGS=/usr/bin/ctags
export ac_cv_path_CTAGS=/usr/bin/ctags
%add_optflags -DCSS_DIR="\"\\\"./\\\"\""
autoconf -I autoconf autoconf/configure.in > configure
#autoheader -I autoconf autoconf/configure.in > autoconf/config.h.in
%configure \
--sbindir=/sbin \
--sysconfdir=%_sysconfdir/%name \
--with-log-dir=%_localstatedir/%name \
--with-lock-dir=%_lockdir/serial \
--enable-powerflute \
--enable-pthreads \
--enable-nls \
%{subst_enable cgi} \
--enable-usb \
--disable-snmp \
--with-cgi-bin=%_cgibin \
--with-css-dir=./ \
--with-nisip=127.0.0.1 \
--with-distname=altlinux
# SMP-incompatible build.
make
%install
%__mkdir_p $RPM_BUILD_ROOT{%_sbindir,%_initdir,%_cgibin,%_localstatedir/%name}
%makeinstall \
sysconfdir=$RPM_BUILD_ROOT%_sysconfdir/%name \
sbindir=$RPM_BUILD_ROOT/sbin \
mandir=$RPM_BUILD_ROOT%_man8dir \
cgibin=$RPM_BUILD_ROOT%_cgibin \
CSS_DIR=$RPM_BUILD_ROOT%_cgibin \
#
pushd $RPM_BUILD_ROOT/sbin
for f in apc*; do
%__ln_s ../../sbin/"$f" ..%_sbindir/
done
%__mv powerflute ..%_sbindir/
popd
# build new action's sript
%__cp %{SOURCE3} $RPM_BUILD_ROOT/%_sysconfdir/%name/upsdmessages
pushd $RPM_BUILD_ROOT/%_sysconfdir/%name
sh %{SOURCE2}
popd
# copy apctest by hand
%__cp $RPM_BUILD_DIR/%name-%version/src/apctest $RPM_BUILD_ROOT/%_sbindir/
touch $RPM_BUILD_ROOT%_sysconfdir/{nologin,%name/powerfail}
%find_lang %name
%post
%post_service %name
%preun
%preun_service %name
%files -n %name -f %name.lang
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*
%config(noreplace) %_initdir/%name
/sbin/*
%_sbindir/*
%_localstatedir/%name
%_mandir/man?/*
%ghost %_sysconfdir/%name/powerfail
%ghost %_sysconfdir/nologin
%doc ChangeLog Developers
%files doc
%doc INSTALL doc examples
%if_enabled cgi
%files cgi
%_cgibin/*
%endif
%changelog
…
Full changelog you can see here