!39 [sync] PR-29: Cleanup spec

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-08-22 08:15:37 +00:00 committed by Gitee
commit f0d0814395
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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
%make_build 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}
%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 <fundawang@yeah.net> - 2.6.4-8
- cleanup spec
* Fri Aug 9 2024 guojunding <guojunding@kylinos.cn> - 2.6.4-7
- Fix typo