2012-05-03 09:57:52 +00:00
|
|
|
Summary: byacc - public domain Berkeley LALR Yacc parser generator
|
|
|
|
%define AppProgram byacc
|
2020-06-22 22:42:20 +00:00
|
|
|
%define AltProgram btyacc
|
|
|
|
%define AppVersion 20200330
|
2012-05-03 09:57:52 +00:00
|
|
|
%define UseProgram yacc
|
2020-06-22 22:42:20 +00:00
|
|
|
# $Id: byacc.spec,v 1.49 2020/03/30 23:31:42 tom Exp $
|
2012-05-03 09:57:52 +00:00
|
|
|
Name: %{AppProgram}
|
|
|
|
Version: %{AppVersion}
|
|
|
|
Release: 1
|
|
|
|
License: Public Domain, MIT
|
|
|
|
Group: Applications/Development
|
|
|
|
URL: ftp://invisible-island.net/%{AppProgram}
|
|
|
|
Source0: %{AppProgram}-%{AppVersion}.tgz
|
2020-06-22 22:42:20 +00:00
|
|
|
Packager: Thomas E. Dickey <dickey@invisible-island.net>
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides a parser generator utility that reads a grammar
|
|
|
|
specification from a file and generates an LR(1) parser for it. The
|
|
|
|
parsers consist of a set of LALR(1) parsing tables and a driver
|
|
|
|
routine written in the C programming language. It has a public domain
|
|
|
|
license which includes the generated C.
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
%package -n btyacc
|
|
|
|
Summary: Curses library with POSIX thread support.
|
|
|
|
|
|
|
|
%description -n btyacc
|
|
|
|
This package provides a parser generator utility that reads a grammar
|
|
|
|
specification from a file and generates an LR(1) parser for it. The
|
|
|
|
parsers consist of a set of LALR(1) parsing tables and a driver
|
|
|
|
routine written in the C programming language. It has a public domain
|
|
|
|
license which includes the generated C.
|
|
|
|
|
|
|
|
This package has the backtracking extension.
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
%prep
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
%setup -q -n %{AppProgram}-%{AppVersion}
|
|
|
|
|
|
|
|
%build
|
2020-06-22 22:42:20 +00:00
|
|
|
%define my_srcdir ..
|
|
|
|
%define CFG_OPTS \\\
|
|
|
|
--verbose \\\
|
|
|
|
--disable-echo \\\
|
|
|
|
--target %{_target_platform} \\\
|
|
|
|
--prefix=%{_prefix} \\\
|
|
|
|
--srcdir=%{my_srcdir} \\\
|
|
|
|
--bindir=%{_bindir} \\\
|
|
|
|
--libdir=%{_libdir} \\\
|
|
|
|
--mandir=%{_mandir}
|
|
|
|
|
|
|
|
%global _configure ../configure
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
mkdir BUILD-byacc
|
|
|
|
pushd BUILD-byacc
|
|
|
|
CONFIGURE_TOP=%{my_srcdir} \
|
|
|
|
%configure %{CFG_OPTS} \
|
|
|
|
--program-prefix=b \
|
|
|
|
--program-transform-name='s,\^,b,'
|
|
|
|
make
|
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
mkdir BUILD-btyacc
|
|
|
|
pushd BUILD-btyacc
|
|
|
|
CONFIGURE_TOP=%{my_srcdir} \
|
|
|
|
%configure %{CFG_OPTS} \
|
|
|
|
--enable-btyacc \
|
|
|
|
--program-prefix=bt \
|
|
|
|
--with-max-table-size=18000 \
|
|
|
|
--program-transform-name='s,\^,bt,'
|
2012-05-03 09:57:52 +00:00
|
|
|
make
|
2020-06-22 22:42:20 +00:00
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
pushd BUILD-byacc
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{AppProgram} %{UseProgram} )
|
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
pushd BUILD-btyacc
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/bin/%{AppProgram}
|
|
|
|
%{_prefix}/bin/%{UseProgram}
|
|
|
|
%{_mandir}/man1/%{AppProgram}.*
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
%files -n btyacc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/bin/%{AltProgram}
|
|
|
|
%{_mandir}/man1/%{AltProgram}.*
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
%changelog
|
|
|
|
# each patch should add its ChangeLog entries here
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
* Fri May 25 2018 Thomas Dickey
|
|
|
|
- add btyacc package
|
|
|
|
|
|
|
|
* Sun Jul 09 2017 Thomas Dickey
|
|
|
|
- use predefined "configure"
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
* Sun Jun 06 2010 Thomas Dickey
|
|
|
|
- initial version
|