From bbae46efad7fbb09a67c4bb0e0277ca7aaf9a343 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 10 Aug 2024 00:07:36 +0800 Subject: [PATCH] Cleanup spec (cherry picked from commit 1e859e87c2dadf1fb95931a95e06fba3d5e6dffa) --- bison.spec | 52 +++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/bison.spec b/bison.spec index 27be889..4f119a5 100644 --- a/bison.spec +++ b/bison.spec @@ -1,16 +1,15 @@ Name: bison Version: 3.8.2 -Release: 2 +Release: 3 Summary: A GNU general-purpose parser generator -License: GPLv3+ -URL: http://www.gnu.org/software/bison/ +License: GPL-3.0-or-later AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND GPL-3.0-or-later WITH Bison-exception-2.2 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH Autoconf-exception-generic AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later AND FSFULLR AND GFDL-1.3-or-later AND X11 +URL: https://www.gnu.org/software/bison/ Source0: https://ftp.gnu.org/gnu/bison/bison-%{version}.tar.xz Patch1: backport-tests-make-it-easier-to-spot-failures.patch BuildRequires: gcc-c++ autoconf automake m4 flex -Requires(post): info -Requires(preun):info +Requires: m4 >= 1.4 Provides: bundled(gnulib) %description @@ -29,6 +28,7 @@ programming languages. Summary: -ly library for development using bison-generated parsers Requires: %{name} = %{version}-%{release} Provides: %{name}-static = %{version}-%{release} + %description devel This package contains libraries used by programs using bison-generated parsers. @@ -36,6 +36,8 @@ This package contains libraries used by programs using bison-generated parsers. Summary: Language files for bison. Requires: %{name} = %{version}-%{release} Provides: %{name}-runtime = %{version}-%{release} +Obsoletes: bison-runtime < %{version}-%{release} + %description lang This package contains language support files and locale. @@ -51,46 +53,38 @@ This package contains language support files and locale. %install %make_install -rm -rf %{buildroot}%{_infodir}/dir -gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/bison.info* -%post help -%install_info %{_infodir}/bison.info.gz +# Remove unpackaged files. +rm -f %{buildroot}/%{_bindir}/yacc +rm -f %{buildroot}/%{_infodir}/dir +rm -f %{buildroot}/%{_mandir}/man1/yacc* +rm -f %{buildroot}/%{_docdir}/%{name}/{AUTHORS,COPYING,NEWS,README,THANKS,TODO} -%preun help -if [ $1 = 0 ];then - %install_info_rm %{_infodir}/bison.info.gz -fi +%find_lang %{name} +%find_lang %{name}-runtime +%find_lang %{name}-gnulib -%files -%defattr(-,root,root) +%files -f %{name}.lang -f %{name}-gnulib.lang %license COPYING -%{_docdir}/%{name}/{AUTHORS,README} -%{_datadir}/aclocal/bison* +%{_datadir}/aclocal/bison*.m4 %{_datadir}/bison %{_bindir}/bison -%exclude %{_bindir}/yacc -%exclude %{_docdir}/%{name}/COPYING %files help -%defattr(-,root,root) -%exclude %{_mandir}/man1/yacc.1.gz -%{_docdir}/bison/{NEWS,THANKS,TODO} +%doc AUTHORS ChangeLog NEWS README THANKS TODO %{_mandir}/man1/* %{_infodir}/bison* %files devel -%defattr(-,root,root) %{_libdir}/liby.a -%{_docdir}/bison/examples/* +%{_docdir}/bison/examples -%files lang -%defattr(-,root,root) -%{_datadir}/locale/*/LC_MESSAGES/bison.mo -%{_datadir}/locale/*/LC_MESSAGES/bison-runtime.mo -%{_datadir}/locale/*/LC_MESSAGES/bison-gnulib.mo +%files lang -f %{name}-runtime.lang %changelog +* Fri Aug 09 2024 Funda Wang - 3.8.2-3 +- Cleanup spec + * Sat Oct 22 2022 yixiangzhike - 3.8.2-2 - Type:bugfix - ID:NA -- Gitee