|
|
@ -1,29 +1,22 @@
|
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
|
|
|
|
|
|
Summary: A tool for creating scanners (text pattern recognizers)
|
|
|
|
Summary: A tool for generating scanners (text pattern recognizers)
|
|
|
|
Name: flex
|
|
|
|
Name: flex
|
|
|
|
Version: 2.6.1
|
|
|
|
Version: 2.6.4
|
|
|
|
Release: 9%{?dist}
|
|
|
|
Release: 9%{?dist}
|
|
|
|
# parse.c and parse.h are under GPLv3+ with exception which allows
|
|
|
|
# parse.c and parse.h are under GPLv3+ with exception which allows
|
|
|
|
# relicensing. Since flex is shipped under BDS-style license,
|
|
|
|
# relicensing. Since flex is shipped under BDS-style license,
|
|
|
|
# let's assume that the relicensing was done.
|
|
|
|
# let's assume that the relicensing was done.
|
|
|
|
# gettext.h (copied from gnulib) is under LGPLv2+
|
|
|
|
# gettext.h (copied from gnulib) is under LGPLv2+
|
|
|
|
License: BSD and LGPLv2+
|
|
|
|
License: BSD and LGPLv2+
|
|
|
|
Group: Development/Tools
|
|
|
|
|
|
|
|
URL: https://github.com/westes/flex
|
|
|
|
URL: https://github.com/westes/flex
|
|
|
|
Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.xz
|
|
|
|
Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
Patch0: flex-2.6.0-yyless.patch
|
|
|
|
Patch0: flex-rh1389575.patch
|
|
|
|
Patch1: flex-max_size.patch
|
|
|
|
|
|
|
|
Patch2: flex-new_size.patch
|
|
|
|
|
|
|
|
Patch3: flex-yy_buf_size.patch
|
|
|
|
|
|
|
|
Patch4: flex-yybytes_len.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
Requires: m4
|
|
|
|
Requires: m4
|
|
|
|
BuildRequires: gettext bison m4 help2man gcc gcc-c++
|
|
|
|
BuildRequires: gettext gettext-devel bison m4 help2man gcc gcc-c++ automake libtool
|
|
|
|
Requires(post): /sbin/install-info
|
|
|
|
BuildRequires: make
|
|
|
|
Requires(preun): /sbin/install-info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
|
The flex program generates scanners. Scanners are programs which can
|
|
|
|
The flex program generates scanners. Scanners are programs which can
|
|
|
@ -41,36 +34,62 @@ application development.
|
|
|
|
|
|
|
|
|
|
|
|
# We keep the libraries in separate sub-package to allow for multilib
|
|
|
|
# We keep the libraries in separate sub-package to allow for multilib
|
|
|
|
# installations of flex.
|
|
|
|
# installations of flex.
|
|
|
|
%package devel
|
|
|
|
|
|
|
|
Summary: Libraries for flex scanner generator
|
|
|
|
%define somajor 2
|
|
|
|
Group: Development/Tools
|
|
|
|
|
|
|
|
|
|
|
|
%package -n libfl%{somajor}
|
|
|
|
|
|
|
|
Summary: Libraries for the flex scanner generator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n libfl%{somajor}
|
|
|
|
|
|
|
|
flex is a tool for generating scanners.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This package contains the shared library with default implementations of
|
|
|
|
|
|
|
|
`main' and `yywrap' functions that binaries using flex can choose to link
|
|
|
|
|
|
|
|
against instead of implementing on their own.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n libfl-devel
|
|
|
|
|
|
|
|
Summary: Development files for the flex scanner generator
|
|
|
|
|
|
|
|
Requires: libfl%{somajor} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n libfl-devel
|
|
|
|
|
|
|
|
flex is a tool for generating scanners.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This package contains files required to build programs that use flex
|
|
|
|
|
|
|
|
libraries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n libfl-static
|
|
|
|
|
|
|
|
Summary: Static libraries for the flex scanner generator
|
|
|
|
|
|
|
|
# We renamed flex-static to flex-devel in version 2.5.35-15:
|
|
|
|
Obsoletes: flex-static < 2.5.35-15
|
|
|
|
Obsoletes: flex-static < 2.5.35-15
|
|
|
|
Provides: flex-static
|
|
|
|
Provides: flex-static
|
|
|
|
|
|
|
|
# We renamed flex-devel to libfl-static in version 2.6.4-6. This clarifies
|
|
|
|
|
|
|
|
# the nature of the package and brings us in line with naming used by SUSE
|
|
|
|
|
|
|
|
# and Debian:
|
|
|
|
|
|
|
|
Obsoletes: flex-devel < 2.6.4-6
|
|
|
|
|
|
|
|
Provides: flex-devel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n libfl-static
|
|
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
flex is a tool for generating scanners.
|
|
|
|
|
|
|
|
|
|
|
|
This package contains the library with default implementations of
|
|
|
|
This package contains the static library with default implementations of
|
|
|
|
`main' and `yywrap' functions that the client binary can choose to use
|
|
|
|
`main' and `yywrap' functions that binaries using flex can choose to
|
|
|
|
instead of implementing their own.
|
|
|
|
statically link against instead of implementing their own.
|
|
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for flex scanner generator
|
|
|
|
Summary: Documentation for the flex scanner generator
|
|
|
|
Group: Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
%description doc
|
|
|
|
|
|
|
|
|
|
|
|
This package contains documentation for flex scanner generator in
|
|
|
|
This package contains documentation for the flex scanner generator in
|
|
|
|
plain text and PDF formats.
|
|
|
|
plain text and PDF formats.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
|
|
|
%patch4 -p1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
|
|
|
|
autoreconf -i
|
|
|
|
%configure --docdir=%{_pkgdocdir} CFLAGS="-fPIC $RPM_OPT_FLAGS"
|
|
|
|
%configure --docdir=%{_pkgdocdir} CFLAGS="-fPIC $RPM_OPT_FLAGS"
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
@ -79,15 +98,8 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/{README.cvs,TODO}
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/{README.cvs,TODO}
|
|
|
|
# For now, excluding the new .la and .so files as we haven't had
|
|
|
|
# Exclude libtool archives (.la) as per Fedora packaging guidelines
|
|
|
|
# any requests for them and adding them will require a new subpackage.
|
|
|
|
|
|
|
|
# The .so files contain 2 optional implementations of main and yywrap
|
|
|
|
|
|
|
|
# for developer convenience. They are also available in the .a file
|
|
|
|
|
|
|
|
# provided in flex-devel.
|
|
|
|
|
|
|
|
find %{buildroot} -name '*.la' -delete
|
|
|
|
find %{buildroot} -name '*.la' -delete
|
|
|
|
find %{buildroot} -name '*.so' -delete
|
|
|
|
|
|
|
|
find %{buildroot} -name '*.so.2' -delete
|
|
|
|
|
|
|
|
find %{buildroot} -name '*.so.2.0.0' -delete
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
( cd ${RPM_BUILD_ROOT}
|
|
|
|
( cd ${RPM_BUILD_ROOT}
|
|
|
|
ln -sf flex .%{_bindir}/lex
|
|
|
|
ln -sf flex .%{_bindir}/lex
|
|
|
@ -99,52 +111,79 @@ find %{buildroot} -name '*.so.2.0.0' -delete
|
|
|
|
|
|
|
|
|
|
|
|
%find_lang flex
|
|
|
|
%find_lang flex
|
|
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
echo ============TESTING===============
|
|
|
|
echo ============TESTING===============
|
|
|
|
make check
|
|
|
|
make check
|
|
|
|
echo ============END TESTING===========
|
|
|
|
echo ============END TESTING===========
|
|
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
|
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -f flex.lang
|
|
|
|
%files -f flex.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%dir %{_pkgdocdir}
|
|
|
|
%dir %{_pkgdocdir}
|
|
|
|
%license COPYING
|
|
|
|
%license COPYING
|
|
|
|
%{_pkgdocdir}/NEWS
|
|
|
|
%{_pkgdocdir}/NEWS
|
|
|
|
%{_pkgdocdir}/README
|
|
|
|
%{_pkgdocdir}/README.md
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_includedir}/FlexLexer.h
|
|
|
|
%{_includedir}/FlexLexer.h
|
|
|
|
%{_infodir}/flex.info*
|
|
|
|
%{_infodir}/flex.info*
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%files -n libfl%{somajor}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libfl.so.%{somajor}*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n libfl-devel
|
|
|
|
|
|
|
|
%{_includedir}/FlexLexer.h
|
|
|
|
|
|
|
|
%{_libdir}/libfl.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n libfl-static
|
|
|
|
%dir %{_pkgdocdir}
|
|
|
|
%dir %{_pkgdocdir}
|
|
|
|
%license COPYING
|
|
|
|
%license COPYING
|
|
|
|
%{_libdir}/*.a
|
|
|
|
%{_libdir}/*.a
|
|
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%{_pkgdocdir}
|
|
|
|
%{_pkgdocdir}
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Tue Jul 31 2018 Arjun Shankar <arjun@redhat.com> - 2.6.1-9
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.4-9
|
|
|
|
- Add gcc and gcc-c++ as build-time requirements
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.4-8
|
|
|
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-7
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Aug 21 2020 Arjun Shankar <arjun@redhat.com> - 2.6.4-6
|
|
|
|
|
|
|
|
- Re-work flex subpackages and provide shared libraries (#1327851):
|
|
|
|
|
|
|
|
- Remove and obsolete the flex-devel subpackage containing static libraries
|
|
|
|
|
|
|
|
- Provide shared libraries in a new subpackage named libfl2
|
|
|
|
|
|
|
|
- Provide development files in a new subpackage named libfl-devel
|
|
|
|
|
|
|
|
- Provide static libraries in a new subpackage named libfl-static
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-5
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-3
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Sep 03 2018 Arjun Shankar <arjun@redhat.com> - 2.6.4-1
|
|
|
|
|
|
|
|
- Rebase to 2.6.4
|
|
|
|
|
|
|
|
- Fix build failure due to missing include and `reallocarray' prototype
|
|
|
|
|
|
|
|
- Add gettext-devel, automake and libtool to build dependencies, and
|
|
|
|
|
|
|
|
execute `autoreconf -i' to regenerate files after patching configure.ac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jul 23 2018 Arjun Shankar <arjun@redhat.com> - 2.6.1-10
|
|
|
|
|
|
|
|
- Add gcc-c++ as a build-time requirement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-9
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jun 18 2018 Arjun Shankar <arjun@redhat.com> - 2.6.1-8
|
|
|
|
* Wed Jun 27 2018 Arjun Shankar <arjun@redhat.com> - 2.6.1-8
|
|
|
|
- Remove g++ signed/unsigned comparison warning in generated scanner
|
|
|
|
- Remove g++ signed/unsigned comparison warning in generated scanner
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.6.1-7
|
|
|
|
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.6.1-7
|
|
|
|