|
|
|
@ -24,17 +24,14 @@
|
|
|
|
|
## |
|
|
|
|
|
|
|
|
|
# package options |
|
|
|
|
%ifndef with_unstable |
|
|
|
|
%define with_unstable no |
|
|
|
|
%ifndef with_beta |
|
|
|
|
%define with_beta yes |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
# package versions |
|
|
|
|
%define V_stable 2.5.4a |
|
|
|
|
%define V_stable_maj 2.5.4 |
|
|
|
|
%define V_stable_min a |
|
|
|
|
%define V_unstable 2.5.7s20020513 |
|
|
|
|
%define V_unstable_maj 2.5.7 |
|
|
|
|
%define V_unstable_min 2002-05-13 |
|
|
|
|
%define V_release 2.5.4a |
|
|
|
|
%define V_release_maj 2.5.4 |
|
|
|
|
%define V_beta 2.5.8 |
|
|
|
|
|
|
|
|
|
# package information |
|
|
|
|
Name: flex |
|
|
|
@ -45,19 +42,12 @@ Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [REL] |
|
|
|
|
Group: Language |
|
|
|
|
License: BSD |
|
|
|
|
%if "%{with_unstable}" == "yes" |
|
|
|
|
Version: %{V_unstable} |
|
|
|
|
%else |
|
|
|
|
Version: %{V_stable} |
|
|
|
|
%endif |
|
|
|
|
Release: 20020514 |
|
|
|
|
Version: %{V_release} |
|
|
|
|
Release: 20020701 |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
%if "%{with_unstable}" == "yes" |
|
|
|
|
Source0: http://astro.temple.edu/~john43/flex/flex-%{V_unstable_maj}-developer-%{V_unstable_min}.tar.gz |
|
|
|
|
%else |
|
|
|
|
Source0: ftp://ftp.gnu.org/non-gnu/flex/flex-%{V_stable}.tar.gz |
|
|
|
|
%endif |
|
|
|
|
Source0: ftp://ftp.gnu.org/non-gnu/flex/flex-%{V_release}.tar.gz |
|
|
|
|
Source1: ftp://ftp.uncg.edu/people/wlestes/flex-%{V_beta}.tar.gz |
|
|
|
|
|
|
|
|
|
# build information |
|
|
|
|
Prefix: %{l_prefix} |
|
|
|
@ -77,31 +67,53 @@ AutoReqProv: no
|
|
|
|
|
is run, it analyzes its input for occurrences of the regular expressions. |
|
|
|
|
Whenever it finds one, it executes the corresponding C code. |
|
|
|
|
|
|
|
|
|
Options: with_unstable=%{with_unstable} |
|
|
|
|
Options: with_beta=%{with_beta} |
|
|
|
|
|
|
|
|
|
%prep |
|
|
|
|
%if "%{with_unstable}" == "yes" |
|
|
|
|
%setup -q -n flex-%{V_unstable_maj} |
|
|
|
|
%else |
|
|
|
|
%setup -q -n flex-%{V_stable_maj} |
|
|
|
|
%setup0 -q -c -n flex-%{version} |
|
|
|
|
%if "%{with_beta}" == "yes" |
|
|
|
|
%setup1 -q -T -D -a 1 |
|
|
|
|
%endif |
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH" |
|
|
|
|
export PATH |
|
|
|
|
CC="%{l_cc}" \ |
|
|
|
|
CFLAGS="%{l_cflags -O}" \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=$RPM_BUILD_ROOT%{l_prefix} |
|
|
|
|
%{l_make} %{l_mflags} |
|
|
|
|
%if "%{with_beta}" == "yes" |
|
|
|
|
( cd flex-%{V_beta} |
|
|
|
|
CC="%{l_cc}" \ |
|
|
|
|
CFLAGS="%{l_cflags -O}" \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=%{l_prefix} \ |
|
|
|
|
--disable-nls |
|
|
|
|
%{l_make} %{l_mflags} |
|
|
|
|
) |
|
|
|
|
%endif |
|
|
|
|
( cd flex-%{V_release_maj} |
|
|
|
|
CC="%{l_cc}" \ |
|
|
|
|
CFLAGS="%{l_cflags -O}" \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=$RPM_BUILD_ROOT%{l_prefix} |
|
|
|
|
%{l_make} %{l_mflags} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|
%{l_make} %{l_mflags} install |
|
|
|
|
%if "%{with_beta}" == "yes" |
|
|
|
|
( cd flex-%{V_beta} |
|
|
|
|
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/flex \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/flex-beta |
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/include/FlexLexer.h \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/include/FlexLexer-beta.h |
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/libfl.a \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/libfl-beta.a |
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/flex.1 \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1/flex-beta.1 |
|
|
|
|
) |
|
|
|
|
%endif |
|
|
|
|
( cd flex-%{V_release_maj} |
|
|
|
|
%{l_make} %{l_mflags} install |
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flex++ |
|
|
|
|
) |
|
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/flex++ |
|
|
|
|
ln $RPM_BUILD_ROOT%{l_prefix}/bin/flex \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/flex++ |
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
|
|
|
|
|
|
%files -f files |
|
|
|
|