Accepting request 307093 from home:wanghaisu:branches:Base:System

Add conditions for libyajl and macro tmpfiles_create to support build against SLE12.

OBS-URL: https://build.opensuse.org/request/show/307093
OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=5
This commit is contained in:
Martin Pluskal 2015-05-14 06:35:47 +00:00 committed by Git OBS Bridge
parent e9ad77fc34
commit c4565d4187
2 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 14 06:04:42 UTC 2015 - nwang@suse.com
- Add conditions for libyajl and macro tmpfiles_create to
support build against SLE12.
-------------------------------------------------------------------
Thu Apr 9 09:00:24 UTC 2015 - mpluskal@suse.com
@ -27,4 +33,4 @@ Fri Mar 13 15:14:18 UTC 2015 - mpluskal@suse.com
-------------------------------------------------------------------
Thu Dec 11 03:13:02 UTC 2014 - nwang@suse.com
- Initial package version 1.1.0
- Initial package version 1.1.0 for Fate#314409.

View File

@ -1,7 +1,7 @@
#
# spec file for package libstoragemgmt
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -41,7 +41,12 @@ BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
%if 0%{?suse_version} <= 1315
# For SLE12
BuildRequires: libyajl-devel
%else
BuildRequires: pkgconfig(yajl)
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%systemd_requires
%py_requires
@ -199,7 +204,12 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/r
%post
%service_add_post %{name}.service
%udev_rules_update
%if 0%{?suse_version} <= 1315
# For SLE12
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
%else
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%endif
%preun
%service_del_preun %{name}.service