File libubox.spec of Package libubox

#
# spec file for package libubox
#
# Copyright (c) 2016-2024, Martin Hauke <mardnh@gmx.de>
#
# 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:           libubox
Version:        0~git20240329
Release:        0
Summary:        C utility functions for OpenWrt
License:        BSD-3-Clause
Group:          System/Libraries
Url:            https://git.openwrt.org/?p=project/libubox.git;a=summary
Source:         %{name}-%{version}.tar.xz
Patch0:         libubox-libsuffix.patch
BuildRequires:  cmake
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(json-c)

%description
A small utility library developed for OpenWrt containing a event loop,
linked lists, blobmsg, stream buffer management, [...]

%package devel
Summary:        C utility functions for OpenWrt
Group:          System/Libraries
Requires:       %{name} = %{version}

%description devel
A small utility library developed for OpenWrt containing a event loop,
linked lists, blobmsg, stream buffer management, [...]

%prep
%setup -q
%autopatch -p1

%build
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
%cmake \
  -DBUILD_LUA=OFF \
  -DBUILD_EXAMPLES=ON
%make_jobs

%install
%cmake_install

%files
%{_bindir}/jshn
%{_libdir}/libblobmsg_json.so
%{_libdir}/libjson_script.so
%{_libdir}/libubox.so
%dir %{_datadir}/libubox
%{_datadir}/libubox/jshn.sh

%files devel
%{_includedir}/libubox
%{_libdir}/libblobmsg_json.a
%{_libdir}/libubox.a

%changelog
openSUSE Build Service is sponsored by