[nut] fix build of systemd files

Michal Hlavinka mhlavink at fedoraproject.org
Fri Aug 10 12:32:08 UTC 2012


commit acb3fdce2c8df35806da4d53dfb39e8316b1cfaa
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Fri Aug 10 14:31:36 2012 +0200

    fix build of systemd files

 nut-2.6.5-quickfix.patch |   14 ++++++++++++++
 nut.spec                 |    7 +++++--
 2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/nut-2.6.5-quickfix.patch b/nut-2.6.5-quickfix.patch
new file mode 100644
index 0000000..8330518
--- /dev/null
+++ b/nut-2.6.5-quickfix.patch
@@ -0,0 +1,14 @@
+diff -up nut-2.6.5/configure.in.quickfix nut-2.6.5/configure.in
+--- nut-2.6.5/configure.in.quickfix	2012-08-10 14:19:55.924431026 +0200
++++ nut-2.6.5/configure.in	2012-08-10 14:20:13.332566508 +0200
+@@ -986,9 +986,8 @@ dnl Override installation directory, wit
+ dnl prefix. This is needed for 'distcheck*' targets, otherwise
+ dnl files will try to get intalled to the actual system directories
+ if test -n "${systemdsystemunitdir}"; then
+-	systemdsystemshutdowndir="${libdir}/systemd/system-shutdown"
++	systemdsystemshutdowndir="/lib/systemd/system-shutdown"
+ 	AC_MSG_RESULT(using ${systemdsystemunitdir})
+-	systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`"
+ else
+ 	AC_MSG_RESULT(no)
+ fi
diff --git a/nut.spec b/nut.spec
index d99d8be..37270ca 100644
--- a/nut.spec
+++ b/nut.spec
@@ -21,6 +21,9 @@ Source: http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz
 Source3: nut-client.tmpfiles
 Patch1: nut-2.6.3-tmpfiles.patch
 
+#quick fix. TODO: fix it properly
+Patch3: nut-2.6.5-quickfix.patch
+
 Requires(pre): shadow-utils udev
 Requires(post): fileutils chkconfig 
 Requires(postun): fileutils chkconfig 
@@ -108,6 +111,7 @@ necessary to develop NUT client applications.
 %prep
 %setup -q
 %patch1 -p1 -b .tmpfiles
+%patch3 -p1 -b .quickfix
 sed -i 's|=NUT-Monitor|=nut-monitor|'  scripts/python/app/nut-monitor.desktop
 sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor
 sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in
@@ -492,8 +496,7 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/libnutscan.pc
 
 %changelog
-* Thu Aug 09 2012 Michal Hlavinka <mhlavink at redhat.com> - 2.6.5-1
-- nut updated to 2.6.5
+* Fri Aug 10 2012 Michal Hlavinka <mhlavink at redhat.com> - 2.6.5-1
 
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.6.4-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild


More information about the scm-commits mailing list