Thu Feb 29 05:12:00 UTC 2024 - Andy Alt <arch_stanton5995@proton.me> - canfigger 0.3.0: * use dynamic memory allocation for keys, values, and attributes * canfigger_free() replaced with canfigger_free_current_key_node_advance() - canfigger_free_attr() removed * use 'canfigger_free_current_attr_str_advance()' instead of 'list->attr_node = list->attr_node->next' OBS-URL: https://build.opensuse.org/request/show/1153106 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/canfigger?expand=0&rev=4
94 lines
2.8 KiB
RPMSpec
94 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package canfigger
|
|
#
|
|
# Copyright (c) 2024 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 api 0.3
|
|
%define sover 0
|
|
%define sorel %(echo %{api} | tr . _)
|
|
%define libname lib%{name}-%{sorel}-%{sover}
|
|
%define devname lib%{name}-%{sorel}-devel
|
|
|
|
Name: canfigger
|
|
Version: 0.3.0
|
|
Release: 0
|
|
Summary: Simple configuration file parser library
|
|
License: GPL-3.0-or-later
|
|
Group: Development/Libraries/C and C++
|
|
URL: https://github.com/andy5995/canfigger
|
|
Source: https://github.com/andy5995/canfigger/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
|
BuildRequires: meson >= 0.48.0
|
|
|
|
%description
|
|
Canfigger is a lightweight C language library designed to parse configuration
|
|
files. It provides functionality to read them and represent their contents as
|
|
a linked list of key-value pairs, along with associated attributes for each
|
|
pair.
|
|
|
|
%package -n %{libname}
|
|
Summary: Lightweight library for parsing configuration files
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libname}
|
|
Canfigger is a lightweight C language library designed to parse configuration
|
|
files. It provides functionality to read them and represent their contents as
|
|
a linked list of key-value pairs, along with associated attributes for each
|
|
pair.
|
|
|
|
This package contains the shared library for %{name}
|
|
|
|
%package -n %{devname}
|
|
Summary: The development files for %{name}
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libname} = %{version}
|
|
|
|
%description -n %{devname}
|
|
This package contains the development files for %{name}
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%meson \
|
|
-Ddocdir=%{_docdir}/%{libname} \
|
|
%meson_build
|
|
|
|
%install
|
|
%meson_install
|
|
|
|
rm %{buildroot}%{_docdir}/%{libname}/LICENSE
|
|
rm -rf %{buildroot}%{_docdir}/%{libname}/html
|
|
cp example.c examplerc %{buildroot}%{_docdir}/%{libname}
|
|
|
|
%check
|
|
%meson_test
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
%files -n %{libname}
|
|
%defattr(-,root,root)
|
|
%license LICENSE
|
|
%doc README.md ChangeLog.txt ReleaseNotes.txt example.c examplerc
|
|
%{_libdir}/libcanfigger.so.*
|
|
|
|
%files -n %{devname}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libcanfigger.so
|
|
%{_libdir}/pkgconfig/canfigger.pc
|
|
%{_includedir}/canfigger.h
|
|
|
|
%changelog
|