diff --git a/bison-3.8.2.tar.xz b/bison-3.8.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..508b4a78e162c90fa0ee6346778476c285c9b764 Binary files /dev/null and b/bison-3.8.2.tar.xz differ diff --git a/bison.spec b/bison.spec new file mode 100644 index 0000000000000000000000000000000000000000..1659b5ae60a37916fa3fcdc7fd9002e898621e40 --- /dev/null +++ b/bison.spec @@ -0,0 +1,140 @@ +%define anolis_release 1 + +Summary: A GNU general-purpose parser generator +Name: bison +Version: 3.8.2 +Release: %{anolis_release}%{?dist} +License: GPLv3+ +Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz + +# testsuite dependency +BuildRequires: gcc-c++ +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: gettext-devel +BuildRequires: flex +BuildRequires: gnupg2 + +URL: http://www.gnu.org/software/%{name}/ +BuildRequires: m4 >= 1.4 +BuildRequires: make +#java-1.7.0-openjdk-devel +Requires: m4 >= 1.4 + +# bison contains a copy of gnulib. As a copylib, gnulib was granted +# an exception that allows bundling it with other software. For +# details, see: +# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Exceptions +Provides: bundled(gnulib) + +%description +Bison is a general purpose parser generator that converts a grammar +description for an LALR(1) context-free grammar into a C program to +parse that grammar. Bison can be used to develop a wide range of +language parsers, from ones used in simple desk calculators to complex +programming languages. Bison is upwardly compatible with Yacc, so any +correctly written Yacc grammar should work with Bison without any +changes. If you know Yacc, you shouldn't have any trouble using +Bison. You do need to be very proficient in C programming to be able +to use Bison. Bison is only needed on systems that are used for +development. + +If your system will be used for C development, you should install +Bison. + +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Doc pages for %{name}. + +%package devel +Summary: -ly library for development using Bison-generated parsers +Provides: bison-static = %{version}-%{release} + +%description devel +The bison-devel package contains the -ly library sometimes used by +programs using Bison-generated parsers. If you are developing programs +using Bison, you might want to link with this library. This library +is not required by all Bison-generated parsers, but may be employed by +simple programs to supply minimal support for the generated parsers. + +# -ly is kept static. It only contains two symbols: main and yyerror, +# and both of these are extremely simple (couple lines of C total). +# It doesn't really pay off to introduce a shared library for that. +# +# Therefore -devel subpackage could have been created as -static, but +# the split was done in Jan 2005, which predates current guidelines. +# Besides there is logic to that: the library is devel in the sense +# that the generated parser could be distributed together with other +# sources, and only bison-devel would be necessary to wrap the build. + +%package runtime +Summary: Runtime support files used by Bison-generated parsers +BuildArch: noarch + +%description runtime +The bison-runtime package contains files used at runtime by parsers +that Bison generates. Packages whose binaries contain parsers +generated by Bison should depend on bison-runtime to ensure that +these files are available. See the Internationalization in the +Bison manual section for more information. + +%prep +%autosetup + +# for later used in devel packages +cp -fr examples devel-examples + +%build +autoreconf -fi +%configure +%make_build + +%check +%make_build check + +%install +%make_install + +# Remove unpackaged files. +rm -f %{buildroot}/%{_bindir}/yacc +rm -f %{buildroot}/%{_infodir}/dir +rm -f %{buildroot}/%{_mandir}/man1/yacc* +rm -rf %{buildroot}/%{_docdir}/%{name} + +# Move back original examples dir +rm -fr examples +mv devel-examples examples + +%find_lang %{name} +%find_lang %{name}-runtime +%find_lang %{name}-gnulib + +# The distribution contains also source files. These are used by m4 +# when the target parser file is generated. +%files -f %{name}.lang -f %{name}-gnulib.lang +%license COPYING +%{_mandir}/*/bison* +%{_datadir}/bison +%{_infodir}/bison.info* +%{_bindir}/bison +%{_datadir}/aclocal/bison*.m4 + +%files doc +%doc AUTHORS ChangeLog NEWS README THANKS TODO + +%files -f %{name}-runtime.lang runtime +%license COPYING + +%files devel +%license COPYING +%doc examples +%{_libdir}/liby.a + +%changelog +* Sun Jan 15 2023 Funda Wang - 3.8.2-1 +- Import package for anolis 23