diff options
Diffstat (limited to 'doc/ipmiutil.spec')
-rw-r--r-- | doc/ipmiutil.spec | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index 47d1e14..4f95a86 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@ # Copyright (c) 2012 Andy Cress # Name: ipmiutil -Version: 3.0.0 +Version: 3.0.1 Release: 1%{?dist} Summary: Easy-to-use IPMI server management utilities License: BSD @@ -12,34 +12,36 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz URL: http://ipmiutil.sourceforge.net BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Suggests: cron or vixie-cron or cronie or similar -%if 0%{?fedora} >= 15 -BuildRequires: systemd autoconf automake systemd-units -Requires: systemd-units -%endif %if 0%{?sles_version} >= 10 -BuildRequires: libopenssl-devel +%define bldreq0 libopenssl-devel %else -BuildRequires: openssl-devel +%define bldreq0 openssl-devel +%endif +%if 0%{?fedora} >= 15 +%define bldreq_extra systemd autoconf automake systemd-units +Requires: systemd-units +Group: System Environment/Base +%endif +%if 0%{?rhel} >= 7 +%define bldreq_extra autoconf automake systemd-units %endif %if 0%{?suse_version} >= 1210 -BuildRequires: gcc gcc-c++ libtool systemd +%define bldreq_extra gcc gcc-c++ libtool systemd %define req_systemd 1 %define unit_dir %{_unitdir} %define systemd_fls %{unit_dir} # Requires: %{?systemd_requires} %else -BuildRequires: gcc gcc-c++ libtool +%define bldreq_extra gcc gcc-c++ libtool %define systemd_fls %{_datadir}/%{name} %if 0%{?fedora} == 16 %define unit_dir /lib/systemd/system %else -%if 0%{?rhel} >= 7 -BuildRequires: systemd-units -%endif %{!?_unitdir: %define _unitdir /usr/lib/systemd/system} %define unit_dir %{_unitdir} %endif %endif +BuildRequires: %{bldreq0} %{bldreq_extra} %define init_dir %{_initrddir} %description @@ -82,7 +84,11 @@ autoconf %else %configure %endif +%if 0%{?fedora} >= 15 +make %{?_smp_mflags} +%else make +%endif %install rm -rf %{buildroot} @@ -205,11 +211,11 @@ then %else if [ -x /bin/systemctl ] && [ -d %{unit_dir} ]; then echo "IINITDIR=%{init_dir}" >>%{_datadir}/%{name}/ipmiutil.env - cp -f ${scr_dir}/ipmiutil_evt.service %{unit_dir} - cp -f ${scr_dir}/ipmiutil_asy.service %{unit_dir} - cp -f ${scr_dir}/ipmiutil_wdt.service %{unit_dir} - cp -f ${scr_dir}/ipmi_port.service %{unit_dir} - # systemctl enable ipmi_port.service >/dev/null 2>&1 || : + cp -f ${scr_dir}/ipmiutil_evt.service %{unit_dir} + cp -f ${scr_dir}/ipmiutil_asy.service %{unit_dir} + cp -f ${scr_dir}/ipmiutil_wdt.service %{unit_dir} + cp -f ${scr_dir}/ipmi_port.service %{unit_dir} + # systemctl enable ipmi_port.service >/dev/null 2>&1 || : else cp -f ${scr_dir}/ipmiutil_wdt %{init_dir} cp -f ${scr_dir}/ipmiutil_asy %{init_dir} @@ -250,10 +256,10 @@ then sensorout=$vardir/sensor_out.txt if [ ! -f $sensorout ]; then %{_bindir}/ipmiutil sensor -q >$sensorout || : - if [ $? -ne 0 ]; then - # remove file if error, try again in ipmi_port on reboot. - rm -f $sensorout - fi + if [ $? -ne 0 ]; then + # remove file if error, try again in ipmi_port on reboot. + rm -f $sensorout + fi fi fi else @@ -319,6 +325,7 @@ then fi %postun +# after uninstall, $1 = 1 if update, $1 = 0 if rpm -e /sbin/ldconfig %if 0%{?req_systemd} %service_del_postun ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service |