--- rpms/nut/sme7/nut.spec 2007/06/12 16:42:25 1.1 +++ rpms/nut/sme7/nut.spec 2007/10/09 18:32:59 1.2 @@ -3,45 +3,45 @@ %define initdir /etc/rc.d/init.d %define cgidir /var/www/nut-cgi-bin -%define htmldir /var/www/html/nut %define piddir /var/run/nut %define modeldir /sbin -%define devel 0 - Summary: Network UPS Tools Name: nut -Version: 2.0.5 -Release: 1%{?dist} +Version: 2.2.0 +Release: 3.2%{?dist} Group: Applications/System -License: GPL -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Url: http://wwww.networkupstools.org/ -Source: http://www.networkupstools.org/source/2.0/%{name}-%{version}.tar.gz +License: GPLv2+ +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Url: http://www.networkupstools.org/ +Source: http://www.networkupstools.org/source/2.2/%{name}-%{version}.tar.gz Source1: ups.init Source2: ups.sysconfig -Requires: nut-client - -Prereq: fileutils -Prereq: /sbin/chkconfig -Prereq: /sbin/service - -%if "%{?rhel}" != "5" -BuildPrereq: gd-progs -BuildPrereq: xorg-x11-devel -%endif -BuildPrereq: openssl-devel -BuildPrereq: gd-devel -BuildPrereq: freetype-devel -BuildPrereq: netpbm-devel -BuildPrereq: libpng-devel -BuildPrereq: net-snmp-devel -BuildPrereq: elfutils-devel -BuildPrereq: libjpeg-devel +Patch0: nut-2.2.0-conf.patch +Patch1: nut-2.2.0-multilib.patch +Patch2: nut-2.2.0-udevusb.patch +Patch3: nut-2.2.0-glibcopen.patch +Patch4: nut-2.2.0-wrongssl.patch + +Requires: nut-client => 2.0.0 dbus-glib shadow-utils +Requires(post): fileutils chkconfig /sbin/service +Requires(postun): fileutils chkconfig /sbin/service + +BuildRequires: gd-devel +BuildRequires: freetype-devel +BuildRequires: netpbm-devel +BuildRequires: libpng-devel +BuildRequires: net-snmp-devel +BuildRequires: elfutils-devel +BuildRequires: xorg-x11-devel +BuildRequires: libjpeg-devel +BuildRequires: fontconfig-devel +BuildRequires: pkgconfig +BuildRequires: openssl-devel %ifnarch s390 s390x -BuildPrereq: libusb-devel +BuildRequires: libusb-devel %endif ExcludeArch: s390 s390x @@ -56,8 +56,6 @@ live status tracking on web pages, and m %package client Group: Applications/System Summary: Network UPS Tools client monitoring utilities -Prereq: chkconfig -Prereq: /usr/sbin/useradd %description client This package includes the client utilities that are required to monitor a @@ -67,7 +65,7 @@ attached to a different computer on the %package cgi Group: Applications/System Summary: CGI utilities for the Network UPS Tools -Requires: webserver +Requires: %{name}-client = %{version}-%{release} webserver %description cgi This package includes CGI programs for accessing UPS status via a web @@ -76,7 +74,7 @@ browser. %package devel Group: Development/Libraries Summary: Development files for NUT Client -Requires: webserver +Requires: %{name}-client = %{version}-%{release} webserver openssl-devel %description devel This package contains the development header files and libraries @@ -84,10 +82,11 @@ necessary to develop NUT client applicat %prep %setup -q - - -iconv -f iso-8859-1 -t utf-8 < man/newhidups.8 > man/newhidups.8_ -mv man/newhidups.8_ man/newhidups.8 +%patch0 -p1 -b .conf +%patch1 -p1 -b .multilib +%patch2 -p1 -b .udevusb +%patch3 -p1 -b .open +%patch4 -p1 -b .wrongssl %build %configure \ @@ -98,50 +97,61 @@ mv man/newhidups.8_ man/newhidups.8 --with-altpidpath=%{piddir} \ --sysconfdir=%{_sysconfdir}/ups \ --with-cgipath=%{cgidir} \ - --with-htmlpath=%{htmldir} \ --with-drvpath=%{modeldir} \ + --with-serial \ + --with-usb \ + --with-snmp \ --with-cgi \ + --with-lib \ + --with-ssl \ + --with-ipv6 \ --with-gd-libs \ - --with-linux-hiddev=/usr/include/linux/hiddev.h + --with-linux-hiddev=%{_includedir}/linux/hiddev.h \ + --with-pkgconfig-dir=%{_libdir}/pkgconfig \ + --disable-static \ +%ifarch x86_64 + --with-gd-libs="-L/usr/X11R6/lib64 -lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" +%endif make %{?_smp_mflags} -make %{?_smp_mflags} snmp -make %{?_smp_mflags} usb + +# fix old enconding manpages +mv man/upscode2.8 man/upscode2.8.iso +iconv -f ISO8859-1 -t UTF-8 -o man/upscode2.8 man/upscode2.8.iso +mv man/bcmxcp.8 man/bcmxcp.8.iso +iconv -f ISO8859-1 -t UTF-8 -o man/bcmxcp.8 man/bcmxcp.8.iso +mv man/bcmxcp_usb.8 man/bcmxcp_usb.8.iso +iconv -f ISO8859-1 -t UTF-8 -o man/bcmxcp_usb.8 man/bcmxcp_usb.8.iso +rm -f man/*.iso %install rm -rf %{buildroot} mkdir -p %{buildroot}%{modeldir} \ %{buildroot}%{_sysconfdir}/sysconfig \ + %{buildroot}%{_sysconfdir}/udev/rules.d \ %{buildroot}%{piddir} \ %{buildroot}%{_localstatedir}/lib/ups \ %{buildroot}%{initdir} -make install install-conf \ - install-cgi-conf \ - install-cgi \ - install-usb \ - install-snmp DESTDIR=%{buildroot} +make install DESTDIR=%{buildroot} + +install -m 755 drivers/energizerups %{buildroot}%{modeldir}/ install -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/ups install -m 755 %{SOURCE1} %{buildroot}%{initdir}/ups -mkdir -p %{buildroot}%{_sysconfdir}/hotplug/usb/ -install -m 755 scripts/hotplug/libhidups %{buildroot}%{_sysconfdir}/hotplug/usb/ -install -m 644 scripts/hotplug/libhid.usermap %{buildroot}%{_sysconfdir}/hotplug/usb/ +install -m 644 man/gamatronic.* %{buildroot}%{_mandir}/man8/ + +rm -rf %{buildroot}%{_prefix}/html +rm -f %{buildroot}%{_libdir}/*.la -# rename +cd conf; make install DESTDIR=%{buildroot} for file in %{buildroot}%{_sysconfdir}/ups/*.sample do mv $file %{buildroot}%{_sysconfdir}/ups/`basename $file .sample` done -%if !%{devel} -rm -rf %{buildroot}%{_includedir} \ - %{buildroot}%{_mandir}/man3/upscli_* \ - %{buildroot}%{_libdir}/*upsclient* -%endif - %pre /usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} -G uucp \ -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : @@ -156,6 +166,7 @@ rm -rf %{buildroot}%{_includedir} \ %post client /sbin/chkconfig --add ups +/sbin/ldconfig exit 0 %preun client @@ -163,6 +174,7 @@ if [ "$1" = "0" ]; then /sbin/service ups stop > /dev/null 2>&1 /sbin/chkconfig --del ups fi +/sbin/ldconfig exit 0 %postun client @@ -175,12 +187,13 @@ exit 0 rm -rf %{buildroot} %files -%defattr(-,root,root) -%doc COPYING CREDITS ChangeLog README docs UPGRADING +%defattr(-,root,root,-) +%doc COPYING ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/ups.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.users %config(noreplace) %attr(644,root,root) %{_sysconfdir}/sysconfig/ups +%config(noreplace) %attr(644,root,root) %{_sysconfdir}/udev/rules.d/* %attr(755,root,root) %{_sysconfdir}/hotplug/usb/libhidups %attr(644,root,root) %{_sysconfdir}/hotplug/usb/libhid.usermap %{modeldir}/* @@ -198,7 +211,6 @@ rm -rf %{buildroot} %{_mandir}/man8/cyberpower.8.gz %{_mandir}/man8/everups.8.gz %{_mandir}/man8/etapro.8.gz -%{_mandir}/man8/fentonups.8.gz %{_mandir}/man8/genericups.8.gz %{_mandir}/man8/isbmex.8.gz %{_mandir}/man8/liebert.8.gz @@ -207,7 +219,6 @@ rm -rf %{buildroot} %{_mandir}/man8/nutupsdrv.8.gz %{_mandir}/man8/oneac.8.gz %{_mandir}/man8/powercom.8.gz -%{_mandir}/man8/sms.8.gz %{_mandir}/man8/tripplite.8.gz %{_mandir}/man8/tripplitesu.8.gz %{_mandir}/man8/victronups.8.gz @@ -217,25 +228,25 @@ rm -rf %{buildroot} %{_mandir}/man8/energizerups.8.gz %{_mandir}/man8/safenet.8.gz %{_mandir}/man8/belkinunv.8.gz -%{_mandir}/man8/hidups.8.gz -%{_mandir}/man8/ippon.8.gz -%{_mandir}/man8/newhidups.8.gz %{_mandir}/man8/snmp-ups.8.gz %{_mandir}/man8/bestfcom.8.gz %{_mandir}/man8/cpsups.8.gz %{_mandir}/man8/metasys.8.gz -%{_mandir}/man8/mustek.8.gz %{_mandir}/man8/bcmxcp.8* %{_mandir}/man8/solis.8* %{_mandir}/man8/upscode2.8* -%{_mandir}/man8/bcmxcp_usb.8* -%{_mandir}/man8/tripplite_usb.8* -%{_mandir}/man8/al175.8.gz +%{_mandir}/man8/bcmxcp_usb.8.gz +%{_mandir}/man8/gamatronic.8.gz +%{_mandir}/man8/tripplite_usb.8.gz %{_mandir}/man8/dummy-ups.8.gz +%{_mandir}/man8/al175.8.gz %{_mandir}/man8/megatec.8.gz %{_mandir}/man8/nitram.8.gz %{_mandir}/man8/optiups.8.gz %{_mandir}/man8/powerpanel.8.gz +%{_mandir}/man8/megatec_usb.8.gz +%{_mandir}/man8/rhino.8.gz +%{_mandir}/man8/usbhid-ups.8.gz %files client %defattr(-,root,root) @@ -250,6 +261,8 @@ rm -rf %{buildroot} %{_bindir}/upsrw %{_sbindir}/upsmon %{_sbindir}/upssched +%{_bindir}/upssched-cmd +%{_libdir}/libupsclient.so.* %{_mandir}/man5/upsmon.conf.5.gz %{_mandir}/man5/upssched.conf.5.gz %{_mandir}/man8/upsc.8.gz @@ -260,13 +273,12 @@ rm -rf %{buildroot} %{_mandir}/man8/upssched.8.gz %files cgi -%defattr(-,root,root) +%defattr(-,root,root,-) %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf %config(noreplace) %attr(600,nut,root) %{_sysconfdir}/ups/upsset.conf %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/upsstats.html %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/upsstats-single.html -%{cgidir} -%{htmldir} +%{cgidir}/ %{_mandir}/man5/hosts.conf.5.gz %{_mandir}/man5/upsstats.html.5.gz %{_mandir}/man5/upsset.conf.5.gz @@ -274,57 +286,99 @@ rm -rf %{buildroot} %{_mandir}/man8/upsstats.cgi.8.gz %{_mandir}/man8/upsset.cgi.8.gz +%files devel +%defattr(-,root,root,-) +%{_bindir}/libupsclient-config +%{_includedir}/* +%{_mandir}/man3/upscli* +%{_libdir}/libupsclient.so +%{_libdir}/pkgconfig/libupsclient.pc + %changelog -* Sun Apr 29 2007 Shad L. Lords -- Clean up spec so package can be built by koji/plague +* Wed Sep 19 2007 Tomas Smetana 2.2.0-3.2 +- fix building of cgi package on x86_64 + +* Wed Sep 19 2007 Tomas Smetana 2.2.0-3.1 +- fix manpages encodings +- run ldconfig after client (un)install +- remove hal support for EL4 + +* Thu Sep 06 2007 Tomas Smetana 2.2.0-3 +- fix wrong libssl flags in devel, fix devel package dependencies + +* Wed Aug 15 2007 Tomas Smetana 2.2.0-2 +- fix #249028 - usb udev rules +- update initscript and sysconfig file +- fix calls to open() for compatibility with the new glibc + +* Fri Jul 13 2007 Tomas Smetana 2.2.0-1.1 +- rebuild + +* Fri Jul 13 2007 Tomas Smetana 2.2.0-1 +- new upstream version (Resolves: #248074) +- initscripts update +- spec file cleanup + +* Mon May 07 2007 Arnaud Quette 2.1.0-1 +- update to 2.1.0 development tree +- HAL, ... + +* Mon Mar 26 2007 Than Ngo 2.0.5-3 +- cleanup + +* Tue Jan 23 2007 Karsten Hopp 2.0.5-2 +- rename fatal to fatal_with_errno in ipv6 patch +- fix filelist -* Thu Jan 18 2007 Shad L. Lords 2.0.5-1 -- Update to upstream 2.0.5, without any patches. +* Tue Jan 23 2007 Karsten Hopp 2.0.5-1 +- update to 2.0.5 -* Thu Dec 07 2006 Shad L. Lords -- Update to new release naming. No functional changes. -- Make Packager generic +* Wed Nov 29 2006 Karsten Hopp 2.0.4-2 +- rebuild with new net-snmp-libs +- disable nut-2.0.1-bad.patch, not required -* Tue Nov 07 2006 Charlie Brady 2.0.4-1sme1 -- Update to upstream 2.0.4, without any patches. +* Tue Nov 21 2006 Than Ngo - 2.0.4-1 +- add IPv6 support, thanks to Dan KopeƄek (#198394) -* Thu Feb 16 2006 Charlie Brady 2.0.3-2sme1 -- Patch up to current CVS, to grab latest driver updates. +* Wed Jul 12 2006 Jesse Keating - 2.0.3-2.1 +- rebuild -* Thu Feb 16 2006 Charlie Brady 2.0.3-1sme1 -- Upgrade to version 2.0.3, with no new patches. +* Tue May 16 2006 Than Ngo 2.0.3-2 +- fix #191914, BR fontconfig-devel for cgi -* Fri Feb 10 2006 Charlie Brady 2.0.3-pre2-sme6 -- Apply additional patch to discover data formats in APC UPSes. +* Mon Apr 24 2006 Than Ngo 2.0.3-1 +- update to 2.0.3 +- drop nut-2.0.2-buffer.patch, it's included in new upstream +- add udev rule #189674, #187105 -* Wed Feb 8 2006 Charlie Brady 2.0.3-pre2-sme5 -- Apply additional patch to discover data formats in APC UPSes. +* Fri Feb 10 2006 Jesse Keating - 2.0.2-6.2 +- bump again for double-long bug on ppc(64) -* Wed Feb 01 2006 Charlie Brady 2.0.3-pre2-sme4 -- Bugfix in battery mfg date conversion for APC UPSes. +* Tue Feb 07 2006 Jesse Keating - 2.0.2-6.1 +- rebuilt for new gcc4.1 snapshot and glibc changes -* Fri Jan 27 2006 Charlie Brady 2.0.3-pre2-sme3 -- Some more fine tuning of low end APC support. +* Tue Jan 03 2006 Radek Vokal 2.0.2-6 +- rebuilt against new libnetsnmp -* Thu Jan 26 2006 Charlie Brady 2.0.3-pre2-sme2 -- Add new patch from Peter Selinger, for low end APCs. +* Fri Dec 09 2005 Jesse Keating +- rebuilt -* Thu Jan 26 2006 Charlie Brady 2.0.3-pre2-sme1 -- Update to 2.0.3-pre2. -- Remove Peter Selinger's patch, presumed obsolete. +* Wed Nov 23 2005 Than Ngo 2.0.2-5 +- fix for modular X -* Wed Jan 18 2006 Charlie Brady 2.0.2-1sme2 -- Add hotplug configuration for usb, also from Peter Selinger. +* Wed Nov 09 2005 Than Ngo 2.0.2-4 +- rebuilt -* Tue Jan 10 2006 Charlie Brady 2.0.2-1sme1 -- Add various APC USB fixes from Peter Selinger. +* Mon Nov 07 2005 Than Ngo 2.0.2-3 +- rebuilt -* Fri Oct 07 2005 Than Ngo 2.0.2-0.fc4.2 -- own /var/www/nut-cgi-bin #169904 +* Thu Nov 03 2005 Than Ngo 2.0.2-2 +- rebuilt against new libnetsnmp -* Tue Oct 04 2005 Than Ngo 2.0.2-0.fc4.1 +* Wed Jul 20 2005 Than Ngo 2.0.2-1 - fix compiler warnings #156027 -- remove debug messages #160700 +- fix pid issue #159450 +- fix wrong ownership and permissions #159449, #141123 - update to 2.0.2 * Thu Mar 10 2005 Than Ngo 2.0.1-1