3 %bcond_without prof # profiling library
5 %define pkgname MonadCatchIO-transformers
6 Summary: Monad-transformer compatible version of the Control.Exception module
7 Summary(pl.UTF-8): Wersja modułu Control.Exception zgodna z transformatorami monad
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/MonadCatchIO-transformers
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 3b54254de4a192fdbdea06d2950cac8d
16 URL: http://hackage.haskell.org/package/MonadCatchIO-transformers
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base < 4.8
19 BuildRequires: ghc-extensible-exceptions >= 0.1
20 BuildRequires: ghc-extensible-exceptions < 0.2
21 BuildRequires: ghc-monads-tf >= 0.1
22 BuildRequires: ghc-monads-tf < 0.2
23 BuildRequires: ghc-transformers >= 0.2
24 BuildRequires: ghc-transformers < 0.4
26 BuildRequires: ghc-prof >= 6.12.3
27 BuildRequires: ghc-base-prof < 4.8
28 BuildRequires: ghc-extensible-exceptions-prof >= 0.1
29 BuildRequires: ghc-extensible-exceptions-prof < 0.2
30 BuildRequires: ghc-monads-tf-prof >= 0.1
31 BuildRequires: ghc-monads-tf-prof < 0.2
32 BuildRequires: ghc-transformers-prof >= 0.2
33 BuildRequires: ghc-transformers-prof < 0.4
35 BuildRequires: rpmbuild(macros) >= 1.608
37 Requires(post,postun): /usr/bin/ghc-pkg
38 Requires: ghc-base < 4.8
39 Requires: ghc-extensible-exceptions >= 0.1
40 Requires: ghc-extensible-exceptions < 0.2
41 Requires: ghc-monads-tf >= 0.1
42 Requires: ghc-monads-tf < 0.2
43 Requires: ghc-transformers >= 0.2
44 Requires: ghc-transformers < 0.4
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 # debuginfo is not useful for ghc
48 %define _enable_debug_packages 0
50 # don't compress haddoc files
51 %define _noautocompressdoc *.haddock
54 Provides functions to throw and catch exceptions. Unlike the functions
55 from Control.Exception, which work in IO, these work in any stack of
56 monad transformers (from the transformers package) with IO as the base
57 monad. You can extend this functionality to other monads, by creating
58 an instance of the MonadCatchIO class.
60 %description -l pl.UTF-8
61 Ten pakiet dostarcza funkcje do rzucania i przechwytywania wyjątków. W
62 przeciwieństwie do funkcji z Control.Exceptions, działających w IO, te
63 działają w dowolnym stosie transformatorów monad (z pakietu
64 transformers) z IO jako podstawową monadą. Można rozszerzać tę
65 funkcjonalność na inne monady poprzez tworzenie instancji klasy
69 Summary: Profiling %{pkgname} library for GHC
70 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
73 Requires: ghc-base-prof < 4.8
74 Requires: ghc-extensible-exceptions-prof >= 0.1
75 Requires: ghc-extensible-exceptions-prof < 0.2
76 Requires: ghc-monads-tf-prof >= 0.1
77 Requires: ghc-monads-tf-prof < 0.2
78 Requires: ghc-transformers-prof >= 0.2
79 Requires: ghc-transformers-prof < 0.4
82 Profiling %{pkgname} library for GHC. Should be installed when
83 GHC's profiling subsystem is needed.
85 %description prof -l pl.UTF-8
86 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
87 kiedy potrzebujemy systemu profilującego z GHC.
90 %setup -q -n %{pkgname}-%{version}
93 runhaskell Setup.hs configure -v2 \
94 %{?with_prof:--enable-library-profiling} \
97 --libexecdir=%{_libexecdir} \
98 --docdir=%{_docdir}/%{name}-%{version}
100 runhaskell Setup.hs build
101 runhaskell Setup.hs haddock --executables
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
107 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
109 # work around automatic haddock docs installation
110 %{__rm} -rf %{name}-%{version}-doc
111 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
112 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
114 runhaskell Setup.hs register \
115 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
118 rm -rf $RPM_BUILD_ROOT
127 %defattr(644,root,root,755)
128 %doc %{name}-%{version}-doc/*
129 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSMonadCatchIO-transformers-%{version}.o
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSMonadCatchIO-transformers-%{version}.a
133 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
134 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/CatchIO.hi
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/CatchIO
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/CatchIO/*.hi
140 %defattr(644,root,root,755)
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSMonadCatchIO-transformers-%{version}_p.a
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/CatchIO.p_hi
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/CatchIO/*.p_hi