2012-11-17 17:31:15 +01:00
|
|
|
#
|
|
|
|
# spec file for package ghc-async
|
|
|
|
#
|
2020-09-04 17:10:01 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2012-11-17 17:31:15 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-10-18 11:47:06 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-11-17 17:31:15 +01:00
|
|
|
#
|
|
|
|
|
2013-08-01 14:20:40 +02:00
|
|
|
|
2012-11-17 17:31:15 +01:00
|
|
|
%global pkg_name async
|
2016-07-16 22:34:46 +02:00
|
|
|
%bcond_with tests
|
|
|
|
Name: ghc-%{pkg_name}
|
2019-06-11 16:10:45 +02:00
|
|
|
Version: 2.2.2
|
2013-08-01 14:20:40 +02:00
|
|
|
Release: 0
|
2014-11-06 20:14:21 +01:00
|
|
|
Summary: Run IO operations asynchronously and wait for their results
|
2012-11-17 17:31:15 +01:00
|
|
|
License: BSD-3-Clause
|
2017-08-15 15:53:18 +02:00
|
|
|
URL: https://hackage.haskell.org/package/%{pkg_name}
|
2016-07-16 22:34:46 +02:00
|
|
|
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
2020-09-04 17:10:01 +02:00
|
|
|
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
|
2012-11-17 17:31:15 +01:00
|
|
|
BuildRequires: ghc-Cabal-devel
|
2018-05-14 15:15:43 +02:00
|
|
|
BuildRequires: ghc-hashable-devel
|
2013-08-01 10:53:06 +02:00
|
|
|
BuildRequires: ghc-rpm-macros
|
2012-11-17 17:31:15 +01:00
|
|
|
BuildRequires: ghc-stm-devel
|
2016-07-16 22:34:46 +02:00
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: ghc-HUnit-devel
|
|
|
|
BuildRequires: ghc-test-framework-devel
|
|
|
|
BuildRequires: ghc-test-framework-hunit-devel
|
|
|
|
%endif
|
2012-11-17 17:31:15 +01:00
|
|
|
|
|
|
|
%description
|
2016-07-16 22:34:46 +02:00
|
|
|
This package provides a higher-level interface over threads, in which an 'Async
|
|
|
|
a' is a concurrent thread that will eventually deliver a value of type 'a'.
|
|
|
|
The package provides ways to create 'Async' computations, wait for their
|
2014-11-06 20:14:21 +01:00
|
|
|
results, and cancel them.
|
|
|
|
|
2016-07-16 22:34:46 +02:00
|
|
|
Using 'Async' is safer than using threads in two ways:
|
2014-11-06 20:14:21 +01:00
|
|
|
|
|
|
|
* When waiting for a thread to return a result, if the thread dies with an
|
|
|
|
exception then the caller must either re-throw the exception ('wait') or handle
|
|
|
|
it ('waitCatch'); the exception cannot be ignored.
|
|
|
|
|
|
|
|
* The API makes it possible to build a tree of threads that are automatically
|
|
|
|
killed when their parent dies (see 'withAsync').
|
|
|
|
|
2013-08-01 10:53:06 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Haskell %{pkg_name} library development files
|
2016-07-16 22:34:46 +02:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2014-11-06 20:14:21 +01:00
|
|
|
Requires: ghc-compiler = %{ghc_version}
|
|
|
|
Requires(post): ghc-compiler = %{ghc_version}
|
|
|
|
Requires(postun): ghc-compiler = %{ghc_version}
|
2013-08-01 10:53:06 +02:00
|
|
|
|
|
|
|
%description devel
|
2014-11-06 20:14:21 +01:00
|
|
|
This package provides the Haskell %{pkg_name} library development files.
|
|
|
|
|
2012-11-17 17:31:15 +01:00
|
|
|
%prep
|
2020-09-04 17:10:01 +02:00
|
|
|
%autosetup -n %{pkg_name}-%{version}
|
|
|
|
cp -p %{SOURCE1} %{pkg_name}.cabal
|
2012-11-17 17:31:15 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%ghc_lib_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%ghc_lib_install
|
|
|
|
|
2016-07-16 22:34:46 +02:00
|
|
|
%check
|
2016-07-22 23:40:44 +02:00
|
|
|
%cabal_test
|
2016-07-16 22:34:46 +02:00
|
|
|
|
2013-08-01 10:53:06 +02:00
|
|
|
%post devel
|
|
|
|
%ghc_pkg_recache
|
2012-11-17 17:31:15 +01:00
|
|
|
|
2013-08-01 10:53:06 +02:00
|
|
|
%postun devel
|
|
|
|
%ghc_pkg_recache
|
2012-11-17 17:31:15 +01:00
|
|
|
|
2013-08-01 10:53:06 +02:00
|
|
|
%files -f %{name}.files
|
2018-04-26 09:11:56 +02:00
|
|
|
%license LICENSE
|
2012-11-17 17:31:15 +01:00
|
|
|
|
2013-08-01 10:53:06 +02:00
|
|
|
%files devel -f %{name}-devel.files
|
2016-07-16 22:34:46 +02:00
|
|
|
%doc changelog.md
|
2012-11-17 17:31:15 +01:00
|
|
|
|
|
|
|
%changelog
|