Accepting request 457512 from home:eeich:branches:network:cluster

- Cleaned up spec file: add generic defines to the top.

OBS-URL: https://build.opensuse.org/request/show/457512
OBS-URL: https://build.opensuse.org/package/show/network:cluster/conman?expand=0&rev=3
This commit is contained in:
Egbert Eich 2017-02-17 10:46:09 +00:00 committed by Git OBS Bridge
parent fd75eacdcb
commit 78dd721af1
2 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 15 17:48:57 UTC 2017 - eich@suse.com
- Cleaned up spec file: add generic defines to the top.
-------------------------------------------------------------------
Tue Jan 17 13:53:52 UTC 2017 - eich@suse.com

View File

@ -14,6 +14,12 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1140
%define have_systemd 1
%ifarch x86_64
%define have_freeipmi 1
%endif
%endif
Name: conman
Version: 0.2.7
@ -28,13 +34,11 @@ Requires: expect
Requires: logrotate
BuildRequires: tcpd-devel
%if 0%{?suse_version} > 1140
%ifarch x86_64
%if 0%{?have_freeipmi}
BuildRequires: freeipmi-devel
%endif
%endif
Source0: https://github.com/dun/conman/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
Source1: %{name}.service
%endif
@ -63,18 +67,16 @@ Its features include:
%build
%configure --with-tcp-wrappers \
%if 0%{?suse_version} > 1140
%ifarch x86_64
%if 0%{?have_freeipmi}
--with-freeipmi \
%endif
%endif
make %{?_smp_mflags}
%install
%make_install
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
rm -rf %{buildroot}%{_sysconfdir}/init.d
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rcconman
@ -115,12 +117,12 @@ EOF
fi
%pre
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
%service_add_pre conman.service
%endif
%preun
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
%service_del_preun conman.service
%else
%{stop_on_removal conman}
@ -128,12 +130,12 @@ fi
%post
%fillup_only conman
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
%service_add_post conman.service
%endif
%postun
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
%service_del_postun conman.service
%else
%{restart_on_update conman}
@ -155,7 +157,7 @@ fi
%{_bindir}/*
%{_sbindir}/*
%{_prefix}/lib/conman
%if 0%{?suse_version} > 1140
%if 0%{?have_systemd}
%{_prefix}/lib/systemd/*
%else
%{_sysconfdir}/init.d/*