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

Outros repositórios
Upstream:3.14.3

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 altlinux.ru>
#BuildArch: i586

Summary: Power management software for APC UPS hardware
License: %gpl2only
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

Patch1: apcupsd-3.14.0.aclocal.m4.patch
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
Patch5: %name-3.12.2-config.sub.path

Patch10: apcupsd-hal_policy_remove-Makefile.in

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.

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

%patch10 -p0

%__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

#autoreconf


# 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=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%_mandir \
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}

%__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
%post_service %name

%preun
%preun_service %name

%files -n %name -f %name.lang
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*
%config(noreplace) %_initdir/%name
%_datadir/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi
/sbin/*
%_sbindir/*
%_localstatedir/%name
%_mandir/man?/*
%ghost %_sysconfdir/%name/powerfail
%ghost %_sysconfdir/nologin
%doc ChangeLog Developers ReleaseNotes

%files doc
%doc INSTALL doc examples

%if_enabled cgi
%files cgi
%_cgibin/*
%endif

%changelog

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