]>
Commit | Line | Data |
---|---|---|
13bf73b1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
7c0d306a JP |
5 | %define pkgname extensible-exceptions |
6 | Summary: Extensible exceptions | |
13bf73b1 | 7 | Summary(pl.UTF-8): Rozszerzalne wyjątki |
7c0d306a JP |
8 | Name: ghc-%{pkgname} |
9 | Version: 0.1.1.4 | |
824bb2cf | 10 | Release: 3 |
7c0d306a JP |
11 | License: BSD |
12 | Group: Development/Languages | |
13bf73b1 JB |
13 | #SourceDownload: http://hackage.haskell.org/package/extensible-exceptions |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
7c0d306a | 15 | # Source0-md5: fa1cadd15c1c7aa362618d41c6e17d8b |
13bf73b1 | 16 | URL: http://hackage.haskell.org/package/extensible-exceptions |
7c0d306a | 17 | BuildRequires: ghc >= 6.12.3 |
1d95ac34 JB |
18 | BuildRequires: ghc-base < 5 |
19 | %if %{with prof} | |
20 | BuildRequires: ghc-prof >= 6.12.3 | |
21 | BuildRequires: ghc-base-prof < 5 | |
22 | %endif | |
7c0d306a JP |
23 | BuildRequires: rpmbuild(macros) >= 1.608 |
24 | %requires_eq ghc | |
1d95ac34 | 25 | Requires: ghc-base < 5 |
7c0d306a JP |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | # debuginfo is not useful for ghc | |
29 | %define _enable_debug_packages 0 | |
30 | ||
1d95ac34 JB |
31 | # don't compress haddock files |
32 | %define _noautocompressdoc *.haddock | |
33 | ||
7c0d306a JP |
34 | %description |
35 | This package provides extensible exceptions for both new and old | |
36 | versions of GHC (i.e., < 6.10). | |
37 | ||
13bf73b1 JB |
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. | |
41 | ||
45a51a71 JR |
42 | %package prof |
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} | |
1d95ac34 | 47 | Requires: ghc-base-prof < 5 |
45a51a71 JR |
48 | |
49 | %description prof | |
50 | Profiling %{pkgname} library for GHC. Should be installed when | |
51 | GHC's profiling subsystem is needed. | |
52 | ||
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. | |
56 | ||
7c0d306a | 57 | %package doc |
13bf73b1 JB |
58 | Summary: HTML documentation for ghc %{pkgname} package |
59 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
7c0d306a JP |
60 | Group: Documentation |
61 | ||
62 | %description doc | |
13bf73b1 | 63 | HTML documentation for ghc %{pkgname} package. |
7c0d306a JP |
64 | |
65 | %description doc -l pl.UTF-8 | |
13bf73b1 | 66 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. |
7c0d306a JP |
67 | |
68 | %prep | |
69 | %setup -q -n %{pkgname}-%{version} | |
70 | ||
71 | %build | |
13bf73b1 JB |
72 | runhaskell Setup.hs configure -v2 \ |
73 | %{?with_prof:--enable-library-profiling} \ | |
7c0d306a JP |
74 | --prefix=%{_prefix} \ |
75 | --libdir=%{_libdir} \ | |
76 | --libexecdir=%{_libexecdir} \ | |
77 | --docdir=%{_docdir}/%{name}-%{version} | |
78 | ||
79 | runhaskell Setup.hs build | |
80 | runhaskell Setup.hs haddock --executables | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
85 | ||
86 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
87 | ||
88 | # work around automatic haddock docs installation | |
53298565 | 89 | %{__rm} -rf %{name}-%{version}-doc |
7c0d306a JP |
90 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
91 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
92 | ||
93 | runhaskell Setup.hs register \ | |
13bf73b1 | 94 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
7c0d306a JP |
95 | |
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %post | |
100 | %ghc_pkg_recache | |
101 | ||
102 | %postun | |
103 | %ghc_pkg_recache | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
45a51a71 | 108 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
824bb2cf JR |
109 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}-*.so |
110 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}-*.a | |
111 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}-*_p.a | |
45a51a71 JR |
112 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control |
113 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception | |
114 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.hi | |
824bb2cf | 115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.dyn_hi |
45a51a71 | 116 | |
13bf73b1 | 117 | %if %{with prof} |
45a51a71 JR |
118 | %files prof |
119 | %defattr(644,root,root,755) | |
824bb2cf | 120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextensible-exceptions-%{version}-*_p.a |
45a51a71 | 121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.p_hi |
13bf73b1 | 122 | %endif |
7c0d306a JP |
123 | |
124 | %files doc | |
125 | %defattr(644,root,root,755) | |
126 | %doc %{name}-%{version}-doc/* |