diff --git a/libyaml.spec b/libyaml.spec new file mode 100644 index 0000000000000000000000000000000000000000..5f4b08744b3c967c3e83468ff0d25234246429b6 --- /dev/null +++ b/libyaml.spec @@ -0,0 +1,78 @@ +%define anolis_release 1 + +Name: libyaml +Version: 0.2.5 +Release: %{anolis_release}%{?dist} +Summary: A C library for parsing and emitting YAML + +License: MIT +URL: https://github.com/yaml/libyaml +Source0: https://github.com/yaml/libyaml/releases/download/%{version}/yaml-%{version}.tar.gz + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: doxygen +BuildRequires: gcc +BuildRequires: libtool +BuildRequires: make + +%description +YAML is a data serialization format designed for human readability and +interaction with scripting languages. LibYAML is a YAML parser and +emitter written in C. + + +%package devel +Summary: Development files for LibYAML applications +Requires: libyaml%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: pkgconfig + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use LibYAML. + + +%prep +%autosetup -n yaml-%{version} + + +%build +%configure +%make_build all html + + +%install +%make_install +rm -f %{buildroot}%{_libdir}/*.{la,a} + +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 + + + +%check +make check + + +%ldconfig_scriptlets + + +%files +%license License +%doc ReadMe.md +%{_libdir}/%{name}*.so.* + + +%files devel +%doc doc/html +%{_libdir}/%{name}*.so +%{_libdir}/pkgconfig/yaml-0.1.pc +%{_includedir}/yaml.h + + + +%changelog +* Tue Mar 08 2022 mahailiang - 0.2.5-1 +- Init from upstream version 0.2.5 + diff --git a/yaml-0.2.5.tar.gz b/yaml-0.2.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a78e0d998508e242fc7743d06f803cc0e45b2cf3 Binary files /dev/null and b/yaml-0.2.5.tar.gz differ