# # spec file for package augeas # # Copyright (c) 2022-2023 ZhuningOS # %define libname lib%{name}0 Name: augeas Version: 1.12.0 Release: 150400.3.3.6 Summary: An utility for changing configuration files License: GPL-3.0-or-later AND LGPL-2.1-or-later URL: https://augeas.net/ Source0: http://download.augeas.net/augeas-%{version}.tar.gz Source1: http://download.augeas.net/augeas-%{version}.tar.gz.sig Source2: %{name}.keyring Source3: baselibs.conf Patch0: augeas-modprobe-lense.patch Patch1: gcc9-disable-broken-test.patch Patch2: augeas-new_options_for_chrony.patch Patch3: augeas-allow_printable_ASCII.patch Patch4: remove-unportable-tests.patch # from https://patch-diff.githubusercontent.com/raw/hercules-team/augeas/pull/755.patch Patch5: augeas-sysctl_parsing.patch BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: pkgconfig(libxml-2.0) %description An utility for programmatically editing configuration files. Augeas parses configuration files into a tree structure. The transformation works very hard to preserve comments and formatting details. It is controlled by ``lens'' definitions that describe the file format and the transformation into a tree. %package devel Summary: A library for changing configuration files Requires: %{libname} = %{version} %description devel A library for programmatically editing configuration files. Augeas parses configuration files into a tree structure, which it exposes through its public API. Changes made through the API are written back to the initially read files. The transformation works very hard to preserve comments and formatting details. It is controlled by ``lens'' definitions that describe the file format and the transformation into a tree. %package -n %{libname} Summary: A library for changing configuration files Recommends: %{name}-lenses = %{version} %description -n %{libname} A library for programmatically editing configuration files. Augeas parses configuration files into a tree structure, which it exposes through its public API. Changes made through the API are written back to the initially read files. The transformation works very hard to preserve comments and formatting details. It is controlled by ``lens'' definitions that describe the file format and the transformation into a tree. %package lenses Summary: Official set of lenses for use by %{libname} Requires: %{libname} = %{version} %description lenses Augeas parses configuration files described in lenses into a tree structure, which it exposes through its public API. Lenses are the building blocks of the file <-> tree transformation. The transformation is controlled by ``lens'' definitions that describe the file format and mapping of its contents into a tree. This package includes the official set of lenses. %package lense-tests Summary: Set of tests for official Augeas lenses Requires: %{name}-lenses = %{version} %description lense-tests Set of tests for official Augeas lenses. These can be used when modifying the official lenses, or when creating new ones. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %build %configure \ --disable-static \ --disable-silent-rules \ --disable-rpath %make_build %install %make_install find %{buildroot} -type f -name "*.la" -delete -print # move vim files to the right location mv %{buildroot}/%{_datadir}/vim/vimfiles %{buildroot}/%{_datadir}/vim/site %check %make_build check %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files %{_bindir}/augmatch %{_bindir}/augtool %{_bindir}/augparse %{_bindir}/fadot %{_mandir}/man1/* %license COPYING %doc AUTHORS NEWS %files -n %{libname} %{_libdir}/*.so.* %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/augeas.pc # vim support files %dir %{_datadir}/vim %dir %{_datadir}/vim/site %dir %{_datadir}/vim/site/ftdetect %{_datadir}/vim/site/ftdetect/augeas.vim %dir %{_datadir}/vim/site/syntax %{_datadir}/vim/site/syntax/augeas.vim %files lenses %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/lenses %dir %{_datadir}/%{name}/lenses/dist %{_datadir}/%{name}/lenses/dist/*.aug %files lense-tests %dir %{_datadir}/%{name}/lenses/dist/tests %{_datadir}/%{name}/lenses/dist/tests/*.aug %changelog