From 9614ffd99b20bb6617085bf07b716e7b3f37355f Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Wed, 29 Aug 2018 11:01:15 +0300 Subject: [PATCH] add packaging --- Makefile.am | 4 ++-- packaging/baselibs.conf | 1 + packaging/flex.changes | 3 +++ packaging/flex.spec | 47 +++++++++++++++++++++++++++++++++++++++++++++++ packaging/lex-wrapper.sh | 2 ++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 packaging/baselibs.conf create mode 100644 packaging/flex.changes create mode 100644 packaging/flex.spec create mode 100644 packaging/lex-wrapper.sh diff --git a/Makefile.am b/Makefile.am index 638c549..eb68d2f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,8 +42,8 @@ EXTRA_DIST = \ autogen.sh SUBDIRS = \ - src \ - doc \ + lib \ + . \ examples \ po \ tests \ diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..b03c40c --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1 @@ +flex diff --git a/packaging/flex.changes b/packaging/flex.changes new file mode 100644 index 0000000..d7ce025 --- /dev/null +++ b/packaging/flex.changes @@ -0,0 +1,3 @@ +* Fri Dec 14 2012 Anas Nashif upstream/2.5.37@81d7353 +- add changelog + diff --git a/packaging/flex.spec b/packaging/flex.spec new file mode 100644 index 0000000..feca2d8 --- /dev/null +++ b/packaging/flex.spec @@ -0,0 +1,47 @@ +%define keepstatic 1 +Name: flex +Version: 2.5.37 +Release: 0 +License: BSD-3-Clause +Summary: Fast Lexical Analyzer Generator +Url: http://flex.sourceforge.net/ +Group: Development/Languages/C and C++ +Source: %{name}-%{version}.tar.bz2 +Source1: lex-wrapper.sh +Source3: baselibs.conf +BuildRequires: automake +BuildRequires: makeinfo +BuildRequires: bison +BuildRequires: gcc-c++ +BuildRequires: gettext-tools +Requires: m4 + +%description +FLEX is a tool for generating scanners: programs that recognize lexical +patterns in text. + +%prep +%setup -q + +%build +autoreconf -fi +%configure --disable-nls +make %{?_smp_mflags} + +%check +%if !0%{?qemu_user_space_build:1} +make check +%endif + +%install +%make_install +install %{SOURCE1} %{buildroot}/%{_bindir}/lex + +%remove_docs +%files +%defattr(-,root,root) +/usr/bin/flex +/usr/bin/flex++ +/usr/bin/lex +/usr/include/FlexLexer.h +%{_libdir}/libfl.a diff --git a/packaging/lex-wrapper.sh b/packaging/lex-wrapper.sh new file mode 100644 index 0000000..7051b86 --- /dev/null +++ b/packaging/lex-wrapper.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/flex -l "$@" -- 2.7.4