LFS-RPM/SPECS/bison.spec

91 lines
2.4 KiB
RPMSpec
Raw Normal View History

2023-04-18 23:31:45 +08:00
%if %{!?insinfo:1}%{?insinfo:0}
%global insinfo /sbin/install-info
%endif
Name: bison
Version: 3.8.2
Release: %{?repo}0.rc1%{?dist}
Summary: general purpose parser generator
Group: Development/Languages
License: GPLv3
URL: https://www.gnu.org/software/bison/
Source0: https://ftp.gnu.org/gnu/bison/bison-%{version}.tar.xz
#BuildRequires:
Requires(post): %{insinfo}
Requires(postun): %{insinfo}
%description
Bison is a general-purpose parser generator that converts an annotated
context-free grammar into a deterministic LR or generalized LR (GLR)
parser employing LALR(1) parser tables. As an experimental feature,
Bison can also generate IELR(1) or canonical LR(1) parser tables. Once
you are proficient with Bison, you can use it to develop a wide range
of language parsers, from those used in simple desk calculators to
complex programming languages.
%package runtime
Group: System Environment/Libraries
Summary: Bison runtime files
2023-04-18 23:42:46 +08:00
BuildArch: noarch
2023-04-18 23:31:45 +08:00
%description runtime
This package contains the bison runtime files that are needed by any
package that uses parsers generated by GNU bison.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
2023-04-18 23:42:46 +08:00
%check
%if 0%{?runtests:1} == 1
make check > %{name}-make.check.log 2>&1
%else
echo "make check not run during packaging" > %{name}-make.check.log
%endif
2023-04-18 23:31:45 +08:00
%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_datadir}/doc/bison
%find_lang bison
%find_lang bison-gnulib
cat bison-gnulib.lang >> bison.lang
%find_lang bison-runtime
2023-04-18 23:42:46 +08:00
%post
%{insinfo} %{_infodir}/bison.info %{_infodir}/dir ||:
%preun
if [ $1 = 0 ]; then
%{insinfo} --delete %{_infodir}/bison.info %{_infodir}/dir ||:
fi
2023-04-18 23:31:45 +08:00
%files -f bison.lang
%defattr(-,root,root,-)
%attr(0755,root,root) %{_bindir}/bison
%attr(0755,root,root) %{_bindir}/yacc
%attr(0644,root,root) %{_libdir}/liby.a
%{_datadir}/bison
%attr(0644,root,root) %{_datadir}/aclocal/bison-i18n.m4
%exclude %{_infodir}/dir
%attr(0644,root,root) %{_infodir}/bison.info*
%attr(0644,root,root) %{_mandir}/man1/bison.1*
%attr(0644,root,root) %{_mandir}/man1/yacc.1*
%license COPYING
2023-04-18 23:42:46 +08:00
%doc %{name}-make.check.log
2023-04-18 23:31:45 +08:00
%doc AUTHORS COPYING NEWS README THANKS TODO examples
%files runtime -f bison-runtime.lang
%defattr(-,root,root,-)
%license COPYING
%doc COPYING
%changelog
* Tue Apr 18 2023 Michael A. Peters <anymouseprophet@gmail.com> - 3.8.2-0.rc1
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)