File libgbinder.spec of Package libgbinder

#
# spec file for package libgbinder
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%global libname libgbinder1
Name:           libgbinder
Version:        1.1.42
Release:        0
Summary:        GLib-style interface to binder
License:        BSD-3-Clause
Group:          Development/Libraries/Other
URL:            https://github.com/mer-hybris/libgbinder
Source:         %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  pkgconfig(glib-2.0) >= 2.32
BuildRequires:  libglibutil-devel
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description
GLib-style interface to binder (Android IPC mechanism)

%package -n %{libname}
Summary:        Library for %{name}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description -n %{libname}
Library for %{name}.

%package devel
Summary:        Development library for %{name}
Requires: %{libname} = %{version}

%description devel
This package contains the development library for %{name}.

%prep
%autosetup

%build
%make_build \
 LIBDIR=%{_libdir} \
 KEEP_SYMBOLS=1 \
 release \
 pkgconfig

%install
%make_install \
 LIBDIR=%{_libdir} \
 DESTDIR=%{buildroot} \
 install-dev

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files -n %{libname}
%doc AUTHORS README
%license LICENSE
%{_libdir}/%{name}.so.*

%files devel
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}.so
%dir %{_includedir}/gbinder
%{_includedir}/gbinder/*.h

%changelog

openSUSE Build Service is sponsored by