File stack.spec of Package stack
#
# spec file for package stack
#
# 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/
#
%global pkg_name stack
%bcond_with tests
Name: stack
Version: 1.1.2
Release: 0
Summary: The Haskell Tool Stack
License: BSD-3-Clause
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{name}
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires: chrpath
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-ansi-terminal-devel
BuildRequires: ghc-async-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-base-compat-devel
BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-base64-bytestring-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-binary-tagged-devel
BuildRequires: ghc-blaze-builder-devel
BuildRequires: ghc-byteable-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-conduit-devel
BuildRequires: ghc-conduit-extra-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-cryptohash-conduit-devel
BuildRequires: ghc-cryptohash-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-edit-distance-devel
BuildRequires: ghc-either-devel
BuildRequires: ghc-enclosed-exceptions-devel
BuildRequires: ghc-errors-devel
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-extra-devel
BuildRequires: ghc-fast-logger-devel
BuildRequires: ghc-filelock-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-fsnotify-devel
BuildRequires: ghc-generic-deriving-devel
BuildRequires: ghc-gitrev-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-hastache-devel
BuildRequires: ghc-hit-devel
BuildRequires: ghc-hpack-devel
BuildRequires: ghc-hpc-devel
BuildRequires: ghc-http-client-devel
BuildRequires: ghc-http-client-tls-devel
BuildRequires: ghc-http-conduit-devel
BuildRequires: ghc-http-types-devel
BuildRequires: ghc-lifted-base-devel
BuildRequires: ghc-microlens-devel
BuildRequires: ghc-monad-control-devel
BuildRequires: ghc-monad-logger-devel
BuildRequires: ghc-monad-unlift-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-open-browser-devel
BuildRequires: ghc-optparse-applicative-devel
BuildRequires: ghc-optparse-simple-devel
BuildRequires: ghc-path-devel
BuildRequires: ghc-path-io-devel
BuildRequires: ghc-persistent-devel
BuildRequires: ghc-persistent-sqlite-devel
BuildRequires: ghc-persistent-template-devel
BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-project-template-devel
BuildRequires: ghc-regex-applicative-text-devel
BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-retry-devel
BuildRequires: ghc-safe-devel
BuildRequires: ghc-semigroups-devel
BuildRequires: ghc-split-devel
BuildRequires: ghc-stm-devel
BuildRequires: ghc-streaming-commons-devel
BuildRequires: ghc-tar-devel
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-temporary-devel
BuildRequires: ghc-text-binary-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-tls-devel
BuildRequires: ghc-transformers-base-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-unix-compat-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-binary-instances-devel
BuildRequires: ghc-vector-devel
BuildRequires: ghc-yaml-devel
BuildRequires: ghc-zip-archive-devel
BuildRequires: ghc-zlib-devel
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-hspec-devel
%endif
# End cabal-rpm deps
Suggests: docker
%description
Please see the README.md for usage information, and the wiki on Github for more
details. Also, note that the API for the library is not currently stable, and
may change significantly, even between minor releases. It is currently only
intended for use by the executable.
%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/Other
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
Requires: ghc-%{name} = %{version}-%{release}
%description -n ghc-%{name}-devel
This package provides the Haskell %{name} library development files.
%prep
%setup -q
cabal-tweak-flag disable-git-info True
cabal-tweak-dep-ver generic-deriving '<1.10' '<1.11'
cabal-tweak-dep-ver monad-unlift '<0.2' '<0.3'
%build
%ghc_lib_build
%install
%ghc_lib_install
%ghc_fix_dynamic_rpath %{pkg_name}
%check
%if %{with tests}
%cabal test
%endif
%post -n ghc-%{name}-devel
%ghc_pkg_recache
%postun -n ghc-%{name}-devel
%ghc_pkg_recache
%files
%defattr(-,root,root,-)
%doc LICENSE
%doc README.md ChangeLog.md
%{_bindir}/%{name}
%files -n ghc-%{name} -f ghc-%{name}.files
%defattr(-,root,root,-)
%doc LICENSE
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%defattr(-,root,root,-)
%doc README.md CONTRIBUTING.md
%changelog