File happy.spec of Package happy
#
# spec file for package happy
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# no useful debuginfo for Haskell packages without C sources
%global debug_package %{nil}
%bcond_without tests
Name: happy
Version: 1.19.5
Release: 0
Summary: The LALR(1) Parser Generator for Haskell
License: BSD-2-Clause
Group: Development/Languages/Other
Url: http://hackage.haskell.org/package/%{name}
Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: docbook-dtd
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fop
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-rpm-macros
BuildRequires: libxml2
BuildRequires: libxslt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Happy is a parser generator for Haskell. Given a grammar specification in BNF,
Happy generates Haskell code to parse the grammar. Happy works in a similar way
to the 'yacc' tool for C.
%prep
%setup -q
find ./examples/glr/ -type f -exec sed -i 's/\r//' {} +
%build
%{ghc_bin_build}
cd doc
autoreconf
%configure
make %{?_smp_mflags} html
%install
%{ghc_bin_install}
install -D --mode=444 doc/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%files
%defattr(-,root,root)
%doc ANNOUNCE
%doc CHANGES
%doc LICENSE
%doc README
%doc TODO
%doc doc/happy
%doc examples
%attr(755,root,root) %{_bindir}/%{name}
%{_datadir}/%{name}-%{version}
%{_mandir}/man1/*
%changelog