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