3 %bcond_without prof # profiling library
6 Summary: errors: Simplified error-handling
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/errors
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 43bec23a661dd4a5eefb5549b4fad8a8
15 URL: http://hackage.haskell.org/package/errors
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-safe >= 0.3.3
18 BuildRequires: ghc-transformers >= 0.2
19 BuildRequires: ghc-transformers-compat >= 0.4
21 BuildRequires: ghc-prof
22 BuildRequires: ghc-safe-prof >= 0.3.3
23 BuildRequires: ghc-transformers-prof >= 0.2
24 BuildRequires: ghc-transformers-compat-prof >= 0.4
26 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires(post,postun): /usr/bin/ghc-pkg
29 Requires: ghc-safe >= 0.3.3
30 Requires: ghc-transformers >= 0.2
31 Requires: ghc-transformers-compat >= 0.4
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 # debuginfo is not useful for ghc
35 %define _enable_debug_packages 0
37 # don't compress haddock files
38 %define _noautocompressdoc *.haddock
41 The one-stop shop for all your error-handling needs!
42 Just import Control.Error.
44 This library encourages an error-handling style that directly uses
45 the type system, rather than out-of-band exceptions.
48 Summary: Profiling %{pkgname} library for GHC
49 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
52 Requires: ghc-safe-prof >= 0.3.3
53 Requires: ghc-transformers-prof >= 0.2
54 Requires: ghc-transformers-compat-prof >= 0.4
57 Profiling %{pkgname} library for GHC. Should be installed when
58 GHC's profiling subsystem is needed.
60 %description prof -l pl.UTF-8
61 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
62 kiedy potrzebujemy systemu profilującego z GHC.
65 %setup -q -n %{pkgname}-%{version}
68 runhaskell Setup.hs configure -v2 \
69 %{?with_prof:--enable-library-profiling} \
72 --libexecdir=%{_libexecdir} \
73 --docdir=%{_docdir}/%{name}-%{version}
75 runhaskell Setup.hs build
76 runhaskell Setup.hs haddock --executables
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
82 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
84 # work around automatic haddock docs installation
85 %{__rm} -rf %{name}-%{version}-doc
86 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
87 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
89 runhaskell Setup.hs register \
90 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
93 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc CHANGELOG.md %{name}-%{version}-doc/*
104 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
108 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.hi
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.dyn_hi
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.hi
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.dyn_hi
116 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
122 %defattr(644,root,root,755)
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/*.p_hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Error/*.p_hi
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi