Name: flex Version: 2.6.1 Release: 13 Summary: A fast lexical analyzer generator License: BSD and LGPLv2+ URL: https://github.com/westes/flex Source0: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.xz BuildRequires: gcc gettext help2man m4 bison Requires: m4 Requires(post): info Requires(preun): info %description Flex is a tool for generating scanners: programs which recognize lexical patterns in text. %package devel Summary: Libraries for flex scanner generator Obsoletes: flex-static < 2.5.35-15 Provides: flex-static %description devel This package contains the library with default implementations of `main' and `yywrap' functions that the client binary can choose to use instead of implementing their own. %package help Summary: Documents for %{name} Buildarch: noarch Requires: man info Provides: flex-doc Obsoletes: flex-doc %description help Man pages and other related documents for %{name}. %prep %autosetup -n %{name}-%{version} %build %configure %make_build %install %make_install rm -f $RPM_BUILD_ROOT/%{_infodir}/dir find %{buildroot} \( -name '*.la' -or -name '*.so' \) -delete find %{buildroot} \( -name '*.so.2' -or -name '*.so.2.0.0' \) -delete cd ${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 %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} %license COPYING %{_pkgdocdir}/NEWS %{_pkgdocdir}/README %{_bindir}/* %{_includedir}/FlexLexer.h %{_infodir}/flex.info* %files devel %dir %{_pkgdocdir} %license COPYING %{_libdir}/*.a %files help %{_pkgdocdir} %{_mandir}/man1/* %changelog * Tue Jan 7 2020 chengquan - 2.6.1-13 - Type:enhancement - ID:NA - SUG:NA - DESC:remove useless patches * Fri Sep 27 2019 chengquan - 2.6.1-12 - Type:bugfix - ID:NA - SUG:NA - DESC:add help package * Mon Aug 19 2019 openEuler Buildteam - 2.6.1-11 - Package init