%define _cgibin /var/www/cgi-bin %define _sbindir /sbin # A change in RPM 4.15 causes the make_build macro to misbuild this package. # See https://github.com/rpm-software-management/rpm/issues/798 %global _make_verbose %nil Summary: Power management software for APC UPS hardware Name: apcupsd Version: 3.14.14 Release: %mkrel 4 License: GPLv2 Group: System/Servers URL: https://sourceforge.net/projects/apcupsd/ Source0: https://downloads.sourceforge.net/apcupsd/%{name}-%{version}.tar.gz # From fedora # fix crash in gui, rhbz#578276 Patch0: apcupsd-3.14.9-fixgui.patch # Halt without powering off, rhbz#1442577 Patch1: apcupsd-3.14.4-shutdown.patch # Fix format-security error so we can enable the checks Patch2: apcupsd-format-security.patch # # from debian Patch11: 06-fix-nologin.patch Patch12: 08-fix-loglevels.patch Patch14: 11-wall-on-umounted-usr.patch Patch15: 13-spelling.patch Patch16: 14-update-conf.patch Requires(post): rpm-helper Requires(preun):rpm-helper Requires: tcp_wrappers Requires: nail BuildRequires: pkgconfig(gdlib) BuildRequires: pkgconfig(libusb) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(ncurses) BuildRequires: tcp_wrappers-devel BuildRequires: libstdc++-devel %description 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. %prep %autosetup -p1 # Override the provided platform makefile printf 'install:\n\techo skipped\n' > platforms/redhat/Makefile # fix attribs find examples -type f | xargs chmod 644 %build %serverbuild export LC_CTYPE=en_US.UTF-8 %configure \ --sysconfdir=%{_sysconfdir}/apcupsd \ --enable-usb \ --enable-modbus-usb \ --enable-net \ --enable-master-slave \ --enable-pthreads \ --enable-cgi \ --with-cgi-bin=%{_cgibin} \ --with-serial-dev= \ --with-upstype=usb \ --with-halpolicydir="" \ --with-upscable=usb \ --with-lock-dir=/run/lock \ --with-nisip=127.0.0.1 \ --with-libwrap %make_build %install install -d %{buildroot}%{_initrddir} install -d %{buildroot}%{_cgibin} %make_install #cgibin=%{buildroot}%{_cgibin} install -m0644 platforms/etc/apcupsd.conf %{buildroot}%{_sysconfdir}/apcupsd/ install -m0755 platforms/apccontrol %{buildroot}%{_sysconfdir}/apcupsd/ install -m0755 platforms/mandrake/apcupsd %{buildroot}%{_initrddir}/ for src in changeme commfailure commok onbattery offbattery; do install -m0744 platforms/etc/$src %{buildroot}%{_sysconfdir}/apcupsd/$src done # cleanup pushd doc/manual rm -f *.rst publishdoc Makefile popd %post %_post_service apcupsd %preun %_preun_service apcupsd %files %doc ChangeLog DISCLAIMER Developers ReleaseNotes examples doc/manual %{_initrddir}/apcupsd %dir %{_sysconfdir}/apcupsd %config(noreplace) %{_sysconfdir}/apcupsd/* %{_sbindir}/apcaccess %{_sbindir}/apctest %{_sbindir}/apcupsd %{_sbindir}/smtp %{_cgibin}/multimon.cgi %{_cgibin}/upsfstats.cgi %{_cgibin}/upsimage.cgi %{_cgibin}/upsstats.cgi %{_mandir}/man8/* %{_mandir}/man5/apcupsd.conf.5* %changelog * Wed Nov 02 2022 ghibo <ghibo> 3.14.14-4.mga9 + Revision: 1901612 - Add libusb to BR - Add libusb-1.0 to BR - Fix building disabling verbose in make_build. - Merge patches from fedora and debian. + umeabot <umeabot> - Mageia 9 Mass Rebuild + danf <danf> - Switch URLs from http: to https: * Wed Feb 12 2020 umeabot <umeabot> 3.mga8-current + Revision: 1508901 - Mageia 8 Mass Rebuild + wally <wally> - replace deprecated %%configure2_5x - replace deprecated %%makeinstall_std * Fri Sep 21 2018 umeabot <umeabot> 3.14.14-2.mga7 + Revision: 1294454 - Mageia 7 Mass Rebuild * Tue Jun 07 2016 luigiwalser <luigiwalser> 3.14.14-1.mga6 + Revision: 1020628 - 3.4.14 - remove upstreamed patch 0 - set LC_CTYPE=en_US.UTF-8 to fix piping man output to col command * Tue Feb 09 2016 umeabot <umeabot> 3.14.13-4.mga6 + Revision: 952296 - Mageia 6 Mass Rebuild * Mon Feb 16 2015 oden <oden> 3.14.13-3.mga5 + Revision: 815141 - rebuilt for libgd-2.1.1 * Mon Feb 16 2015 luigiwalser <luigiwalser> 3.14.13-2.mga5 + Revision: 815016 - add upstream patch to fix NIS clients trying to run with no network connection * Fri Feb 06 2015 luigiwalser <luigiwalser> 3.14.13-1.mga5 + Revision: 813798 - 3.14.13 - remove upstreamed patches * Tue Oct 21 2014 luigiwalser <luigiwalser> 3.14.12-4.mga5 + Revision: 792321 - enhance apcaccess fix from upstream * Wed Oct 15 2014 umeabot <umeabot> 3.14.12-3.mga5 + Revision: 741318 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 3.14.12-2.mga5 + Revision: 677861 - Mageia 5 Mass Rebuild * Mon Sep 01 2014 luigiwalser <luigiwalser> 3.14.12-1.mga5 + Revision: 670323 - 3.14.12 - remove upstreamed patches - specifiy lock dir at build time - fix upstream bug in init script - fix upstream bug in apcaccess when host is not specified - do not install hal policy file + tv <tv> - HAL is dead * Sat Oct 19 2013 umeabot <umeabot> 3.14.10-6.mga4 + Revision: 523993 - Mageia 4 Mass Rebuild * Tue May 28 2013 oden <oden> 3.14.10-5.mga4 + Revision: 429281 - rebuilt against libgd.so.3 * Mon Apr 29 2013 luigiwalser <luigiwalser> 3.14.10-4.mga3 + Revision: 411555 - hardcode LOCKDIR due to failed detection in build chroots * Fri Jan 11 2013 umeabot <umeabot> 3.14.10-3.mga3 + Revision: 345932 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 27 2012 luigiwalser <luigiwalser> 3.14.10-2.mga2 + Revision: 202316 - fix buildrequires for C++ linkage - minor spec fixes (from mdv) - remove hiddev patch (not needed, rejected upstream) - replace linkage patch with one from upstream * Sun Jan 01 2012 luigiwalser <luigiwalser> 3.14.10-1.mga2 + Revision: 189396 - update to new version 3.4.10 + mikala <mikala> - imported package apcupsd * Tue May 03 2011 Funda Wang <fwang@mandriva.org> 3.14.8-3mdv2011.0 + Revision: 663746 - fix linkage + Oden Eriksson <oeriksson@mandriva.com> - mass rebuild * Mon Nov 29 2010 Oden Eriksson <oeriksson@mandriva.com> 3.14.8-2mdv2011.0 + Revision: 603181 - rebuild * Tue Jan 19 2010 Frederik Himpe <fhimpe@mandriva.org> 3.14.8-1mdv2010.1 + Revision: 493775 - update to new version 3.14.8 * Tue Aug 04 2009 Frederik Himpe <fhimpe@mandriva.org> 3.14.7-1mdv2010.0 + Revision: 409415 - update to new version 3.14.7 * Mon May 18 2009 Frederik Himpe <fhimpe@mandriva.org> 3.14.6-1mdv2010.0 + Revision: 377285 - Update to new version 3.14.6 - Adapt SPEC file for new manual * Wed Mar 11 2009 Oden Eriksson <oeriksson@mandriva.com> 3.14.5-1mdv2009.1 + Revision: 353768 - 3.14.5 * Sat Dec 20 2008 Oden Eriksson <oeriksson@mandriva.com> 3.14.4-1mdv2009.1 + Revision: 316478 - 3.14.4 - rediff patches, add patches, fix deps * Mon Jun 16 2008 Thierry Vignaud <tv@mandriva.org> 3.14.2-3mdv2009.0 + Revision: 220350 - rebuild - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Sat Nov 17 2007 Funda Wang <fwang@mandriva.org> 3.14.2-2mdv2008.1 + Revision: 109197 - rebuild for new lzma * Thu Nov 01 2007 Giuseppe Ghibò <ghibo@mandriva.com> 3.14.2-1mdv2008.1 + Revision: 104359 - Release 3.14.2. - Release 3.14.1. * Fri Feb 09 2007 Giuseppe Ghibò <ghibo@mandriva.com> 3.13.12-1mdv2007.0 + Revision: 118664 - Import apcupsd * Thu Feb 08 2007 Giuseppe Ghibò <ghibo@mandriva.com> 3.13.12-1mdkv2007.1 - Release 3.13.12. * Tue Sep 19 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 3.12.3-2mdv2007.0 - Rebuild * Wed Jul 26 2006 Emmanuel Andry <eandry@mandriva.org> 3.12.3-1mdv2007.0 - Release 3.12.3 * Tue Apr 04 2006 Giuseppe Ghibò <ghibo@mandriva.com> 3.12.2-1mdk - Release 3.12.2. * Fri Dec 23 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.10-18-5mdk - added missed /etc/apcupsd/apccontrol. * Sun Oct 16 2005 Giuseppe Ghibò <ghibo@mandriva.org> 3.10.18-4mdk - added missed default config file (apcupsd.conf). * Fri Aug 12 2005 Nicolas Lécureuil <neoclust@mandriva.org> 3.10.18-3mdk - fix rpmlint errors (PreReq) * Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 3.10.18-2mdk - fix rpmlint errors (PreReq) * Sun Jul 24 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.10.18-1mdk - Release 3.10.18. - Rebuilt Patch0. * Thu Dec 30 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.16-2mdk - Added Patch0 to fix USB default device under UDEV. - Added Patch1 to support cleaning for usb stale lock files when default device is used. * Tue Nov 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.10.16-1mdk - 3.10.16. * Mon Aug 09 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.15-1mdk - Release 3.10.14. - Dropped Patch0, merged upstream. * Tue Aug 03 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.14-2mdk - Added Patch0 to avoid segfault during EEPROM configuring. * Tue Aug 03 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.14-1mdk - Dropped Patch0, Patch1, merged upstream. - Release 3.10.14. * Fri Jul 30 2004 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.13-3mdk - fix problem with lock files (Giuseppe Ghibo) * Thu Jul 29 2004 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.13-2mdk - fix build (P0 from Pascal Terjan) - fix unowned dir - cosmetics - drop docs there's no need for - add prereq on rpm-helper * Sat May 22 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.13-1mdk - 3.10.13.