File libglibutil.spec of Package libglibutil

#
# spec file for package libglibutil
#
# 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/
#

%define packagename libglibutil

Name:           libglibutil1
Version:        1.0.62
Release:        0
Summary:        Library of glib utilities
Group:          Development/Libraries
License:        BSD-3-Clause
URL:            https://git.sailfishos.org/mer-core/libglibutil
Source:         %{packagename}-%{version}.tar.xz
BuildRequires:  pkgconfig(glib-2.0)
Requires(post): /sbin/ldconfig
Requires(postun):/sbin/ldconfig
Provides:       %{packagename}

%description
Provides glib utility functions and macros

%package -n %{packagename}-devel
Summary:        Development library for %{name}
Requires:       %{name} = %{version}
Requires:       pkgconfig

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

%prep
%setup -q -n %{packagename}-%{version}

%build
make LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig

%install
rm -rf %{buildroot}
make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev

%check
make -C test test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/%{packagename}.so.*

%files -n %{packagename}-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{packagename}.so
%dir %{_includedir}/gutil/
%{_includedir}/gutil/*.h

%changelog
openSUSE Build Service is sponsored by