Ignore:
Timestamp:
Jun 12, 2019, 9:37:33 AM (6 years ago)
Author:
Silvan Scherrer
Message:

spec: flex: Release version 2.6.4-1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/flex.spec

    r299 r1649  
     1# devel is not buildable due to unresolved externals
     2%define build_devel 0
     3
    14Summary: A tool for creating scanners (text pattern recognizers)
    25Name: flex
    3 Version: 2.5.35
    4 Release: 2%{?dist}
    5 License: BSD
     6Version: 2.6.4
     7Release: 1%{?dist}
     8# parse.c and parse.h are under GPLv3+ with exception which allows
     9#       relicensing.  Since flex is shipped under BDS-style license,
     10#       let's  assume that the relicensing was done.
     11# gettext.h (copied from gnulib) is under LGPLv2+
     12License: BSD and LGPLv2+
     13URL: https://github.com/westes/flex
    614Group: Development/Tools
    7 URL: http://flex.sourceforge.net/
    8 Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
    9 Patch0: flex-2.5.35-sign.patch
    10 Patch1: flex-2.5.35-hardening.patch
    11 Patch2: flex-2.5.35-gcc44.patch
    12 Patch3: flex-2.5.35-missing-prototypes.patch
    13 Patch4: flex-os2.patch
    14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
     15%scm_source github https://github.com/bitwiseworks/%{name}-os2 %{version}-os2
     16
    1517Requires: m4
    16 BuildRequires: gettext bison m4
    17 
    18 # We need to pull in the static library package.  That's necessary so
    19 # that packages that just do BuildRequires: flex can still use -lfl.
    20 # I suspect that linking to -lfl is actually rare and those (few)
    21 # packages that do use it could be taught to require the sub-package
    22 # explicitly.  So at some point in future, this dependency may be
    23 # dropped.
    24 #Requires: flex-static = %{version}
     18BuildRequires: gettext gettext-devel bison m4 help2man gcc automake libtool
    2519
    2620%description
     
    4034# We keep the libraries in separate sub-package to allow for multilib
    4135# installations of flex.
    42 #%package static
    43 #Summary: Libraries for flex scanner generator
    44 #Group: Development/Tools
     36%if %{build_devel}
     37%package devel
     38Summary: Libraries for flex scanner generator
     39Obsoletes: flex-static < 2.5.35-15
     40Provides: flex-static
    4541
    46 #%description static
    47 #This package contains the library with default implementations of
    48 #`main' and `yywrap' functions that the client binary can choose to use
    49 #instead of implementing their own.
     42%description devel
     43
     44This package contains the library with default implementations of
     45`main' and `yywrap' functions that the client binary can choose to use
     46instead of implementing their own.
     47%endif
     48
     49%package doc
     50Summary: Documentation for flex scanner generator
     51       
     52%description doc
     53
     54This package contains documentation for flex scanner generator in
     55plain text and PDF formats.
     56
     57%debug_package
    5058
    5159%prep
    52 %setup -q
    53 %patch0 -p1
    54 %patch1 -p1
    55 %patch2 -p1
    56 %patch3 -p1
    57 %patch4 -p1
     60%scm_setup
    5861
    5962%build
    60 export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
     63autoreconf -fvi
     64
    6165export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
    62 export LIBS="-lurpo -lmmap"
    63 export M4="/@unixroot/usr/bin/m4.exe"
    64 %configure \
    65     --disable-dependency-tracking \
    66    "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
    67 
     66export LIBS="-lcx"
     67%if %{build_devel}
     68%global conf_flags ""
     69%else
     70%global conf_flags "--disable-libfl"
     71%endif
     72%configure --docdir=%{_pkgdocdir} %{conf_flags}
    6873make %{?_smp_mflags}
    6974
     
    7277make DESTDIR=$RPM_BUILD_ROOT install
    7378rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
    74 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
     79rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/README.cvs
     80rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/TODO
     81# For now, excluding the new .la and .so files as we haven't had
     82# any requests for them and adding them will require a new subpackage.
     83# The .so files contain 2 optional implementations of main and yywrap
     84# for developer convenience. They are also available in the .a file
     85# provided in flex-devel.
     86find %{buildroot} -name '*.la' -delete
     87find %{buildroot} -name '*.dll' -delete
    7588
    7689( cd ${RPM_BUILD_ROOT}
    77   ln -sf flex .%{_bindir}/lex
    78   ln -sf flex .%{_bindir}/flex++
     90  rm -f .%{_bindir}/flex++.exe
     91  ln -sf flex.exe .%{_bindir}/lex
     92  ln -sf flex.exe .%{_bindir}/flex++
    7993  ln -s flex.1 .%{_mandir}/man1/lex.1
    8094  ln -s flex.1 .%{_mandir}/man1/flex++.1
     95%if %{build_devel}
     96  ln -s libfl.a .%{_libdir}/libl.a
     97%endif
    8198)
    8299
    83 #%check
    84 #echo ============TESTING===============
    85 #make check
    86 #echo ============END TESTING===========
     100%find_lang flex
    87101
    88 %clean
    89 rm -rf ${RPM_BUILD_ROOT}
     102%check
     103echo ============TESTING===============
     104make check
     105echo ============END TESTING===========
    90106
    91 %files
    92 %defattr(-,root,root)
    93 %doc COPYING NEWS README
     107%files  -f flex.lang
     108%dir %{_pkgdocdir}
     109%license COPYING
     110%{_pkgdocdir}/NEWS
     111%{_pkgdocdir}/README.md
    94112%{_bindir}/*
     113%exclude %{_bindir}/*.dbg
    95114%{_mandir}/man1/*
    96115%{_includedir}/FlexLexer.h
    97116%{_infodir}/flex.info*
    98 %{_usr}/share/locale/*
    99117
    100 #%files static
    101 #%defattr(-,root,root)
    102 #%{_libdir}/*.a
     118%if %{build_devel}
     119%files devel
     120%dir %{_pkgdocdir}
     121%license COPYING
     122%{_libdir}/*.a
     123%endif
     124
     125%files doc     
     126%{_pkgdocdir}
     127%exclude %{_pkgdocdir}/NEWS
     128%exclude %{_pkgdocdir}/README.md
    103129
    104130%changelog
     131* Wed Jun 12 2019 Silvan Scherrer <silvan.scherrer@aroa.ch> 2.6.4-1
     132- update to version 2.6.4
     133- use scm_ macros
     134- moved source to github
     135
    105136* Tue Feb 28 2012 yd
    106137- fixed m4 executable location.
Note: See TracChangeset for help on using the changeset viewer.