Changeset 1649 for spec/trunk/SPECS/flex.spec
- Timestamp:
- Jun 12, 2019, 9:37:33 AM (6 years ago)
- File:
-
- 1 edited
-
spec/trunk/SPECS/flex.spec (modified) (3 diffs)
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 1 4 Summary: A tool for creating scanners (text pattern recognizers) 2 5 Name: flex 3 Version: 2.5.35 4 Release: 2%{?dist} 5 License: BSD 6 Version: 2.6.4 7 Release: 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+ 12 License: BSD and LGPLv2+ 13 URL: https://github.com/westes/flex 6 14 Group: 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 15 17 Requires: 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} 18 BuildRequires: gettext gettext-devel bison m4 help2man gcc automake libtool 25 19 26 20 %description … … 40 34 # We keep the libraries in separate sub-package to allow for multilib 41 35 # installations of flex. 42 #%package static 43 #Summary: Libraries for flex scanner generator 44 #Group: Development/Tools 36 %if %{build_devel} 37 %package devel 38 Summary: Libraries for flex scanner generator 39 Obsoletes: flex-static < 2.5.35-15 40 Provides: flex-static 45 41 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 44 This package contains the library with default implementations of 45 `main' and `yywrap' functions that the client binary can choose to use 46 instead of implementing their own. 47 %endif 48 49 %package doc 50 Summary: Documentation for flex scanner generator 51 52 %description doc 53 54 This package contains documentation for flex scanner generator in 55 plain text and PDF formats. 56 57 %debug_package 50 58 51 59 %prep 52 %setup -q 53 %patch0 -p1 54 %patch1 -p1 55 %patch2 -p1 56 %patch3 -p1 57 %patch4 -p1 60 %scm_setup 58 61 59 62 %build 60 export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe" 63 autoreconf -fvi 64 61 65 export 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 66 export 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} 68 73 make %{?_smp_mflags} 69 74 … … 72 77 make DESTDIR=$RPM_BUILD_ROOT install 73 78 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir 74 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a 79 rm -f $RPM_BUILD_ROOT/%{_pkgdocdir}/README.cvs 80 rm -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. 86 find %{buildroot} -name '*.la' -delete 87 find %{buildroot} -name '*.dll' -delete 75 88 76 89 ( 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++ 79 93 ln -s flex.1 .%{_mandir}/man1/lex.1 80 94 ln -s flex.1 .%{_mandir}/man1/flex++.1 95 %if %{build_devel} 96 ln -s libfl.a .%{_libdir}/libl.a 97 %endif 81 98 ) 82 99 83 #%check 84 #echo ============TESTING=============== 85 #make check 86 #echo ============END TESTING=========== 100 %find_lang flex 87 101 88 %clean 89 rm -rf ${RPM_BUILD_ROOT} 102 %check 103 echo ============TESTING=============== 104 make check 105 echo ============END TESTING=========== 90 106 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 94 112 %{_bindir}/* 113 %exclude %{_bindir}/*.dbg 95 114 %{_mandir}/man1/* 96 115 %{_includedir}/FlexLexer.h 97 116 %{_infodir}/flex.info* 98 %{_usr}/share/locale/*99 117 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 103 129 104 130 %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 105 136 * Tue Feb 28 2012 yd 106 137 - fixed m4 executable location.
Note:
See TracChangeset
for help on using the changeset viewer.
