[ipmiutil] update to upstream ipmiutil-2.8.3

arcress arcress at fedoraproject.org
Wed Apr 25 16:03:14 UTC 2012


commit bf6ecca4fad14c174574395fee0d571cecc0c27a
Author: Andy Cress <arcress at users.sourceforge.net>
Date:   Wed Apr 25 12:02:44 2012 -0400

    update to upstream ipmiutil-2.8.3

 .gitignore    |    1 +
 ipmiutil.spec |   56 ++++++++++++++++++++++++++++++++++++++++++++------------
 sources       |    2 +-
 3 files changed, 46 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e94bc9f..6845fd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ ipmiutil-2.6.8.tar.gz
 /ipmiutil-2.7.8.tar.gz
 /ipmiutil-2.7.9.tar.gz
 /ipmiutil-2.8.2.tar.gz
+/ipmiutil-2.8.3.tar.gz
diff --git a/ipmiutil.spec b/ipmiutil.spec
index dda084d..a53f291 100644
--- a/ipmiutil.spec
+++ b/ipmiutil.spec
@@ -1,18 +1,29 @@
-Name: ipmiutil
-Version: 2.8.2
-Release: 1%{?dist}
-Summary: Easy-to-use IPMI server management utilities
-License: BSD
-Group: System/Management
-Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-URL: http://ipmiutil.sourceforge.net
+# spec file for package ipmiutil 
+#
+# Copyright (c) 2012 Andy Cress
+#
+Name:      ipmiutil
+Version: 2.8.3
+Release:   1%{?dist}
+Summary:   Easy-to-use IPMI server management utilities
+License:   BSD
+Group:     System/Management
+Source:    http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+URL:       http://ipmiutil.sourceforge.net
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-BuildRequires: openssl-devel gcc gcc-c++ libtool
 %if 0%{?fedora} >= 15
 Requires: systemd-units
 %endif
-# Suggests: cron or vixie-cron or cronie or similar
+%if 0%{?req_systemd}
+BuildRequires: openssl-devel gcc gcc-c++ libtool systemd
+%define systemd_fls %{_unitdir}
+# Requires: %{?systemd_requires}
+%else
+BuildRequires: openssl-devel gcc gcc-c++ libtool
 %define systemd_fls %{_datadir}/%{name}
+%endif
+# Suggests: cron or vixie-cron or cronie or similar
+
 %define init_dir  %{_initrddir}
 
 %description
@@ -28,8 +39,8 @@ or the Intel IPMI driver (/dev/imb), etc.  If used locally and no driver is
 detected, ipmiutil will use user-space direct I/Os instead.
 
 %package devel
-Group: Development/Libraries
-Summary: The includes and static libraries from the ipmiutil package
+Group:    Development/Libraries/C and C++
+Summary:  Includes libraries and headers for the ipmiutil package
 Requires: ipmiutil
 
 %description devel
@@ -40,7 +51,11 @@ useful for building custom IPMI applications.
 %setup -q
 
 %build
+%if 0%{?req_systemd}
+%configure --enable-systemd
+%else
 %configure
+%endif
 make
 
 %install
@@ -130,6 +145,9 @@ rm -rf %{buildroot}
 /sbin/ldconfig
 
 %pre
+%if 0%{?req_systemd}
+%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
+%endif
 
 %post
 # POST_INSTALL, $1 = 1 if rpm -i, $1 = 2 if rpm -U
@@ -140,6 +158,9 @@ then
    vardir=%{_var}/lib/%{name}
    scr_dir=%{_datadir}/%{name}
 
+%if 0%{?req_systemd}
+%service_add_post ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
+%else
    if [ -x /bin/systemctl ]; then
         systemd_dir=%{_unitdir}
 	echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env
@@ -154,6 +175,7 @@ then
 	cp -f ${scr_dir}/ipmiutil_evt %{init_dir}
 	cp -f ${scr_dir}/ipmi_port    %{init_dir}
    fi
+%endif
 
    # Run some ipmiutil command to see if any IPMI interface works.
    %{_bindir}/ipmiutil sel -v >/dev/null 2>&1
@@ -189,6 +211,9 @@ fi
 # before uninstall,  $1 = 1 if rpm -U, $1 = 0 if rpm -e
 if [ "$1" = "0" ]
 then
+%if 0%{?req_systemd}
+%service_del_preun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
+%else
    if [ -x /bin/systemctl ]; then
      systemd_dir=%{_unitdir}
      if [ -f ${systemd_dir}/ipmiutil_evt.service ]; then
@@ -223,12 +248,16 @@ then
 	rm -f %{init_dir}/ipmiutil_evt 2>/dev/null
 	rm -f %{init_dir}/ipmi_port    2>/dev/null
    fi
+%endif
    if [ -f %{_sysconfdir}/cron.daily/checksel ]; then
 	rm -f %{_sysconfdir}/cron.daily/checksel
    fi
 fi
 
 %postun
+%if 0%{?req_systemd}
+%service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
+%else
 if [ -x /bin/systemctl ]; then
    systemctl daemon-reload  || :
    if [ $1 -ge 1 ] ; then
@@ -236,8 +265,11 @@ if [ -x /bin/systemctl ]; then
       systemctl try-restart ipmi_port.service  || :
    fi
 fi
+%endif
 
 %changelog
+* Tue Apr 24 2012 Andrew Cress <arcress at users.sourceforge.net> 2.8.3-1
+  Use %service_* macros if req_systemd is set
 * Thu Mar 08 2012 Andrew Cress <arcress at users.sourceforge.net> 2.8.2-1
 - reworked systemd logic/macros, moved ipmiutil from sbindir to bindir,
   added devel package files
diff --git a/sources b/sources
index ef96e1d..1a6acd0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fc8e5070b1fddca06c9e66d00da71934  ipmiutil-2.8.2.tar.gz
+b555c84b965fbcd493e66afa1578e2c1  ipmiutil-2.8.3.tar.gz


More information about the scm-commits mailing list