]>
Commit | Line | Data |
---|---|---|
b5d13445 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname resourcet | |
6 | Summary: Deterministic allocation and freeing of scarce resources | |
7 | Summary(pl.UTF-8): Deterministyczne przydzielanie i zwalnianie brakujących zasobów | |
8 | Name: ghc-%{pkgname} | |
89e57032 | 9 | Version: 1.2.4 |
c60a6bf9 | 10 | Release: 2 |
b5d13445 JB |
11 | License: BSD |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/resourcet | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
89e57032 | 15 | # Source0-md5: ea8f630f0630639eef7546e7315eda5f |
b5d13445 JB |
16 | URL: http://hackage.haskell.org/package/resourcet |
17 | BuildRequires: ghc >= 6.12.3 | |
18 | BuildRequires: ghc-base >= 4.3 | |
b5d13445 | 19 | BuildRequires: ghc-containers |
89e57032 | 20 | BuildRequires: ghc-exceptions |
b5d13445 | 21 | BuildRequires: ghc-mtl >= 2.0 |
89e57032 | 22 | BuildRequires: ghc-primitive |
b5d13445 | 23 | BuildRequires: ghc-transformers >= 0.2.2 |
89e57032 | 24 | BuildRequires: ghc-unliftio-core |
b5d13445 JB |
25 | %if %{with prof} |
26 | BuildRequires: ghc-prof >= 6.12.3 | |
27 | BuildRequires: ghc-base-prof >= 4.3 | |
b5d13445 | 28 | BuildRequires: ghc-containers-prof |
89e57032 | 29 | BuildRequires: ghc-exceptions-prof |
b5d13445 | 30 | BuildRequires: ghc-mtl-prof >= 2.0 |
89e57032 | 31 | BuildRequires: ghc-primitive-prof |
b5d13445 | 32 | BuildRequires: ghc-transformers-prof >= 0.2.2 |
89e57032 | 33 | BuildRequires: ghc-unliftio-core-prof |
b5d13445 JB |
34 | %endif |
35 | BuildRequires: rpmbuild(macros) >= 1.608 | |
36 | Requires(post,postun): /usr/bin/ghc-pkg | |
37 | %requires_eq ghc | |
38 | Requires: ghc-base >= 4.3 | |
b5d13445 | 39 | Requires: ghc-containers |
89e57032 | 40 | Requires: ghc-exceptions |
b5d13445 | 41 | Requires: ghc-mtl >= 2.0 |
89e57032 | 42 | Requires: ghc-primitive |
b5d13445 | 43 | Requires: ghc-transformers >= 0.2.2 |
89e57032 | 44 | Requires: ghc-unliftio-core |
b5d13445 JB |
45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | # debuginfo is not useful for ghc | |
48 | %define _enable_debug_packages 0 | |
49 | ||
50 | # don't compress haddock files | |
51 | %define _noautocompressdoc *.haddock | |
52 | ||
53 | %description | |
54 | Deterministic allocation and freeing of scarce resources. This package | |
55 | was originally included with the conduit package, and has since been | |
56 | split off. For more information, please see | |
57 | <http://www.yesodweb.com/book/conduits>. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | Deterministyczne przydzielanie i zwalnianie brakujących zasobów. Ten | |
61 | pakiet był pierwotnie częścią pakietu conduit, ale później został | |
62 | wydzielony. Więcej informacji można znaleźć pod adresem | |
63 | <http://www.yesodweb.com/book/conduits>. | |
64 | ||
65 | %package prof | |
66 | Summary: Profiling %{pkgname} library for GHC | |
67 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
68 | Group: Development/Libraries | |
69 | Requires: %{name} = %{version}-%{release} | |
70 | Requires: ghc-base-prof >= 4.3 | |
b5d13445 | 71 | Requires: ghc-containers-prof |
89e57032 | 72 | Requires: ghc-exceptions-prof |
b5d13445 | 73 | Requires: ghc-mtl-prof >= 2.0 |
89e57032 | 74 | Requires: ghc-primitive-prof |
b5d13445 | 75 | Requires: ghc-transformers-prof >= 0.2.2 |
89e57032 | 76 | Requires: ghc-unliftio-core-prof |
b5d13445 JB |
77 | |
78 | %description prof | |
79 | Profiling %{pkgname} library for GHC. Should be installed when | |
80 | GHC's profiling subsystem is needed. | |
81 | ||
82 | %description prof -l pl.UTF-8 | |
83 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
84 | kiedy potrzebujemy systemu profilującego z GHC. | |
85 | ||
86 | %package doc | |
87 | Summary: HTML documentation for ghc %{pkgname} package | |
88 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
89 | Group: Documentation | |
90 | ||
91 | %description doc | |
92 | HTML documentation for ghc %{pkgname} package. | |
93 | ||
94 | %description doc -l pl.UTF-8 | |
95 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
96 | ||
97 | %prep | |
98 | %setup -q -n %{pkgname}-%{version} | |
99 | ||
100 | %build | |
101 | runhaskell Setup.lhs configure -v2 \ | |
102 | %{?with_prof:--enable-library-profiling} \ | |
103 | --prefix=%{_prefix} \ | |
104 | --libdir=%{_libdir} \ | |
105 | --libexecdir=%{_libexecdir} \ | |
106 | --docdir=%{_docdir}/%{name}-%{version} | |
107 | ||
108 | runhaskell Setup.lhs build | |
109 | runhaskell Setup.lhs haddock --executables | |
110 | ||
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
114 | ||
115 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
116 | ||
117 | # work around automatic haddock docs installation | |
118 | %{__rm} -rf %{name}-%{version}-doc | |
119 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
120 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
121 | ||
122 | runhaskell Setup.lhs register \ | |
123 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
124 | ||
125 | %clean | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %post | |
129 | %ghc_pkg_recache | |
130 | ||
131 | %postun | |
132 | %ghc_pkg_recache | |
133 | ||
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc LICENSE | |
137 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
138 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
89e57032 JR |
139 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*.so |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*.a | |
141 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*_p.a | |
b5d13445 JB |
142 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control |
143 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad | |
144 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans | |
89e57032 JR |
145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.hi |
146 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.dyn_hi | |
b5d13445 JB |
147 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource |
148 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.hi | |
89e57032 JR |
149 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.dyn_hi |
150 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
151 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi | |
152 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi | |
153 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire | |
154 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.hi | |
155 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.dyn_hi | |
156 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO | |
157 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.hi | |
158 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.dyn_hi | |
b5d13445 JB |
159 | |
160 | %if %{with prof} | |
161 | %files prof | |
162 | %defattr(644,root,root,755) | |
89e57032 | 163 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSresourcet-%{version}-*_p.a |
b5d13445 JB |
164 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource.p_hi |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/Resource/*.p_hi | |
89e57032 JR |
166 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi |
167 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Acquire/*.p_hi | |
168 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/UnliftIO/*.p_hi | |
b5d13445 JB |
169 | %endif |
170 | ||
171 | %files doc | |
172 | %defattr(644,root,root,755) | |
173 | %doc %{name}-%{version}-doc/* |