cleanup spec

(cherry picked from commit 15cda1ec17e6d1a70e3cd0476630a9b8f9062ffd)
This commit is contained in:
Funda Wang 2024-08-11 01:59:59 +08:00 committed by openeuler-sync-bot
parent be9c89e8f1
commit c0eb5a1b47

View File

@ -1,6 +1,6 @@
Name: libyaml
Version: 0.2.5
Release: 6
Release: 7
Summary: A C library for parsing and emitting YAML
License: MIT
URL: https://github.com/yaml/libyaml
@ -19,19 +19,13 @@ emitter written in C.
%package devel
Summary: Development files for LibYAML applications
Requires: libyaml = %{version}-%{release}, pkgconfig
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use LibYAML.
%package help
Summary: Documents for using LibYAML
BuildArch: noarch
%description help
%{summary}.
%package_help
%prep
%autosetup -n yaml-%{version} -p1
@ -42,29 +36,18 @@ BuildArch: noarch
%install
%make_install
rm -vf %{buildroot}%{_libdir}/*.la
soname=$(readelf -d %{buildroot}%{_libdir}/libyaml.so | awk '$2 == "(SONAME)" {print $NF}' | tr -d '[]')
rm -f %{buildroot}%{_libdir}/libyaml.so
echo "INPUT($soname)" > %{buildroot}%{_libdir}/libyaml.so
%delete_la
%check
make check
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%make_build check
%files
%defattr(-,root,root)
%license License
%doc ReadMe.md
%{_libdir}/%{name}*.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/%{name}*.so
%{_libdir}/pkgconfig/yaml-0.1.pc
%{_includedir}/yaml.h
@ -72,8 +55,10 @@ make check
%files help
%doc doc/html
%changelog
* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 0.2.5-7
- cleanup spec
* Thu Apr 25 2024 fuanan <fuanan3@h-partners.com> - 0.2.5-6
- fix CVE-2024-3205