File ghc-morte.spec of Package ghc-morte

#
# spec file for package ghc-morte
#
# Copyright (c) 2017 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/
#


%global pkg_name morte
%bcond_with tests
Name:           ghc-%{pkg_name}
Version:        1.6.9
Release:        0
Summary:        A bare-bones calculus of constructions
License:        BSD-3-Clause
Group:          Development/Languages/Other
Url:            https://hackage.haskell.org/package/%{pkg_name}
Source0:        https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires:  alex
BuildRequires:  chrpath
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-Earley-devel
BuildRequires:  ghc-array-devel
BuildRequires:  ghc-binary-devel
BuildRequires:  ghc-code-page-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-http-client-devel
BuildRequires:  ghc-http-client-tls-devel
BuildRequires:  ghc-microlens-devel
BuildRequires:  ghc-microlens-mtl-devel
BuildRequires:  ghc-optparse-applicative-devel
BuildRequires:  ghc-pipes-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  ghc-system-fileio-devel
BuildRequires:  ghc-system-filepath-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-text-format-devel
BuildRequires:  ghc-transformers-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires:  ghc-QuickCheck-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-tasty-devel
BuildRequires:  ghc-tasty-hunit-devel
BuildRequires:  ghc-tasty-quickcheck-devel
%endif

%description
Morte is a typed, purely functional, and strongly normalizing intermediate
language designed for whole-program super-optimization. Use this library to
type-check, optimize, parse, pretty-print, serialize and deserialize
expressions in this intermediate language.

This library also installs an executable that you can use to type-check and
optimize a 'morte' program.

"Morte.Core" contains the core calculus of constructions for this language

"Morte.Lexer" contains the 'alex'-generated lexer for Morte

"Morte.Parser" contains the parser for Morte

Read "Morte.Tutorial" to learn how to use this library.

%package devel
Summary:        Haskell %{pkg_name} library development files
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
Requires:       ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}

%description devel
This package provides the Haskell %{pkg_name} library development files.

%prep
%setup -q -n %{pkg_name}-%{version}

%build
%ghc_lib_build

%install
%ghc_lib_install
%ghc_fix_rpath %{pkg_name}-%{version}

%check
%cabal_test

%post devel
%ghc_pkg_recache

%postun devel
%ghc_pkg_recache

%files -f %{name}.files
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/%{pkg_name}
%dir %{_datadir}/%{pkg_name}-%{version}
%dir %{_datadir}/%{pkg_name}-%{version}/bench
%dir %{_datadir}/%{pkg_name}-%{version}/bench/src
%dir %{_datadir}/%{pkg_name}-%{version}/test
%dir %{_datadir}/%{pkg_name}-%{version}/test/src
%{_datadir}/%{pkg_name}-%{version}/bench/src/*.mt
%{_datadir}/%{pkg_name}-%{version}/test/src/*.mt

%files devel -f %{name}-devel.files
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by