1Summary: byacc - public domain Berkeley LALR Yacc parser generator 2%define AppProgram byacc 3%define AltProgram btyacc 4%define AppVersion 20200330 5%define UseProgram yacc 6# $Id: byacc.spec,v 1.49 2020/03/30 23:31:42 tom Exp $ 7Name: %{AppProgram} 8Version: %{AppVersion} 9Release: 1 10License: Public Domain, MIT 11Group: Applications/Development 12URL: ftp://invisible-island.net/%{AppProgram} 13Source0: %{AppProgram}-%{AppVersion}.tgz 14Packager: Thomas E. Dickey <dickey@invisible-island.net> 15 16%description 17This package provides a parser generator utility that reads a grammar 18specification from a file and generates an LR(1) parser for it. The 19parsers consist of a set of LALR(1) parsing tables and a driver 20routine written in the C programming language. It has a public domain 21license which includes the generated C. 22 23%package -n btyacc 24Summary: Curses library with POSIX thread support. 25 26%description -n btyacc 27This package provides a parser generator utility that reads a grammar 28specification from a file and generates an LR(1) parser for it. The 29parsers consist of a set of LALR(1) parsing tables and a driver 30routine written in the C programming language. It has a public domain 31license which includes the generated C. 32 33This package has the backtracking extension. 34 35%prep 36 37%define debug_package %{nil} 38 39%setup -q -n %{AppProgram}-%{AppVersion} 40 41%build 42%define my_srcdir .. 43%define CFG_OPTS \\\ 44 --verbose \\\ 45 --disable-echo \\\ 46 --target %{_target_platform} \\\ 47 --prefix=%{_prefix} \\\ 48 --srcdir=%{my_srcdir} \\\ 49 --bindir=%{_bindir} \\\ 50 --libdir=%{_libdir} \\\ 51 --mandir=%{_mandir} 52 53%global _configure ../configure 54 55mkdir BUILD-byacc 56pushd BUILD-byacc 57CONFIGURE_TOP=%{my_srcdir} \ 58%configure %{CFG_OPTS} \ 59 --program-prefix=b \ 60 --program-transform-name='s,\^,b,' 61make 62popd 63 64mkdir BUILD-btyacc 65pushd BUILD-btyacc 66CONFIGURE_TOP=%{my_srcdir} \ 67%configure %{CFG_OPTS} \ 68 --enable-btyacc \ 69 --program-prefix=bt \ 70 --with-max-table-size=18000 \ 71 --program-transform-name='s,\^,bt,' 72make 73popd 74 75%install 76[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 77 78pushd BUILD-byacc 79make install DESTDIR=$RPM_BUILD_ROOT 80( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{AppProgram} %{UseProgram} ) 81popd 82 83pushd BUILD-btyacc 84make install DESTDIR=$RPM_BUILD_ROOT 85popd 86 87%clean 88[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 89 90%files 91%defattr(-,root,root) 92%{_prefix}/bin/%{AppProgram} 93%{_prefix}/bin/%{UseProgram} 94%{_mandir}/man1/%{AppProgram}.* 95 96%files -n btyacc 97%defattr(-,root,root) 98%{_prefix}/bin/%{AltProgram} 99%{_mandir}/man1/%{AltProgram}.* 100 101%changelog 102# each patch should add its ChangeLog entries here 103 104* Fri May 25 2018 Thomas Dickey 105- add btyacc package 106 107* Sun Jul 09 2017 Thomas Dickey 108- use predefined "configure" 109 110* Sun Jun 06 2010 Thomas Dickey 111- initial version 112