3 %bcond_without prof # profiling library
5 %define pkgname extensible-exceptions
6 Summary: Extensible exceptions
7 Summary(pl.UTF-8): Rozszerzalne wyjątki
12 Group: Development/Languages
13 #SourceDownload: http://hackage.haskell.org/package/extensible-exceptions
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: fa1cadd15c1c7aa362618d41c6e17d8b
16 URL: http://hackage.haskell.org/package/extensible-exceptions
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-prof >= 6.12.3
21 BuildRequires: ghc-base-prof < 5
23 BuildRequires: rpmbuild(macros) >= 1.608
25 Requires: ghc-base < 5
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 # debuginfo is not useful for ghc
29 %define _enable_debug_packages 0
31 # don't compress haddock files
32 %define _noautocompressdoc *.haddock
35 This package provides extensible exceptions for both new and old
36 versions of GHC (i.e., < 6.10).
38 %description -l pl.UTF-8
39 Ten pakiet udostępnia rozszerzalne wyjątki, zarówno dla nowych, jak i
40 starych (tj. < 6.10) wersji GHC.
43 Summary: Profiling %{pkgname} library for GHC
44 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
47 Requires: ghc-base-prof < 5
50 Profiling %{pkgname} library for GHC. Should be installed when
51 GHC's profiling subsystem is needed.
53 %description prof -l pl.UTF-8
54 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
55 kiedy potrzebujemy systemu profilującego z GHC.
58 Summary: HTML documentation for ghc %{pkgname} package
59 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
63 HTML documentation for ghc %{pkgname} package.
65 %description doc -l pl.UTF-8
66 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
69 %setup -q -n %{pkgname}-%{version}
72 runhaskell Setup.hs configure -v2 \
73 %{?with_prof:--enable-library-profiling} \
76 --libexecdir=%{_libexecdir} \
77 --docdir=%{_docdir}/%{name}-%{version}
79 runhaskell Setup.hs build
80 runhaskell Setup.hs haddock --executables
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
86 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
88 # work around automatic haddock docs installation
89 %{__rm} -rf %{name}-%{version}-doc
90 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
91 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
93 runhaskell Setup.hs register \
94 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
97 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSextensible-exceptions-%{version}.o
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}.a
111 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.hi
117 %defattr(644,root,root,755)
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}_p.a
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.p_hi
123 %defattr(644,root,root,755)
124 %doc %{name}-%{version}-doc/*