File c-dvar.spec of Package c-dvar

#
# spec file for package c-dvar
#
# Copyright (c) 2022 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 http://bugs.opensuse.org/
#


Name:           c-dvar
%define lname	libcdvar1-0
Version:        1.0.0
Release:        0
Summary:        Library implementing the D-Bus Variant type system
License:        Apache-2.0
Group:          Development/Libraries/C and C++
URL:            https://github.com/c-util/c-dvar
Source:         https://github.com/c-util/c-dvar/archive/refs/tags/v%version.tar.gz
BuildRequires:  meson
BuildRequires:  cmake
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(libcutf8-1)
BuildRequires:  pkgconfig(libcstdaux-1) >= 1

%description
A library that implements the "Variant" type from the D-Bus
specification.

%package -n %lname
Summary:        Library implementing the D-Bus Variant type system
Group:          System/Libraries

%description -n %lname
A library that implements the "Variant" type from the D-Bus
specification.

%package devel
Summary:        Development files for the C-DVar library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
A library that implements the "Variant" type from the D-Bus
specification.

%prep
%autosetup

%build
%meson --includedir="%_includedir/%name"
%meson_build

%install
%meson_install
rm -f "%buildroot/%_libdir"/*.a

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%_libdir/*.so.*
%license README.md

%files devel
%_includedir/%name/
%_libdir/*.so
%_libdir/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by