SHA256
3
0
forked from pool/flex
flex/flex.spec
Ismail Dönmez 353dd4fb35 - Update to version 2.6.1
* A number of compiler warnings have been remedied.
  * Line directives should now work as expected and be absent when
    that is expected.
  * Resolved github issues #53, #54, #55, #61.
  * Resolved sf bugs #128, #129, #155, #160, #184, #187, #195.
- Refresh flex-2.5.34-fPIC.patch -> flex-2.6.1-fPIC.patch
- Drop upstream patches: config-guess-sub-update.patch,
  flex-2.5.37-bison-2.6.1-1.patch, flex-compatible-with-bison3.patch,
  flex-yyleng.patch
- Drop unneeded patch flex-2.5.37-notex.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/flex?expand=0&rev=20
2016-04-26 09:49:28 +00:00

92 lines
2.4 KiB
RPMSpec

#
# spec file for package flex
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: flex
#
Version: 2.6.1
Release: 0
Summary: Fast Lexical Analyzer Generator
License: BSD-3-Clause
Group: Development/Languages/C and C++
Url: http://flex.sourceforge.net/
Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.xz
Source1: lex-wrapper.sh
Source2: README.SUSE
Source3: baselibs.conf
Patch1: flex-2.6.1-fPIC.patch
BuildRequires: automake
BuildRequires: bison
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: libtool
BuildRequires: makeinfo
Requires: m4
PreReq: %{install_info_prereq}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
FLEX is a tool for generating scanners: programs that recognize lexical
patterns in text.
%prep
%setup -q
%patch1 -p1
%build
autoreconf -fi
%configure \
--docdir=%{_docdir}/%{name} \
--disable-shared
make %{?_smp_mflags}
%check
%if !0%{?qemu_user_space_build:1}
make %{?_smp_mflags} check
%endif
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install %{SOURCE1} %{buildroot}/%{_bindir}/lex
ln -s flex.1.gz %{buildroot}/%{_mandir}/man1/lex.1.gz
cp %{SOURCE2} %{buildroot}/%{_docdir}/%{name}
find %{buildroot} -name *.la -delete
%find_lang %{name}
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/flex
%{_bindir}/flex++
%{_bindir}/lex
%{_includedir}/FlexLexer.h
%{_libdir}/libfl.a
%{_mandir}/man1/flex.1.gz
%{_mandir}/man1/lex.1.gz
%{_infodir}/flex*
%{_docdir}/%{name}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%changelog