3 %bcond_without prof # profiling library
5 %define pkgname safe-exceptions
6 Summary: Safe, consistent, and easy exception handling
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/safe-exceptions
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: a1ef100de8fcb54a3d7b5564fa295f1a
15 Patch0: ghc-8.10.patch
16 URL: http://hackage.haskell.org/package/safe-exceptions
17 BuildRequires: ghc >= 6.12.3
19 BuildRequires: ghc-prof
21 BuildRequires: rpmbuild(macros) >= 1.608
23 Requires(post,postun): /usr/bin/ghc-pkg
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 # debuginfo is not useful for ghc
27 %define _enable_debug_packages 0
29 # don't compress haddock files
30 %define _noautocompressdoc *.haddock
33 Runtime exceptions - as exposed in base by the Control.Exception
34 module - have long been an intimidating part of the Haskell ecosystem.
35 This package, and this README for the package, are intended to
36 overcome this. It provides a safe and simple API on top of the
37 existing exception handling machinery. The API is equivalent to
38 the underlying implementation in terms of power but encourages best
39 practices to minimize the chances of getting the exception handling
40 wrong. By doing so and explaining the corner cases clearly, the hope
41 is to turn what was previously something scary into an aspect of
42 Haskell everyone feels safe using.
45 Summary: Profiling %{pkgname} library for GHC
46 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
51 Profiling %{pkgname} library for GHC. Should be installed when
52 GHC's profiling subsystem is needed.
54 %description prof -l pl.UTF-8
55 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
56 kiedy potrzebujemy systemu profilującego z GHC.
59 %setup -q -n %{pkgname}-%{version}
63 runhaskell Setup.hs configure -v2 \
64 %{?with_prof:--enable-library-profiling} \
67 --libexecdir=%{_libexecdir} \
68 --docdir=%{_docdir}/%{name}-%{version}
70 runhaskell Setup.hs build
71 runhaskell Setup.hs haddock --executables
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
77 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
79 # work around automatic haddock docs installation
80 %{__rm} -rf %{name}-%{version}-doc
81 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
82 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
84 runhaskell Setup.hs register \
85 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
88 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc COOKBOOK.md ChangeLog.md LICENSE README.md %{name}-%{version}-doc/html
99 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
100 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
103 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.hi
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.dyn_hi
112 %defattr(644,root,root,755)
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.p_hi