From efd543d8cd3f15f24b48b7e2c320861727f1c1ee Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Tue, 3 Sep 2024 16:44:40 +0800 Subject: [PATCH] cleanup spec --- expat.spec | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/expat.spec b/expat.spec index 690063c..c361f71 100644 --- a/expat.spec +++ b/expat.spec @@ -1,13 +1,16 @@ %define Rversion %(echo %{version} | sed -e 's/\\./_/g' -e 's/^/R_/') Name: expat Version: 2.6.2 -Release: 1 +Release: 2 Summary: An XML parser library License: MIT URL: https://libexpat.github.io/ Source0: https://github.com/libexpat/libexpat/releases/download/%{Rversion}/expat-%{version}.tar.gz -BuildRequires: sed,autoconf,automake,gcc-c++,libtool,xmlto,make +BuildRequires: gcc make +BuildRequires: xmlto +BuildRequires: sed +BuildRequires: cmake-rpm-macros %description expat is a stream-oriented XML parser library written in C. @@ -17,6 +20,9 @@ performance and flexibility are crucial. %package devel Summary: Development files Requires: %{name} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} +Obsoletes: %{name}-static < %{version}-%{release} + %description devel This package provides with static libraries and header files for developing with expat. @@ -26,38 +32,40 @@ This package provides with static libraries and header files for developing wit %autosetup -p1 %build -%configure CFLAGS="$RPM_OPT_FLAGS -fPIC" DOCBOOK_TO_MAN="xmlto man --skip-validation" +export CFLAGS="$RPM_OPT_FLAGS -fPIC" +export DOCBOOK_TO_MAN="xmlto man --skip-validation" +%configure --enable-static %make_build %install -%makeinstall +%make_install +%delete_la find %{buildroot} -type f -name changelog -delete %check -make check - -%ldconfig_scriptlets +%make_build check %files -%defattr(-,root,root) -%license COPYING AUTHORS +%license COPYING +%doc AUTHORS %{_bindir}/* %{_libdir}/libexpat.so.1* -%exclude %{_docdir}/%{name}/AUTHORS %files devel -%defattr(-,root,root) %{_includedir}/* -%{_libdir}/{libexpat.*a,libexpat.so} +%{_libdir}/libexpat.a +%{_libdir}/libexpat.so %{_libdir}/cmake/expat-%{version} %{_libdir}/pkgconfig/expat.pc %files help -%defattr(-,root,root) %doc README.md %{_mandir}/man1/* %changelog +* Tue Sep 03 2024 Funda Wang - 2.6.2-2 +- cleanup spec + * Tue Jul 2 2024 warlcok -2.6.2-1 - update to 2.6.2 -- Gitee