From c4565d41875864507653f89ba48e5bb10e682dd5f6bcaf76479d680af35dd7b6 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 14 May 2015 06:35:47 +0000 Subject: [PATCH] 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 --- libstoragemgmt.changes | 8 +++++++- libstoragemgmt.spec | 12 +++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/libstoragemgmt.changes b/libstoragemgmt.changes index fd41be6..6aeadbb 100644 --- a/libstoragemgmt.changes +++ b/libstoragemgmt.changes @@ -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. diff --git a/libstoragemgmt.spec b/libstoragemgmt.spec index 387b219..4be5198 100644 --- a/libstoragemgmt.spec +++ b/libstoragemgmt.spec @@ -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