File shake.spec of Package shake

#
# spec file for package shake
#
# 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 shake
%bcond_with tests
Name:           %{pkg_name}
Version:        0.15.11
Release:        0
Summary:        Build system library, like Make, but more accurate dependencies
License:        BSD-3-Clause
Group:          Development/Libraries/Haskell
URL:            https://hackage.haskell.org/package/%{name}
Source0:        https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-binary-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-deepseq-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-extra-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-hashable-devel
BuildRequires:  ghc-js-flot-devel
BuildRequires:  ghc-js-jquery-devel
BuildRequires:  ghc-primitive-devel
BuildRequires:  ghc-process-devel
BuildRequires:  ghc-random-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  ghc-time-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-unix-devel
BuildRequires:  ghc-unordered-containers-devel
BuildRequires:  ghc-utf8-string-devel
%if %{with tests}
BuildRequires:  ghc-QuickCheck-devel
%endif

%description
Shake is a Haskell library for writing build systems - designed as a
replacement for 'make'. See "Development.Shake" for an introduction, including
an example. Further examples are included in the Cabal tarball, under the
'Examples' directory. The homepage contains links to a user manual, an academic
paper and further information: <http://shakebuild.com>

To use Shake the user writes a Haskell program that imports
"Development.Shake", defines some build rules, and calls the
'Development.Shake.shakeArgs' function. Thanks to do notation and infix
operators, a simple Shake build system is not too dissimilar from a simple
Makefile. However, as build systems get more complex, Shake is able to take
advantage of the excellent abstraction facilities offered by Haskell and easily
support much larger projects. The Shake library provides all the standard
features available in other build systems, including automatic parallelism and
minimal rebuilds. Shake also provides more accurate dependency tracking,
including seamless support for generated files, and dependencies on system
information (e.g. compiler version).

%package -n ghc-%{name}
Summary:        Haskell %{name} library
Group:          System/Libraries

%description -n ghc-%{name}
This package provides the Haskell %{name} shared library.

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

%description -n ghc-%{name}-devel
This package provides the Haskell %{name} library development files.

%prep
%setup -q

%build
%ghc_lib_build

%install
%ghc_lib_install
rm -Rf %{buildroot}/%{_datadir}/%{name}-%{version}/docs

%check
%cabal_test

%post -n ghc-%{name}-devel
%ghc_pkg_recache

%postun -n ghc-%{name}-devel
%ghc_pkg_recache

%files
%doc LICENSE
%doc CHANGES.txt README.md docs
%{_bindir}/%{name}
%dir %{_datadir}/%{name}-%{version}
%dir %{_datadir}/%{name}-%{version}/html
%{_datadir}/%{name}-%{version}/html/viz.js
%{_datadir}/%{name}-%{version}/html/profile.html
%{_datadir}/%{name}-%{version}/html/progress.html
%{_datadir}/%{name}-%{version}/html/shake.js

%files -n ghc-%{name} -f ghc-%{name}.files
%doc LICENSE

%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%doc CHANGES.txt README.md docs

%changelog
openSUSE Build Service is sponsored by