]> git.pld-linux.org Git - packages/nut.git/blobdiff - nut.spec
- up to 2.7.4
[packages/nut.git] / nut.spec
index 69c097f03e8e8bbbe7475a94ba196bf34a866d73..e32c48e691f1b341a211419cb51c092168e5d615 100644 (file)
--- a/nut.spec
+++ b/nut.spec
@@ -3,7 +3,6 @@
 #
 # Conditional build:
 %bcond_without usb                     # build without usb drivers
-%bcond_with    hal                     # build with hal support (DEPRECATED)
 %bcond_without snmp                    # build without snmp driver
 %bcond_without cgi                     # build without cgi support
 %bcond_without neon                    # build with neon based XML/HTTP driver
 Summary:       Network UPS Tools
 Summary(pl.UTF-8):     Sieciowe narzędzie do UPS-ów
 Name:          nut
-Version:       2.6.5
+Version:       2.7.4
 Release:       1
 License:       GPL
 Group:         Applications/System
-Source0:       http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz
-# Source0-md5: e6eac4fa04baff0d0a827d64efe81a7e
+Source0:       http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz
+# Source0-md5: 3ba53656933d7471f95140b32a5b8d5c
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}-upsmon.init
@@ -28,17 +27,13 @@ Patch3:             %{name}-upssched-cmd-sysconf.patch
 Patch4:                %{name}-matrix.patch
 Patch5:                systemd-sysconfig.patch
 Patch6:                bcmxcp-off-by-one.patch
-Patch7:                nut-2.6.5-ipmifix.patch
-Patch8:                nut-2.6.5-pthreadfix.patch
-Patch9:                nut-2.6.5-unreachable.patch
+Patch7:                %{name}-build.patch
 URL:           http://www.networkupstools.org/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: avahi-devel
-%{?with_hal:BuildRequires:     dbus-glib-devel}
 BuildRequires: freeipmi-devel
 %{?with_cgi:BuildRequires:     gd-devel >= 2.0.15}
-%{?with_hal:BuildRequires:     hal-devel >= 0.5.8}
 BuildRequires: libltdl-devel
 BuildRequires: libtool
 %{?with_usb:BuildRequires:     libusb-compat-devel}
@@ -52,6 +47,7 @@ Requires:     systemd-units >= 38
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{version}-%{release}
 Requires:      rc-scripts
+Obsoletes:     nut-hal
 Obsoletes:     smartupstools
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -180,18 +176,6 @@ Object file and header for developing NUT clients.
 %description devel -l pl.UTF-8
 Plik wynikowy oraz nagłówek służące do tworzenia klientów NUT-a.
 
-%package hal
-Summary:       NUT integration with FreeDesktop HAL
-Summary(pl.UTF-8):     Pliki do integracji NUT-a z HAL-em
-Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-
-%description hal
-NUT integration with FreeDesktop HAL.
-
-%description hal -l pl.UTF-8
-Pliki do integracji NUT-a z HAL-em.
-
 %prep
 %setup -q
 %patch0 -p1
@@ -202,8 +186,6 @@ Pliki do integracji NUT-a z HAL-em.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
-%patch9 -p1
 
 %build
 cp -f /usr/share/automake/config.sub .
@@ -217,18 +199,14 @@ cp -f /usr/share/automake/config.sub .
        --with-serial \
        --with%{!?with_usb:out}-usb \
        --with%{!?with_snmp:out}-snmp \
-       --with%{!?with_hal:out}-hal \
        --with%{!?with_cgi:out}-cgi \
        --with-avahi \
-       --with-snmp \
        --with-ipmi \
        --with-dev \
        --with%{!?with_neon:out}-neon \
        --with-ssl \
+       --with-openssl \
        %{?with_usb:--with-udev-dir=/etc/udev} \
-       %{!?with_hal:--without-hal} \
-       %{?with_hal:--with-hal-callouts-path=%{_libdir}/hal} \
-       %{?with_hal:--with-hal-fdi-path=%{_datadir}/hal/fdi/information/20thirdparty} \
        --with-statepath=%{_var}/lib/ups \
        --with-drvpath=/lib/nut \
        --with-cgipath=/home/services/httpd/cgi-bin \
@@ -250,15 +228,20 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/upsmon
 
+ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/ups.service
+ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/upsmon.service
+
 for i in $RPM_BUILD_ROOT%{_sysconfdir}/*.sample; do
        mv -f $i ${i%.sample}
 done
 
-%{!?with_usb:rm -f $RPM_BUILD_ROOT%{_udevrulesdir}/52-nut-usbups.rules}
+%{!?with_usb:rm -f $RPM_BUILD_ROOT%{_udevrulesdir}/62-nut-usbups.rules}
 
 cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF
 #!/bin/sh
-/etc/rc.d/init.d/ups powerdown
+echo "Switching the power off"
+/lib/nut/upsdrvctl shutdown
+sleep 60
 EOF
 
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
@@ -286,9 +269,8 @@ fi
 %triggerpostun -- nut < 2.6.4-2
 [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
 [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0
-/sbin/chkconfig --list ups 2>/dev/null | grep -qsv "[0-6]:on" && exit 0
+[ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]ups)" != "/etc/rc.d/rc[0-6].d/S[0-9][0-9]ups" ] || exit 0
 %systemd_service_enable nut-driver.service nut-server.service
-%systemd_service mask ups.service
 
 %pre common
 # move to trigger?
@@ -328,8 +310,8 @@ fi
 [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
 [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0
 /sbin/chkconfig --list upsmon 2>/dev/null | grep -qsv "[0-6]:on" && exit 0
+[ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]upsmon)" != "/etc/rc.d/rc[0-6].d/S[0-9][0-9]upsmon" ] || exit 0
 %systemd_service_enable nut-monitor.service
-%systemd_service mask upsmon.service
 
 %files
 %defattr(644,root,root,755)
@@ -338,6 +320,7 @@ fi
 %attr(755,root,root) %{_bindir}/upslog
 %attr(755,root,root) %{_bindir}/upsrw
 %attr(755,root,root) %{_sbindir}/upsd
+%attr(755,root,root) %{_sbindir}/upsdrvctl
 %attr(755,root,root) /sbin/poweroff-ups
 %attr(755,root,root) %ghost %{_libdir}/libnutscan.so.1
 %attr(755,root,root) %{_libdir}/libnutscan.so.*.*.*
@@ -349,6 +332,7 @@ fi
 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsd.users
 %{systemdunitdir}/nut-driver.service
 %{systemdunitdir}/nut-server.service
+%{systemdunitdir}/ups.service
 %{_mandir}/man5/ups.conf.5*
 %{_mandir}/man5/upsd.conf.5*
 %{_mandir}/man5/upsd.users.5*
@@ -362,8 +346,10 @@ fi
 %{_mandir}/man8/upsrw.8*
 %dir %attr(770,root,ups) /var/lib/ups
 %dir /lib/nut
+%attr(755,root,root) /lib/nut/al175
 %attr(755,root,root) /lib/nut/apcsmart
 %attr(755,root,root) /lib/nut/apcsmart-old
+%attr(755,root,root) /lib/nut/apcupsd-ups
 %attr(755,root,root) /lib/nut/bcmxcp
 %{?with_usb:%attr(755,root,root) /lib/nut/bcmxcp_usb}
 %attr(755,root,root) /lib/nut/belkin
@@ -391,6 +377,8 @@ fi
 %attr(755,root,root) /lib/nut/mge-utalk
 %attr(755,root,root) /lib/nut/microdowell
 %{?with_neon:%attr(755,root,root) /lib/nut/netxml-ups}
+%{?with_usb:%attr(755,root,root) /lib/nut/nutdrv_atcl_usb}
+%attr(755,root,root) /lib/nut/nutdrv_qx
 %attr(755,root,root) /lib/nut/nut-ipmipsu
 %attr(755,root,root) /lib/nut/oldmge-shut
 %attr(755,root,root) /lib/nut/oneac
@@ -399,6 +387,8 @@ fi
 %attr(755,root,root) /lib/nut/powerpanel
 %attr(755,root,root) /lib/nut/rhino
 %{?with_usb:%attr(755,root,root) /lib/nut/richcomm_usb}
+%attr(755,root,root) /lib/nut/riello_ser
+%{?with_usb:%attr(755,root,root) /lib/nut/riello_usb}
 %attr(755,root,root) /lib/nut/safenet
 %attr(755,root,root) /lib/nut/skel
 %{?with_snmp:%attr(755,root,root) /lib/nut/snmp-ups}
@@ -407,14 +397,16 @@ fi
 %attr(755,root,root) /lib/nut/tripplitesu
 %{?with_usb:%attr(755,root,root) /lib/nut/tripplite_usb}
 %attr(755,root,root) /lib/nut/upscode2
-%attr(755,root,root) /lib/nut/upsdrvctl
 %{?with_usb:%attr(755,root,root) /lib/nut/usbhid-ups}
 %attr(755,root,root) /lib/nut/victronups
+%dir %{_datadir}/nut
 %{_datadir}/nut/cmdvartab
 %{_datadir}/nut/driver.list
 %{_mandir}/man5/nut.conf.5*
+%{_mandir}/man8/al175.8*
 %{_mandir}/man8/apcsmart.8*
 %{_mandir}/man8/apcsmart-old.8*
+%{_mandir}/man8/apcupsd-ups.8*
 %{_mandir}/man8/bcmxcp.8*
 %{?with_usb:%{_mandir}/man8/bcmxcp_usb.8*}
 %{_mandir}/man8/belkin.8*
@@ -423,7 +415,8 @@ fi
 %{_mandir}/man8/bestfortress.8*
 %{_mandir}/man8/bestuferrups.8*
 %{_mandir}/man8/bestups.8*
-%{_mandir}/man8/blazer.8*
+%{_mandir}/man8/blazer_ser.8*
+%{?with_usb:%{_mandir}/man8/blazer_usb.8*}
 %{_mandir}/man8/clone.8*
 %{_mandir}/man8/dummy-ups.8*
 %{_mandir}/man8/etapro.8*
@@ -440,6 +433,8 @@ fi
 %{_mandir}/man8/mge-utalk.8*
 %{_mandir}/man8/microdowell.8*
 %{?with_neon:%{_mandir}/man8/netxml-ups.8*}
+%{?with_usb:%{_mandir}/man8/nutdrv_atcl_usb.8*}
+%{_mandir}/man8/nutdrv_qx.8*
 %{_mandir}/man8/nut-ipmipsu.8*
 %{_mandir}/man8/nutupsdrv.8*
 %{_mandir}/man8/oneac.8*
@@ -448,6 +443,8 @@ fi
 %{_mandir}/man8/powerpanel.8*
 %{_mandir}/man8/rhino.8*
 %{?with_usb:%{_mandir}/man8/richcomm_usb.8*}
+%{_mandir}/man8/riello_ser.8*
+%{?with_usb:%{_mandir}/man8/riello_usb.8*}
 %{_mandir}/man8/safenet.8*
 %{?with_snmp:%{_mandir}/man8/snmp-ups.8*}
 %{_mandir}/man8/solis.8*
@@ -456,14 +453,16 @@ fi
 %{?with_usb:%{_mandir}/man8/tripplite_usb.8*}
 %{?with_usb:%{_mandir}/man8/usbhid-ups.8*}
 %{_mandir}/man8/victronups.8*
-%{?with_usb:%config(noreplace) %verify(not md5 mtime size) %{_udevrulesdir}/52-nut-usbups.rules}
+%{?with_usb:%config(noreplace) %verify(not md5 mtime size) %{_udevrulesdir}/62-nut-usbups.rules}
 %config(noreplace) %verify(not md5 mtime size) %{_udevrulesdir}/52-nut-ipmipsu.rules
 
 %files common
 %defattr(644,root,root,755)
 %doc AUTHORS MAINTAINERS NEWS README UPGRADING ChangeLog docs
 %dir %{_sysconfdir}
-%attr(755,root,root) %ghost %{_libdir}/libupsclient.so.1
+%attr(755,root,root) %ghost %{_libdir}/libnutclient.so.0
+%attr(755,root,root) %{_libdir}/libnutclient.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libupsclient.so.4
 %attr(755,root,root) %{_libdir}/libupsclient.so.*.*.*
 
 %files client
@@ -478,6 +477,7 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/upsmon
 /lib/systemd/system-shutdown/nutshutdown
 %{systemdunitdir}/nut-monitor.service
+%{systemdunitdir}/upsmon.service
 %{_mandir}/man5/upsmon.conf.5*
 %{_mandir}/man5/upssched.conf.5*
 %{_mandir}/man8/upsc.8*
@@ -500,21 +500,13 @@ fi
 %{_mandir}/man8/upsstats.cgi.8*
 %endif
 
-%if %{with hal}
-%files hal
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/hal/hald-addon-bcmxcp_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-blazer_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-tripplite_usb
-%attr(755,root,root) %{_libdir}/hal/hald-addon-usbhid-ups
-%{_datadir}/hal/fdi/information/20thirdparty/20-ups-nut-device.fdi
-%endif
-
 %files devel
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnutclient.so
 %attr(755,root,root) %{_libdir}/libupsclient.so
 %attr(755,root,root) %{_libdir}/libnutscan.so
-%{_pkgconfigdir}/libupsclient.pc
+%{_pkgconfigdir}/libnutclient.pc
 %{_pkgconfigdir}/libnutscan.pc
+%{_pkgconfigdir}/libupsclient.pc
 %{_includedir}/*.h
 %{_mandir}/man3/*.3*
This page took 0.086684 seconds and 4 git commands to generate.