+#
+# Conditional build:
+%bcond_with bootstrap # use foreign (non-rpm) ghc
+#
Summary: Yacc-like LALR(1) Parser Generator for Haskell
-Summary(pl): Generator parserów LALR(1) w stylu yacc-a dla Haskella
+Summary(pl.UTF-8): Generator parserów LALR(1) w stylu yacc-a dla Haskella
Name: happy
-Version: 1.11
-Release: 1
+Version: 1.15
+Release: 2
License: BSD w/o adv. clause
Group: Development/Languages
URL: http://haskell.org/happy/
Source0: http://haskell.org/happy/dist/%{version}/%{name}-%{version}-src.tar.gz
-# Source0-md5: 35fc40b31b6f97445ddd4493c3114ce9
-Patch0: %{name}-sgml-CATALOG.patch
-Patch1: %{name}-DESTDIR.patch
-Patch2: %{name}-ac.patch
+# Source0-md5: 02ceb122b904fa4a4290e6ea1072d59e
+Patch0: %{name}-arch.patch
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: ghc
+%{!?with_bootstrap:BuildRequires: ghc}
BuildRequires: gmp-devel
BuildRequires: jadetex
-BuildRequires: libelf
+BuildRequires: elfutils-libelf
BuildRequires: ncurses-devel
BuildRequires: openjade
BuildRequires: readline-devel
BuildRequires: sgml-common
+BuildRequires: tetex-dvips
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
of a grammar. Happy allows to have several Happy generated parsers in
one program.
-%description -l pl
-Happy jest generatorem parserów LALR(1) dla Haskella - podobnym do
-yacc-a dla C. Generuja parser w Haskellu ze specyfikacji gramatyki w
-notacji BNF. Happy pozwala mieæ wiele wygenerowanych parserów w jednym
+%description -l pl.UTF-8
+Happy jest generatorem parserów LALR(1) dla Haskella - podobnym do
+yacc-a dla C. Generuje parser w Haskellu ze specyfikacji gramatyki w
+notacji BNF. Happy pozwala mieć wiele wygenerowanych parserów w jednym
programie.
%prep
%setup -q
-#%patch0 -p1
-%patch1 -p1
-#%patch2 -p1
+%patch0 -p1
%build
-chmod u+w configure
-%{__aclocal}
+cp -f /usr/share/automake/config.sub .
%{__autoconf}
-chmod u+w configure
%configure \
- --with-gcc=%{__cc}
+ --with-gcc="%{__cc}"
%{__make} -C glafp-utils sgmlverb mkdirhier all
+%{__make} -C happy/src depend
%{__make} -C happy all
-%{__make} -C happy/doc html ps
+%{__make} -C happy/doc html
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/happy}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ bindir=$RPM_BUILD_ROOT%{_bindir} \
+ libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}
-install happy/examples/* $RPM_BUILD_ROOT%{_examplesdir}/happy/
+cp -a happy/examples/* $RPM_BUILD_ROOT%{_examplesdir}/happy/
sed -e 's,@LIBDIR@,%{_libdir}/%{name}-%{version},g' \
-e 's,@DOCDIR@,%{_docdir}/%{name}-%{version},g' \
%files
%defattr(644,root,root,755)
-%doc happy/README happy/doc/happy.ps happy/doc/happy/*
+%doc happy/README happy/doc/happy
%attr(755,root,root) %{_bindir}/*
%dir %{_libdir}/%{name}-%{version}
-%dir %{_libdir}/%{name}-%{version}/happy
%attr(755,root,root) %{_libdir}/%{name}-%{version}/happy.bin
-%{_libdir}/%{name}-%{version}/happy/*
+%{_libdir}/%{name}-%{version}/Happy*
+%{_libdir}/%{name}-%{version}/GLR*
%{_mandir}/man1/*
+%{_examplesdir}/%{name}