Accepting request 489344 from home:sbrabec:branches:hardware
- Update to version 2.7.4: For more see NEWS and UPGRADING in /usr/share/doc/packages/nut. * New class of device supported: ATS - Automatic Transfer Switch * NUT command and variable naming scheme changes. * support for new devices: AEG PROTECT B / NAS APC ATS AP7724 (should be supported) Asium P700 Eaton ATS Eaton 5E 1100iUSB Eaton E Series DX UPS 1-20 kVA Eaton Powerware 9125-5000g Electrys UPS 2500 Fideltronic INIGO Viper 1200 Legrand Keor Multiplug LYONN CTB-800V Micropower LCD 1000 NHS Laser Senoidal 5000VA Sweex model P220 TS Shara Various APCUPSD-controlled APC devices * snmp-ups improvements. * Eaton: improvements and fixes of 3ph SNMP, ePDU (G2 and G3) and XML/PDC. * Further fixes and improvements of bcmxcp_usb, dummy-ups, libnutclient, nutdrv_atcl_usb, nutdrv_qx, nut-ipmipsu, solis, tripplitesu, usbhid-ups. * nut-scanner: Don't depend on development libraries (boo#963505). * Improved SSL support through Mozilla NSS, Augeas support. * Fixed UPower device matching in recent kernels. * nut-server.service: Restore systemd relationship (drop 0001-Restore-systemd-relationship-with-nut-driver-service.patch). * Network protocol information change. - Drop dummy init scripts. They are not needed any more (nut-monitor, nut-server, nut-driver, boo#801542#c2). - Build and package documentation (nut-doc-fixed-date.patch, nut-doc-cables.patch). - Fix dependencies. - Fix bash-completion path. OBS-URL: https://build.opensuse.org/request/show/489344 OBS-URL: https://build.opensuse.org/package/show/hardware/nut?expand=0&rev=57
This commit is contained in:
parent
89a6130492
commit
603fbb3bed
@ -1,32 +0,0 @@
|
||||
From c98fab9f5dec993aa9f5e0a3e79de53ae9ecd32b Mon Sep 17 00:00:00 2001
|
||||
From: Arnaud Quette <arnaud.quette@free.fr>
|
||||
Date: Thu, 7 May 2015 15:43:17 +0200
|
||||
Subject: [PATCH 1/2] Restore systemd relationship with nut-driver service
|
||||
|
||||
The Requires directive from nut-server to nut-driver was previously
|
||||
removed, since it was preventing upsd from starting whenever one or more
|
||||
drivers, among several, was failing to start.
|
||||
Use the Wants directive, a weaker version of Requires, which will start
|
||||
upsd even if the nut-driver unit fails to start.
|
||||
|
||||
closes https://github.com/networkupstools/nut/issues/200
|
||||
---
|
||||
scripts/systemd/nut-server.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in
|
||||
index dada977..fe20145 100644
|
||||
--- a/scripts/systemd/nut-server.service.in
|
||||
+++ b/scripts/systemd/nut-server.service.in
|
||||
@@ -4,7 +4,7 @@ After=local-fs.target network.target nut-driver.service
|
||||
# We don't Require drivers to be successfully started! This would be
|
||||
# a change of behavior compared to init SysV, and could prevent from
|
||||
# accessing successfully started, at least to audit a system.
|
||||
-#Requires=nut-driver.service
|
||||
+Wants=nut-driver.service
|
||||
Before=nut-monitor.service
|
||||
|
||||
[Service]
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ff44d95d06a51559a0a018eef7f8d17911c1002b6352a7d7580ff75acb12126b
|
||||
size 2317478
|
Binary file not shown.
3
nut-2.7.4.tar.gz
Normal file
3
nut-2.7.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:980e82918c52d364605c0703a5dcf01f74ad2ef06e3d365949e43b7d406d25a7
|
||||
size 2509831
|
BIN
nut-2.7.4.tar.gz.sig
Normal file
BIN
nut-2.7.4.tar.gz.sig
Normal file
Binary file not shown.
18
nut-doc-cables.patch
Normal file
18
nut-doc-cables.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Index: nut-2.7.4/docs/Makefile.am
|
||||
===================================================================
|
||||
--- nut-2.7.4.orig/docs/Makefile.am
|
||||
+++ nut-2.7.4/docs/Makefile.am
|
||||
@@ -46,11 +46,13 @@ EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEP
|
||||
ASCIIDOC_HTML_SINGLE = user-manual.html \
|
||||
developer-guide.html \
|
||||
packager-guide.html \
|
||||
+ cables.html \
|
||||
FAQ.html
|
||||
|
||||
ASCIIDOC_HTML_CHUNKED = user-manual.chunked \
|
||||
developer-guide.chunked \
|
||||
packager-guide.chunked \
|
||||
+ cables.html \
|
||||
FAQ.html
|
||||
|
||||
ASCIIDOC_PDF = user-manual.pdf \
|
30
nut-doc-fixed-date.patch
Normal file
30
nut-doc-fixed-date.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Index: nut-2.7.4/docs/Makefile.am
|
||||
===================================================================
|
||||
--- nut-2.7.4.orig/docs/Makefile.am
|
||||
+++ nut-2.7.4/docs/Makefile.am
|
||||
@@ -92,8 +92,8 @@ packager-guide.html packager-guide.chunk
|
||||
# $ ASCIIDOC_VERBOSE=-v make
|
||||
A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \
|
||||
--xsltproc-opts "--nonet" \
|
||||
- --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \
|
||||
- --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \
|
||||
+ --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d -r $(top_srcdir)/ChangeLog`\"" \
|
||||
+ --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S -r $(top_srcdir)/ChangeLog`\"" \
|
||||
--xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \
|
||||
--attribute iconsdir=$(srcdir)/images \
|
||||
--attribute=badges \
|
||||
Index: nut-2.7.4/docs/man/Makefile.am
|
||||
===================================================================
|
||||
--- nut-2.7.4.orig/docs/man/Makefile.am
|
||||
+++ nut-2.7.4/docs/man/Makefile.am
|
||||
@@ -591,8 +591,8 @@ if HAVE_ASCIIDOC
|
||||
|
||||
.txt.html:
|
||||
$(ASCIIDOC) --backend=xhtml11 \
|
||||
- --attribute localdate=`TZ=UTC date +%Y-%m-%d` \
|
||||
- --attribute localtime=`TZ=UTC date +%H:%M:%S` \
|
||||
+ --attribute localdate=`TZ=UTC date +%Y-%m-%d -r $(top_srcdir)/ChangeLog` \
|
||||
+ --attribute localtime=`TZ=UTC date +%H:%M:%S -r $(top_srcdir)/ChangeLog` \
|
||||
--attribute nutversion="@PACKAGE_VERSION@" \
|
||||
-o $@ $<
|
||||
|
16
nut-driver
16
nut-driver
@ -1,16 +0,0 @@
|
||||
#!/bin/false
|
||||
# This is a dummy init script for YaST runlevel editor
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=801542
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nut-driver
|
||||
# Required-Start: $network $syslog $remote_fs
|
||||
# Should-Start: $time ypbind sendmail
|
||||
# Required-Stop: $network $syslog $remote_fs
|
||||
# Should-Stop: $time ypbind sendmail
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Network UPS Tools - power device driver controller
|
||||
# Description: Network UPS Tools provides remote or local
|
||||
# monitoring of UPS.
|
||||
### END INIT INFO
|
16
nut-monitor
16
nut-monitor
@ -1,16 +0,0 @@
|
||||
#!/bin/false
|
||||
# This is a dummy init script for YaST runlevel editor
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=801542
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nut-monitor
|
||||
# Required-Start: $network $syslog $remote_fs nut-server
|
||||
# Should-Start: $time ypbind sendmail
|
||||
# Required-Stop: $network $syslog $remote_fs nut-server
|
||||
# Should-Stop: $time ypbind sendmail
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Network UPS Tools - power device monitor and shutdown controller
|
||||
# Description: Network UPS Tools provides remote or local
|
||||
# monitoring of UPS.
|
||||
### END INIT INFO
|
16
nut-server
16
nut-server
@ -1,16 +0,0 @@
|
||||
#!/bin/false
|
||||
# This is a dummy init script for YaST runlevel editor
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=801542
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: nut-server
|
||||
# Required-Start: $network $syslog $remote_fs nut-driver
|
||||
# Should-Start: $time ypbind sendmail
|
||||
# Required-Stop: $network $syslog $remote_fs nut-driver
|
||||
# Should-Stop: $time ypbind sendmail
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Network UPS Tools - power devices information server
|
||||
# Description: Network UPS Tools provides remote or local
|
||||
# monitoring of UPS.
|
||||
### END INIT INFO
|
35
nut.changes
35
nut.changes
@ -1,3 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 15:28:14 CEST 2017 - sbrabec@suse.com
|
||||
|
||||
- Update to version 2.7.4:
|
||||
For more see NEWS and UPGRADING in /usr/share/doc/packages/nut.
|
||||
* New class of device supported: ATS - Automatic Transfer Switch
|
||||
* NUT command and variable naming scheme changes.
|
||||
* support for new devices: AEG PROTECT B / NAS APC ATS AP7724
|
||||
(should be supported) Asium P700 Eaton ATS Eaton 5E 1100iUSB
|
||||
Eaton E Series DX UPS 1-20 kVA Eaton Powerware 9125-5000g
|
||||
Electrys UPS 2500 Fideltronic INIGO Viper 1200 Legrand Keor
|
||||
Multiplug LYONN CTB-800V Micropower LCD 1000 NHS Laser Senoidal
|
||||
5000VA Sweex model P220 TS Shara Various APCUPSD-controlled APC
|
||||
devices
|
||||
* snmp-ups improvements.
|
||||
* Eaton: improvements and fixes of 3ph SNMP, ePDU (G2 and G3) and
|
||||
XML/PDC.
|
||||
* Further fixes and improvements of bcmxcp_usb, dummy-ups,
|
||||
libnutclient, nutdrv_atcl_usb, nutdrv_qx, nut-ipmipsu, solis,
|
||||
tripplitesu, usbhid-ups.
|
||||
* nut-scanner: Don't depend on development libraries
|
||||
(boo#963505).
|
||||
* Improved SSL support through Mozilla NSS, Augeas support.
|
||||
* Fixed UPower device matching in recent kernels.
|
||||
* nut-server.service: Restore systemd relationship (drop
|
||||
0001-Restore-systemd-relationship-with-nut-driver-service.patch).
|
||||
* Network protocol information change.
|
||||
- Drop dummy init scripts. They are not needed any more
|
||||
(nut-monitor, nut-server, nut-driver, boo#801542#c2).
|
||||
- Build and package documentation
|
||||
(nut-doc-fixed-date.patch, nut-doc-cables.patch).
|
||||
- Fix dependencies.
|
||||
- Fix bash-completion path.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 19 09:33:47 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
@ -37,6 +71,7 @@ Thu Oct 30 07:22:38 UTC 2014 - mvyskocil@opensuse.org
|
||||
* upsdrvctl is now installed to $prefix/sbin rather than
|
||||
$driverexec. This usually means moving from /bin to /sbin, apart
|
||||
from few exceptions.
|
||||
* Fix service files paths (boo#907387).
|
||||
* FreeDesktop Hardware Abstraction Layer (HAL) support was removed.
|
||||
* This is a good time to point out that for stricter packaging
|
||||
systems, it may be beneficial to add "--enable-option-checking=fatal"
|
||||
|
225
nut.spec
225
nut.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package nut
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -40,8 +40,22 @@
|
||||
%define _udevrulesdir %{_sysconfdir}/udev/rules.d/
|
||||
%define with_systemd 0
|
||||
%endif
|
||||
# SLE <= 12 lacks needed packages
|
||||
%if 0%{?sle_version} == 0
|
||||
%if 0%{?suse_version} < 1200
|
||||
%define with_doc 0
|
||||
%else
|
||||
%define with_doc 1
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?sle_version} < 130000
|
||||
%define with_doc 0
|
||||
%else
|
||||
%define with_doc 1
|
||||
%endif
|
||||
%endif
|
||||
Name: nut
|
||||
Version: 2.7.3
|
||||
Version: 2.7.4
|
||||
Release: 0
|
||||
Summary: Network UPS Tools Core (Uninterruptible Power Supply Monitoring)
|
||||
License: GPL-2.0+
|
||||
@ -56,16 +70,14 @@ Source6: nut.system-sleep
|
||||
Source7: nut.sleep
|
||||
Source8: http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz.sig
|
||||
Source9: %{name}.keyring
|
||||
Source10: nut-driver
|
||||
Source11: nut-server
|
||||
Source12: nut-monitor
|
||||
Patch0: nut-preconfig.patch
|
||||
Patch3: nut-notifyflag.patch
|
||||
# PATCH-FIX-UPSTREAM nut-systemd-dirs.patch sbrabec@suse.cz -- Fix systemd targets.
|
||||
Patch7: nut-systemd-dirs.patch
|
||||
# PATCH-FIX-UPSTREAM: nut-server vs nut-drivers relation
|
||||
# https://github.com/networkupstools/nut/commit/c98fab9f5dec993aa9f5e0a3e79de53ae9ecd32b
|
||||
Patch8: 0001-Restore-systemd-relationship-with-nut-driver-service.patch
|
||||
# PATCH-FEATURE-OPENSUSE nut-doc-fixed-date.patch sbrabec@suse.cz -- Make doc builds reproducible.
|
||||
Patch8: nut-doc-fixed-date.patch
|
||||
# PATCH-FIX-UPSTREAM nut-doc-cables.patch sbrabec@suse.cz -- Build HTML documentation of cables.
|
||||
Patch9: nut-doc-cables.patch
|
||||
BuildRequires: apache2-devel
|
||||
BuildRequires: avahi-devel
|
||||
BuildRequires: dbus-1-glib-devel
|
||||
@ -79,6 +91,13 @@ BuildRequires: libusb-devel
|
||||
BuildRequires: net-snmp-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: tcpd-devel
|
||||
%if 0%{?suse_version} >= 1200
|
||||
%if 0%{?suse_version} >= 1330
|
||||
BuildRequires: bash-completion-devel
|
||||
%else
|
||||
BuildRequires: bash-completion
|
||||
%endif
|
||||
%endif
|
||||
Requires: logrotate
|
||||
Requires: usbutils
|
||||
Requires(post): udev
|
||||
@ -102,9 +121,25 @@ BuildRequires: udev
|
||||
BuildRequires: freeipmi-devel
|
||||
%endif
|
||||
%else
|
||||
Requires(pre): %insserv_prereq
|
||||
BuildRequires: pm-utils
|
||||
Requires: powersave
|
||||
Requires(pre): %insserv_prereq
|
||||
%endif
|
||||
%if %suse_version >= 1330
|
||||
Requires(pre): user(upsd)
|
||||
%endif
|
||||
%if %with_doc
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: aspell
|
||||
BuildRequires: dblatex
|
||||
BuildRequires: libxml2-tools
|
||||
BuildRequires: libxslt-tools
|
||||
BuildRequires: source-highlight
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1200
|
||||
%define bashcompletionsdir %(pkg-config bash-completion --variable=completionsdir)
|
||||
%else
|
||||
%define bashcompletionsdir %{_sysconfdir}/bash_completion.d
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -161,14 +196,115 @@ Requires: openssl-devel
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%package doc-images
|
||||
Summary: Network UPS Tools - Images for Documentation
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
Requires: %{name}-doc-images = %{version}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc-images
|
||||
Images for the documentation. It is a supplementary package for some NUT
|
||||
documentation packages.
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%package doc-asciidoc
|
||||
Summary: Network UPS Tools - Documentation in AsciiDoc Format
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
Requires: %{name}-doc-images = %{version}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc-asciidoc
|
||||
NUT manuals in AsciiDoc format (human readable source).
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%if %with_doc
|
||||
%package doc-pdf
|
||||
Summary: Network UPS Tools - Documentation in PDF
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc-pdf
|
||||
User manual in PDF format.
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%package doc-html
|
||||
Summary: Network UPS Tools - Documentation in PDF
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
Requires: %{name}-doc-images = %{version}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc-html
|
||||
User manual in PDF format.
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%package devel-doc-pdf
|
||||
Summary: Network UPS Tools - Documentation in PDF
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description devel-doc-pdf
|
||||
Developer manual in PDF format.
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%package devel-doc-html
|
||||
Summary: Network UPS Tools - Documentation in PDF
|
||||
Group: Hardware/UPS
|
||||
Recommends: %{name} = %{version}
|
||||
Enhances: %{name}
|
||||
Requires: %{name}-doc-images = %{version}
|
||||
# For CSS files:
|
||||
Requires: %{name}-doc-html = %{version}
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description devel-doc-html
|
||||
Developer manual in HTML format.
|
||||
|
||||
Network UPS Tools is a collection of programs which provide a common
|
||||
interface for monitoring and administering UPS hardware.
|
||||
|
||||
%endif
|
||||
%prep
|
||||
%setup -q
|
||||
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE10} %{SOURCE11} %{SOURCE12} .
|
||||
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} .
|
||||
mv upsd-early-powerdown.init upsd-early-powerdown
|
||||
%patch0
|
||||
%patch3
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in
|
||||
|
||||
sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init
|
||||
sed -i s:%{_prefix}/local/ups/bin:/bin: conf/upssched.conf.sample.in
|
||||
@ -182,7 +318,11 @@ autoreconf -fvi
|
||||
--sysconfdir=%{CONFPATH} \
|
||||
--datadir=%{_datadir}/nut \
|
||||
--with-all \
|
||||
%if %with_doc
|
||||
--with-doc \
|
||||
%else
|
||||
--without-doc \
|
||||
%endif
|
||||
--with-ssl \
|
||||
--with-openssl \
|
||||
--without-nss \
|
||||
@ -209,6 +349,10 @@ autoreconf -fvi
|
||||
%endif
|
||||
--enable-option-checking=fatal
|
||||
|
||||
# There is a bug in doc build that makes impossible to build in parallel
|
||||
cd docs
|
||||
make
|
||||
cd ..
|
||||
make %{?_smp_mflags}
|
||||
PORT=$(sed -n 's/#define PORT //p' config.log)
|
||||
if test "$PORT" = 3493 ; then
|
||||
@ -231,7 +375,6 @@ ln -s service %{buildroot}%{_sbindir}/rcnut-monitor
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -m 755 upsd.init %{buildroot}%{_sysconfdir}/init.d/upsd
|
||||
ln -sf ../..%{_sysconfdir}/init.d/upsd %{buildroot}%{_sbindir}/rcupsd
|
||||
install nut-driver nut-server nut-monitor %{buildroot}%{_initddir}/
|
||||
%endif
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
install -m 644 scripts/logrotate/nutlogd %{buildroot}%{_sysconfdir}/logrotate.d/nut
|
||||
@ -253,11 +396,24 @@ mkdir %{buildroot}%{HTMLPATH}/nut %{buildroot}%{CGIPATH}/nut
|
||||
mv %{buildroot}%{HTMLPATH}/*.{html,png} %{buildroot}%{HTMLPATH}/nut/
|
||||
mv %{buildroot}%{CGIPATH}/*.cgi %{buildroot}%{CGIPATH}/nut
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
|
||||
install -m0644 scripts/misc/nut.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/nut
|
||||
mkdir -p %{buildroot}%{bashcompletionsdir}
|
||||
install -m0644 scripts/misc/nut.bash_completion %{buildroot}%{bashcompletionsdir}/nut
|
||||
|
||||
# Documentation
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp -a AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING upsd-early-powerdown %{buildroot}%{_docdir}/%{name}/
|
||||
cp -a docs/*.txt docs/cables docs/images %{buildroot}%{_docdir}/%{name}/
|
||||
%if %with_doc
|
||||
cp -a docs/*.css docs/*.html docs/*.pdf %{buildroot}%{_docdir}/%{name}/
|
||||
%endif
|
||||
|
||||
# Not needed for packaged contents:
|
||||
rm %{buildroot}%{_docdir}/%{name}/packager-guide.*
|
||||
|
||||
%pre
|
||||
%if %suse_version < 1330
|
||||
useradd -r -g %{GROUP} -s /bin/false -c "UPS daemon" -d /sbin %{USER} 2>/dev/null || :
|
||||
%endif
|
||||
%if 0%{with_systemd}
|
||||
%service_add_pre nut-driver.service nut-server.service nut-monitor.service
|
||||
%endif
|
||||
@ -355,8 +511,9 @@ fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING upsd-early-powerdown docs/*.txt docs/cables
|
||||
%{_sysconfdir}/bash_completion.d/*
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%doc %{_docdir}/%{name}/[A-EG-Z]*
|
||||
%doc %{_docdir}/%{name}/upsd-early-powerdown
|
||||
%config %{_sysconfdir}/logrotate.d/*
|
||||
%{_bindir}/*
|
||||
%{_datadir}/nut
|
||||
@ -390,6 +547,7 @@ fi
|
||||
%{_libexecdir}/pm-utils/sleep.d/99nut
|
||||
%{_sysconfdir}/init.d/*
|
||||
%endif
|
||||
%{bashcompletionsdir}/*
|
||||
|
||||
%files drivers-net
|
||||
%defattr(-,root,root)
|
||||
@ -416,4 +574,41 @@ fi
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_mandir}/man3/*.*
|
||||
|
||||
%files doc-images
|
||||
%defattr(-,root,root)
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/images
|
||||
|
||||
%files doc-asciidoc
|
||||
%defattr(-,root,root)
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/*.txt
|
||||
%{_docdir}/%{name}/cables
|
||||
|
||||
%if %with_doc
|
||||
%files doc-pdf
|
||||
%defattr(-,root,root)
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/FAQ.pdf
|
||||
%{_docdir}/%{name}/cables.pdf
|
||||
%{_docdir}/%{name}/user-manual.pdf
|
||||
|
||||
%files doc-html
|
||||
%defattr(-,root,root)
|
||||
%{_docdir}/%{name}/FAQ.html
|
||||
%{_docdir}/%{name}/cables.html
|
||||
%{_docdir}/%{name}/user-manual.html
|
||||
%{_docdir}/%{name}/*.css
|
||||
|
||||
%files devel-doc-pdf
|
||||
%defattr(-,root,root)
|
||||
%doc %dir %{_docdir}/%{name}
|
||||
%{_docdir}/%{name}/developer-guide.pdf
|
||||
|
||||
%files devel-doc-html
|
||||
%defattr(-,root,root)
|
||||
%{_docdir}/%{name}/developer-guide.html
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user