Sisyphus repositório
Última atualização: 12 agosto 2022 | SRPMs: 17595 | Visitas: 24760876
en ru br
ALT Linux repositórios
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

Outros repositórios

Group :: Sistema/Servidores
RPM: apcupsd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _cgibin /var/www/cgi-bin

Name: apcupsd
Version: 3.14.3
Release: alt0.M40.1
Packager: Sergey Y. Afonin <asy at>
#BuildArch: i586

Summary: Power management software for APC UPS hardware
License: %gpl2only
Group: System/Servers

Source1: apcupsd-platforms-altlinux.tgz
Source2: apcupsd-makesymlinks
Source3: apcupsd-upsdmessages

Patch1: apcupsd-3.14.0.aclocal.m4.patch
Patch3: %name-3.10.5-alt-usb_killpower.patch
Patch4: %name-3.10.5-cvs-daemonize.patch
Patch5: %name-3.12.2-config.sub.path


Conflicts: nut

# Requires: service

%def_disable cgi

BuildRequires: rpm-build-licenses

BuildRequires: gcc-c++ imake makedepend gzip-utils hostinfo libncurses-devel libtinfo-devel libnet-snmp-devel 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
License: %fdl
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
License: %gpl2only
Group: Networking/Other
Requires: %name = %version-%release, apache-common

%description cgi
Web status for UPS.

%setup -q
#patch1 -p1
%patch2 -p0
#patch3 -p1
#patch4 -p1
%patch5 -p1

%patch10 -p0

%__tar xzf %{SOURCE1}


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
#autoheader -I autoconf autoconf/ > autoconf/


# work around for autoconf_2.60

export ac_cv_path_SHUTDOWN=/sbin/shutdown

# "--with-halpolicydir" is not working, so, it was removed (patch10) and

#80-apcupsd-ups-policy.fdi will be copied manually.
# --with-halpolicydir=%_datadir/hal/fdi/policy/20thirdparty \

%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 \
--enable-net \
--enable-master-slave \
--enable-snmp \
--with-cgi-bin=%_cgibin \
--with-css-dir=./ \
--with-nisip= \

# SMP-incompatible build.


%__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%_mandir \
cgibin=$RPM_BUILD_ROOT%_cgibin \
pushd $RPM_BUILD_ROOT/sbin
for f in apc*; do
%__ln_s ../../sbin/"$f" ..%_sbindir/
%__mv powerflute ..%_sbindir/

# build new action's sript

%__cp %{SOURCE3} $RPM_BUILD_ROOT/%_sysconfdir/%name/upsdmessages
pushd $RPM_BUILD_ROOT/%_sysconfdir/%name
sh %{SOURCE2}

# copy apctest by hand

%__cp $RPM_BUILD_DIR/%name-%version/src/apctest $RPM_BUILD_ROOT/%_sbindir/

touch $RPM_BUILD_ROOT%_sysconfdir/{nologin,%name/powerfail}

%__mkdir_p $RPM_BUILD_ROOT%_datadir/hal/fdi/policy/20thirdparty
%__cp platforms/80-apcupsd-ups-policy.fdi $RPM_BUILD_ROOT%_datadir/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi

%find_lang %name

%post_service %name

%preun_service %name

%files -n %name -f %name.lang
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*
%config(noreplace) %_initdir/%name
%ghost %_sysconfdir/%name/powerfail
%ghost %_sysconfdir/nologin
%doc ChangeLog Developers ReleaseNotes

%files doc
%doc INSTALL doc examples

%if_enabled cgi
%files cgi


Todas as alterações você pod ver aqui

projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009