Package apcupsd: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | %define _cgibin /var/www/cgi-bin %def_disable cgi Name: apcupsd Version: 3.14.14 Release: alt3 Packager: Sergey Y. Afonin <asy@altlinux.ru> 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 Source4: apcupsdmessages Source5: apcupsd-get_killpower_delay Source6: apcupsd-README.ALT.utf8 Patch1: %name-3.14.6-alt-specific-configure.in.patch Patch2: %name-3.12.2-config.sub.patch Patch3: %name-3.14.8-apctest.date.patch Patch10: apcupsd-3.14.4-hal_policy-Makefile.patch Patch11: 0001-Reworking-fix-on-autoconf.patch #Errata/FR #Patch100: BuildRequires: rpm-build-licenses BuildRequires: gcc-c++ imake makedepend gzip-utils hostinfo libncurses-devel libtinfo-devel libX11-devel libusb-compat-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). !!Warning!! UPSes with Microlink protocol is not supported because APC does not reveal features of the protocol. %package doc Group: System/Servers License: %fdl Summary: apcupsd documentation BuildArch: noarch %description doc The %name-doc package contains Here the documentation about apcupsd daemon and apctest utility. #package locales #Summary: National Language files for apcupsd #License: %gpl2only #Group: System/Servers #BuildArch: noarch # #description locales #National Language files for apcupsd %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 -p0 #patch2 -p1 %patch3 -p2 %patch10 -p0 %patch11 -p1 #patch100 -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="\"\\\"./\\\"\"" cp autoconf/configure.in autoconf/aclocal.m4 . %autoreconf -I autoconf # work around for autoconf_2.60 export ac_cv_path_SHUTDOWN=/sbin/shutdown %configure \ --sbindir=/sbin \ --sysconfdir=%_sysconfdir/%name \ --with-log-dir=%_localstatedir/%name \ --with-lock-dir=%_lockdir/serial \ %{subst_enable cgi} \ --enable-usb \ --enable-modbus-usb \ --enable-net \ --enable-snmp \ --with-cgi-bin=%_cgibin \ --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 popd cp %{SOURCE5} $RPM_BUILD_ROOT/%_sysconfdir/%name/get_killpower_delay cp %{SOURCE3} $RPM_BUILD_ROOT/%_sysconfdir/%name/upsdmessages mkdir $RPM_BUILD_ROOT/%_sysconfdir/sysconfig cp %{SOURCE4} $RPM_BUILD_ROOT/%_sysconfdir/sysconfig/apcupsdmessages # build new action's script pushd $RPM_BUILD_ROOT/%_sysconfdir/%name sh %{SOURCE2} popd cp %{SOURCE6} README.ALT.utf8 cp $RPM_BUILD_DIR/%name-%version/src/apctest $RPM_BUILD_ROOT/%_sbindir/ touch $RPM_BUILD_ROOT%_sysconfdir/{nologin,%name/powerfail} gzip ChangeLog #find_lang %name %post %post_service %name %preun %preun_service %name %files %dir %_sysconfdir/%name %config(noreplace) %_sysconfdir/%name/* %config(noreplace) %_sysconfdir/sysconfig/apcupsdmessages %attr(0755,root,root) %config(noreplace) %_initdir/%name %attr(0755,root,root) /sbin/* %attr(0755,root,root) %_sbindir/* %_localstatedir/%name %_mandir/man?/* %ghost %_sysconfdir/%name/powerfail %ghost %_sysconfdir/nologin %doc ChangeLog.gz Developers ReleaseNotes README.ALT.utf8 %exclude %_datadir/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi #files locales -f %name.lang %files doc %doc INSTALL doc examples %if_enabled cgi %files cgi %_cgibin/* %endif %changelog * Thu Jul 27 2023 Artyom Bystrov <arbars@altlinux.org> 3.14.14-alt3 - Reworking fix with autoconf (tnx to glebfm@) * Tue Jul 25 2023 Artyom Bystrov <arbars@altlinux.org> 3.14.14-alt2 - Use autoconf_2.60 * Sun Jul 10 2016 Sergey Y. Afonin <asy@altlinux.ru> 3.14.14-alt1 - New version * Fri Feb 20 2015 Sergey Y. Afonin <asy@altlinux.ru> 3.14.13-alt1 - New version (added MODBUS USB support) - added TIMELEFT to some short messages - removed old (unrecognized) configure's options: enable-powerflute, enable-pthreads, enable-nls, enable-master-slave, with-css-dir * Sun Mar 30 2014 Sergey Y. Afonin <asy@altlinux.ru> 3.14.12-alt1 - New version - converted README.ALT to UTF8 - added possibility to set options through sysconfig/apcupsd * Wed Feb 26 2014 Sergey Y. Afonin <asy@altlinux.ru> 3.14.11-alt3 - Fixed write to eeprom by apctest (based on apcupsd's SVN [r2097]) * Mon Feb 17 2014 Sergey Y. Afonin <asy@altlinux.ru> 3.14.11-alt2 - Fix issue with net driver not reporting MODEL (apcupsd's SVN [r2068]) - apcsmart port reopen when COMMLOST (apcupsd's SVN [r2096]) * Sat Feb 01 2014 Sergey Y. Afonin <asy@altlinux.ru> 3.14.11-alt1 - New version (with MODBUS support) * Tue Jul 03 2012 Sergey Y. Afonin <asy@altlinux.ru> 3.14.10-alt2 - Fixed typo in platforms/altlinux/apcupsd.in - Some improvements in script "upsdmessages" * Wed Sep 14 2011 Sergey Y. Afonin <asy@altlinux.ru> 3.14.10-alt1 - New version * Fri Aug 05 2011 Sergey Y. Afonin <asy@altlinux.ru> 3.14.9-alt1 - New version * Sat May 07 2011 Sergey Y. Afonin <asy@altlinux.ru> 3.14.8-alt2 - Removed "Conflicts: nut" (ALT #25462) - Swapped DD/MM to MM/DD in apctest's messages - Do not package hal policy - Removed unused patches from spec * Tue Jan 26 2010 Sergey Y. Afonin <asy@altlinux.ru> 3.14.8-alt1 - New version (battery calibration supported via USB now) * Mon Oct 12 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.7-alt2 - Changed xorg-x11-devel to libX11-devel in BuildRequires - Removed %__ macroses * Mon Aug 31 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.7-alt1 - New version * Mon Jun 22 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.6-alt2 - Changed permissions for binary files and init script (ALT #20338) * Tue Jun 02 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.6-alt1 - New version * Fri May 08 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.5-alt2 - Fixed building with glibc 2.10 (mhlavink@redhat) * Sat Apr 11 2009 Sergey Y. Afonin <asy@altlinux.ru> 3.14.5-alt1 - New version * Sat Nov 15 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.4-alt5 - Changed "init.d/apcupsd status" behaviour (call status instead of apcaccess) * Fri Nov 14 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.4-alt4 - Added lsb init header - Added BuildArch: noarch for doc package - Static build with libnet-snmp due to running after file systems unmount * Sat Jul 12 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.4-alt3 - Fixed in get_killpower_delay added -i to egrep call (models can be Smart-UPS and SMART-UPS) a lead zero is removed in output * Fri Jun 06 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.4-alt2 - Added README.ALT.koi8-r * Tue Jun 03 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.4-alt1 - New version (powerflute is removed, see changelog) - Fixed in init script: killpower is applied at "service stop" if shutdown initiated by power failure (sometime it is impossible when file systems unmounted) script is called before network stop when shutdown (communications with UPS can be established via snmp) * Tue Jan 22 2008 Sergey Y. Afonin <asy@altlinux.ru> 3.14.3-alt1 - New version * Sat Dec 29 2007 Sergey Y. Afonin <asy@altlinux.ru> 3.14.2-alt3 - Change: rebuild with --enable-snmp * Tue Dec 25 2007 Sergey Y. Afonin <asy@altlinux.ru> 3.14.2-alt2 - Fix: build with autoconf_2.60 (export ac_cv_path_SHUTDOWN=/sbin/shutdown) * Tue Oct 16 2007 Sergey Y. Afonin <asy@altlinux.ru> 3.14.2-alt1 - New version * Tue May 29 2007 Sergey Y. Afonin <asy@altlinux.ru> 3.14.1-alt1 - New version * Fri Feb 16 2007 Sergey Y. Afonin <asy@altlinux.ru> 3.14.0-alt1 - New version If you use the old style master/slave networking mode, be sure to read the release notes. * Tue Aug 29 2006 Sergey Y. Afonin <asy@altlinux.ru> 3.12.4-alt1 - New version - Fix: #9925 (--enable-net) * Mon May 29 2006 Sergey Y. Afonin <asy@altlinux.ru> 3.12.3-alt1 - New version - Fix: #9627 (wrong mandir) * Tue Feb 28 2006 Sergey Y. Afonin <asy@altlinux.ru> 3.12.2-alt1 - New version * Fri Dec 16 2005 Sergey Y. Afonin <asy@altlinux.ru> 3.10.18-alt1 - New version * Wed Jun 01 2005 Sergey Y. Afonin <asy@altlinux.ru> 3.10.17-alt2 - Change: compiled with "--enable-master-slave" * Thu Apr 14 2005 Sergey Y. Afonin <asy@altlinux.ru> 3.10.17-alt1 - New version, return from absoleted - Fix: add ghost powerfail and nologin to %files in spec - Fix: conflict with nut package - New: change action scripts - New: add apctest to package - New: move doc to apcupsd-doc package - Change: Disable usb_killpower.patch and daemonize.patch (fixed in mainstream) - Change: Split alt-specific.patch to platforms-altlinux.tgz and alt-specific-configure.in.patch - Change: Disable calling of autoheader (not work with new source) - Change: new format for init script * Wed Apr 30 2003 Sergey Vlasov <vsu@altlinux.ru> 3.10.5-alt1 - Updated to 3.10.5. - Dropped old patch for gcc3 support. - Updated alt-specific patch. - Built --with-nisip=127.0.0.1 (previously set by the patch). - Patch to fix killpower for USB UPSes (apcupsd part; the kernel fix is also needed to make killpower work). - Patch from CVS to daemonize properly (previously stdin was not closed). * Mon Dec 23 2002 Dmitry V. Levin <ldv@altlinux.org> 3.10.1-alt2 - Fixed scripts (broken in 3.10.1-alt1). - Specfile cleanup. - Built --with-lock-dir=%%_lockdir/serial. - Additional convention enforcement on patch file names. - Disabled cgi subpackage (unclean build). * Fri Dec 06 2002 Kachalov Anton <mouse@altlinux.ru> 3.10.1-alt1 - Updated to 3.10.1 - Fixed build with gcc3 - Enabled usb support - Moved web stuff to separate subpackage. * Mon Aug 20 2001 Dmitry V. Levin <ldv@altlinux.ru> 3.8.2-alt1 - 3.8.2 - Moved important binaries from %_sbindir to /sbin. * Wed Jan 24 2001 Dmitry V. Levin <ldv@fandra.org> 3.8.1-ipl1mdk - RE adaptions (a lot). * Mon Dec 4 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.8.0-1mdk - new version * Wed Aug 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-3mdk - %%postun => %%preun * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-2mdk - automatically added BuildRequires * Fri Jul 28 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-1mdk - first mandrake version |