File uci.spec of Package uci

#
# spec file for package uci
#
# 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:           uci
Version:        0~git20230810
Release:        0
Summary:        UCI (Unified Configuration Interface) library and utility
License:        LGPL-2.1-only
Group:          System/Libraries
URL:            https://wiki.openwrt.org/doc/techref/uci
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  libubox-devel

%description
UCI is a small utility written in C (a shell script-wrapper is available as well)
and is intended to centralize the whole configuration of a device running OpenWrt.
UCI is the successor of the NVRAM based configuration found in the historical
OpenWrt branch White Russian and a wrapper for the standard configuration files
programs bring with them, like e.g. %{_sysconfdir}/network/interfaces, %{_sysconfdir}/exports,
%{_sysconfdir}/dnsmasq.conf, %{_sysconfdir}/samba/samba.conf etc.

%package -n libuci
Summary:        UCI (Unified Configuration Interface) library
Group:          System/Libraries

%description -n libuci
UCI is a small utility written in C (a shell script-wrapper is available as well)
and is intended to centralize the whole configuration of a device running OpenWrt.
UCI is the successor of the NVRAM based configuration found in the historical
OpenWrt branch White Russian and a wrapper for the standard configuration files
programs bring with them, like e.g. %{_sysconfdir}/network/interfaces, %{_sysconfdir}/exports,
%{_sysconfdir}/dnsmasq.conf, %{_sysconfdir}/samba/samba.conf etc.

%package -n libuci-devel
Summary:        Development files for the UCI (Unified Configuration Interface) library
Group:          Development/Libraries/Other
Requires:       libuci = %{version}-%{release}

%description -n libuci-devel
UCI is a small utility written in C (a shell script-wrapper is available as well)
and is intended to centralize the whole configuration of a device running OpenWrt.
UCI is the successor of the NVRAM based configuration found in the historical
OpenWrt branch White Russian and a wrapper for the standard configuration files
programs bring with them, like e.g. %{_sysconfdir}/network/interfaces, %{_sysconfdir}/exports,
%{_sysconfdir}/dnsmasq.conf, %{_sysconfdir}/samba/samba.conf etc.

This subpackage provides the development files needed for the UCI
(Unified Configuration Interface) library.

%prep
%setup -q

%build
%cmake \
  -DBUILD_LUA=OFF \
  -DBUILD_EXAMPLES=ON
%make_jobs

%install
%cmake_install

%files
%{_bindir}/uci

%files -n libuci
%{_libdir}/libuci.so

%files -n libuci-devel
%{_includedir}/uci.h
%{_includedir}/uci_*.h
%{_includedir}/ucimap.h

%changelog
openSUSE Build Service is sponsored by