From edc0bba79e69814370f67b9d1bc6c55ac2a01c0a339667eeac7808ed14dcf459 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 31 Jan 2018 11:40:57 +0000 Subject: [PATCH] Accepting request 566600 from home:dimstar:Factory I don't see a better solution that this, without breaking building for leap in the devel branch OBS-URL: https://build.opensuse.org/request/show/566600 OBS-URL: https://build.opensuse.org/package/show/security:chipcard/libp11?expand=0&rev=24 --- baselibs.conf | 1 - libp11.changes | 9 +++++++++ libp11.spec | 12 ++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) delete mode 100644 baselibs.conf diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index 4c33a00..0000000 --- a/baselibs.conf +++ /dev/null @@ -1 +0,0 @@ -libp11-2 diff --git a/libp11.changes b/libp11.changes index d4df57d..fd40e4a 100644 --- a/libp11.changes +++ b/libp11.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jan 17 11:31:42 UTC 2018 - dimstar@opensuse.org + +- Conditionalize libname to libp11-2 for suse_version < 1500 (using + openssl 1.0) / libp11-3 for suse_version >= 1500 (using + openssl 1.1). +- Create baselibs.conf dynamically, since the library name can be + different. Drop the static baselibs.conf. + ------------------------------------------------------------------- Wed Jul 19 12:41:16 UTC 2017 - jengelh@inai.de diff --git a/libp11.spec b/libp11.spec index 4a0f16c..9da2614 100644 --- a/libp11.spec +++ b/libp11.spec @@ -1,7 +1,7 @@ # # spec file for package libp11 # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,14 @@ # +# the libname depends on what version openssl it is linked against +%if 0%{?suse_version} < 1500 +# libp11.so.2 for openssl 1.0 - suse_version < 1500 %define libname libp11-2 +%else +# libp11.so.3 for openssl 1.1 - suse_version >= 1500 +%define libname libp11-3 +%endif Name: libp11 Version: 0.4.7 Release: 0 @@ -28,7 +35,6 @@ Source0: https://github.com/OpenSC/libp11/releases/download/%{name}-%{ver Source1: https://github.com/OpenSC/libp11/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz.asc Source2: %{name}.keyring Source3: %{name}-rpmlintrc -Source4: baselibs.conf BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: pkgconfig(openssl) @@ -94,6 +100,8 @@ Token Interface (Cryptoki)". %prep %setup -q +# Since the library name changes based on used openssl, we have to create baselibs.conf dynamically +echo %{libname} > %{_sourcedir}/baselibs.conf %build %configure \