X-Git-Url: http://git.pld-linux.org/?p=packages%2Fbison.git;a=blobdiff_plain;f=bison.spec;h=2a6437795ff86724b7be2171bd3035abc25efd44;hp=6b96b3ca1d2edbd44cd2aa40a8ec9b6e54a3a30a;hb=HEAD;hpb=3cea69ce3a3e2d2ef6f8113709aaa62318ced014 diff --git a/bison.spec b/bison.spec index 6b96b3c..63686cd 100644 --- a/bison.spec +++ b/bison.spec @@ -1,3 +1,7 @@ +# +# Conditional build: +%bcond_without libtextstyle # libtextstyle support + Summary: A GNU general-purpose parser generator Summary(de.UTF-8): GNU-Parser-Generator Summary(es.UTF-8): Generador de parser de la GNU @@ -8,28 +12,33 @@ Summary(ru.UTF-8): Bison - генератор парсеров GNU Summary(tr.UTF-8): GNU ayrıştırıcı üreticisi Summary(uk.UTF-8): Bison - генератор парсерів GNU Name: bison -Version: 3.0.3 +Version: 3.8.2 Release: 1 License: GPL v3+ Group: Development/Tools -Source0: http://ftp.gnu.org/gnu/bison/%{name}-%{version}.tar.xz -# Source0-md5: 673effdf277cd49304fc62dd0ddd2faf +Source0: https://ftp.gnu.org/gnu/bison/%{name}-%{version}.tar.lz +# Source0-md5: 26e76218c2a50a0dd307286d42eb0af9 Source1: %{name}.1.pl Patch0: %{name}-info.patch -URL: http://gnu.org/software/bison/ -BuildRequires: automake >= 1:1.11.1 +Patch1: no_libtextstyle.patch +URL: http://www.gnu.org/software/bison/ BuildRequires: flex -BuildRequires: gettext-tools >= 0.18 +BuildRequires: gcc >= 5:3.2 +BuildRequires: gettext-tools >= 0.19 +BuildRequires: help2man +%{?with_libtextstyle:BuildRequires: libtextstyle-devel >= 0.20.5} +BuildRequires: libxslt-progs +BuildRequires: lzip BuildRequires: m4 >= 1.4.6 +# find_lang -a +BuildRequires: rpmbuild(find_lang) >= 1.31 BuildRequires: tar >= 1:1.22 BuildRequires: texinfo >= 4.0 -BuildRequires: xz Requires: %{name}-runtime = %{version}-%{release} +%{?with_libtextstyle:Requires: libtextstyle >= 0.20.5} Requires: m4 >= 1.4.6 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define pkgdatadir %{_datadir}/bison - %description Bison is a general purpose parser generator which converts a grammar description for an LALR context-free grammar into a C program to parse @@ -102,29 +111,42 @@ zawierajacych parsery wygenerowane przez bisona. %prep %setup -q %patch0 -p1 +%{!?with_libtextstyle:%patch1 -p1} %{__rm} po/stamp-po %build -cp -f /usr/share/automake/config.sub config +%{__aclocal} -I m4 +%{__autoconf} +%{__autoheader} +%{__automake} %configure \ --disable-silent-rules -%{__make} \ - pkgdatadir=%{pkgdatadir} +%{__make} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_mandir}/pl/man1 %{__make} install \ - DESTDIR=$RPM_BUILD_ROOT \ - pkgdatadir=%{pkgdatadir} + DESTDIR=$RPM_BUILD_ROOT install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/bison.1 +# provided by byacc (bison is not 100% compatible) +%{__rm} $RPM_BUILD_ROOT{%{_bindir}/yacc,%{_mandir}/man1/yacc.1} + +install -d $RPM_BUILD_ROOT%{_examplesdir} +%{__mv} $RPM_BUILD_ROOT%{_docdir}/bison/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +# the rest is packaged as %doc +%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/bison + %find_lang %{name} +%find_lang %{name}-gnulib -a %{name}.lang %find_lang %{name}-runtime +rm -f $RPM_BUILD_ROOT%{_infodir}/dir + %clean rm -rf $RPM_BUILD_ROOT @@ -138,14 +160,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc AUTHORS ChangeLog NEWS README THANKS TODO %attr(755,root,root) %{_bindir}/bison -# would conflict with byacc (but is not 100% compatible) -#%attr(755,root,root) %{_bindir}/yacc -%{pkgdatadir} %{_libdir}/liby.a +%{_datadir}/bison %{_aclocaldir}/bison-i18n.m4 %{_mandir}/man1/bison.1* %lang(pl) %{_mandir}/pl/man1/bison.1* %{_infodir}/bison.info* +%{_examplesdir}/%{name}-%{version} %files runtime -f %{name}-runtime.lang %defattr(644,root,root,755)