From 0c451c355fe018fd456528caf2b5e8b2b70c7fcf Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 10 Aug 2024 17:04:46 +0800 Subject: [PATCH] cleanup spec (cherry picked from commit 391389877823b076a7f08222ad12b47418fdff7d) --- flex.spec | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) diff --git a/flex.spec b/flex.spec index 6cd8210..4b6a0c1 100644 --- a/flex.spec +++ b/flex.spec @@ -1,8 +1,8 @@ Name: flex Version: 2.6.4 -Release: 7 +Release: 8 Summary: A fast lexical analyzer generator -License: BSD +License: BSD-3-Clause-flex AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND GPL-3.0-or-later WITH Bison-exception-2.2 AND GPL-3.0-or-later WITH Texinfo-exception AND FSFAP AND FSFUL AND FSFULLR AND FSFULLRWD AND GPL-2.0-or-later AND X11 URL: https://github.com/westes/flex Source0: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.gz @@ -22,8 +22,6 @@ Patch0012: 0004-backport-fix-typo.patch BuildRequires: gcc gcc-c++ gettext help2man m4 bison texinfo automake autoconf Requires: m4 -Requires(post): info -Requires(preun): info %description Flex is a tool for generating scanners: programs which recognize lexical @@ -59,54 +57,43 @@ autoreconf %install %make_install -rm -f $RPM_BUILD_ROOT/%{_infodir}/dir +%delete_la +%find_lang %{name} + +rm -f %{buildroot}%{_infodir}/dir +rm -f %{buildroot}%{_docdir}/%{name}/{AUTHORS,COPYING,ONEWS,NEWS,README.md} find %{buildroot} \( -name '*.la' -or -name '*.so' \) -delete find %{buildroot} \( -name '*.so.2' -or -name '*.so.2.0.0' \) -delete -cd ${RPM_BUILD_ROOT} +pushd ${RPM_BUILD_ROOT} ln -sf flex .%{_bindir}/lex ln -sf flex .%{_bindir}/flex++ ln -s flex.1 .%{_mandir}/man1/lex.1 ln -s flex.1 .%{_mandir}/man1/flex++.1 ln -s libfl.a .%{_libdir}/libl.a +popd %check -make check - -%post -if [ -f %{_infodir}/flex.info.gz ]; then # for --excludedocs - /sbin/install-info %{_infodir}/flex.info.gz --dir-file=%{_infodir}/dir ||: -fi - -%preun -if [ $1 = 0 ]; then - if [ -f %{_infodir}/flex.info.gz ]; then # for --excludedocs - /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir ||: - fi -fi - -%files -%{_datadir}/locale/* -%dir %{_pkgdocdir} +%make_build check + +%files -f %{name}.lang %license COPYING -%{_pkgdocdir}/NEWS -%{_pkgdocdir}/README.md %{_bindir}/* %{_includedir}/FlexLexer.h -%{_infodir}/flex.info* %files devel -%dir %{_pkgdocdir} %license COPYING %{_libdir}/*.a %files help -%{_pkgdocdir} -%exclude %{_pkgdocdir}/NEWS -%exclude %{_pkgdocdir}/README.md +%doc AUTHORS ONEWS NEWS README.md %{_mandir}/man1/* +%{_infodir}/flex.info* %changelog +* Sat Aug 10 2024 Funda Wang - 2.6.4-8 +- cleanup spec + * Fri Aug 9 2024 guojunding - 2.6.4-7 - Fix typo -- Gitee