]>
Commit | Line | Data |
---|---|---|
0739fc57 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
d42c9e43 JR |
5 | %define pkgname zlib-enum |
6 | Summary: Enumerator interface for zlib compression | |
0739fc57 | 7 | Summary(pl.UTF-8): Interfejs enumeratora do kompresji zlib |
d42c9e43 JR |
8 | Name: ghc-%{pkgname} |
9 | Version: 0.2.3 | |
0739fc57 | 10 | Release: 2 |
d42c9e43 JR |
11 | License: MIT |
12 | Group: Development/Languages | |
0739fc57 JB |
13 | #Source0Download: http://hackage.haskell.org/package/zlib-enum |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
d42c9e43 | 15 | # Source0-md5: dac776d2e3611187973301edbef9180a |
0739fc57 | 16 | URL: http://hackage.haskell.org/package/zlib-enum |
d42c9e43 | 17 | BuildRequires: ghc >= 6.12.3 |
0739fc57 JB |
18 | BuildRequires: ghc-base >= 4 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-bytestring >= 0.9 | |
21 | BuildRequires: ghc-bytestring < 0.11 | |
22 | BuildRequires: ghc-enumerator >= 0.4 | |
23 | BuildRequires: ghc-enumerator < 0.5 | |
24 | BuildRequires: ghc-transformers >= 0.2 | |
25 | BuildRequires: ghc-transformers < 0.4 | |
26 | BuildRequires: ghc-zlib-bindings >= 0.1 | |
27 | BuildRequires: ghc-zlib-bindings < 0.2 | |
28 | %if %{with prof} | |
29 | BuildRequires: ghc-prof >= 6.12.3 | |
30 | BuildRequires: ghc-base-prof >= 4 | |
31 | BuildRequires: ghc-base-prof < 5 | |
32 | BuildRequires: ghc-bytestring-prof >= 0.9 | |
33 | BuildRequires: ghc-bytestring-prof < 0.11 | |
34 | BuildRequires: ghc-enumerator-prof >= 0.4 | |
35 | BuildRequires: ghc-enumerator-prof < 0.5 | |
36 | BuildRequires: ghc-transformers-prof >= 0.2 | |
37 | BuildRequires: ghc-transformers-prof < 0.4 | |
38 | BuildRequires: ghc-zlib-bindings-prof >= 0.1 | |
39 | BuildRequires: ghc-zlib-bindings-prof < 0.2 | |
40 | %endif | |
d42c9e43 | 41 | BuildRequires: rpmbuild(macros) >= 1.608 |
d42c9e43 | 42 | Requires(post,postun): /usr/bin/ghc-pkg |
5a23e120 | 43 | %requires_eq ghc |
0739fc57 JB |
44 | Requires: ghc-base >= 4 |
45 | Requires: ghc-base < 5 | |
46 | Requires: ghc-bytestring >= 0.9 | |
47 | Requires: ghc-bytestring < 0.11 | |
48 | Requires: ghc-enumerator >= 0.4 | |
49 | Requires: ghc-enumerator < 0.5 | |
50 | Requires: ghc-transformers >= 0.2 | |
51 | Requires: ghc-transformers < 0.4 | |
52 | Requires: ghc-zlib-bindings >= 0.1 | |
53 | Requires: ghc-zlib-bindings < 0.2 | |
d42c9e43 JR |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
56 | # debuginfo is not useful for ghc | |
57 | %define _enable_debug_packages 0 | |
58 | ||
0739fc57 | 59 | # don't compress haddock files |
d42c9e43 JR |
60 | %define _noautocompressdoc *.haddock |
61 | ||
62 | %description | |
63 | zlib-enum is a stop-gap package to provide enumeratees for zlib | |
64 | compression/decompression. | |
65 | ||
0739fc57 JB |
66 | %description -l pl.UTF-8 |
67 | zlib-enum to prowizoryczny pakiet zapewniający funkcje enumeratee | |
68 | do kompresji/dekompresji zlib. | |
69 | ||
d42c9e43 JR |
70 | %package prof |
71 | Summary: Profiling %{pkgname} library for GHC | |
72 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
73 | Group: Development/Libraries | |
74 | Requires: %{name} = %{version}-%{release} | |
0739fc57 JB |
75 | Requires: ghc-base-prof >= 4 |
76 | Requires: ghc-base-prof < 5 | |
77 | Requires: ghc-bytestring-prof >= 0.9 | |
78 | Requires: ghc-bytestring-prof < 0.11 | |
79 | Requires: ghc-enumerator-prof >= 0.4 | |
80 | Requires: ghc-enumerator-prof < 0.5 | |
81 | Requires: ghc-transformers-prof >= 0.2 | |
82 | Requires: ghc-transformers-prof < 0.4 | |
83 | Requires: ghc-zlib-bindings-prof >= 0.1 | |
84 | Requires: ghc-zlib-bindings-prof < 0.2 | |
d42c9e43 JR |
85 | |
86 | %description prof | |
0739fc57 JB |
87 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
88 | profiling subsystem is needed. | |
d42c9e43 JR |
89 | |
90 | %description prof -l pl.UTF-8 | |
91 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
92 | kiedy potrzebujemy systemu profilującego z GHC. | |
93 | ||
94 | %prep | |
95 | %setup -q -n %{pkgname}-%{version} | |
96 | ||
97 | %build | |
0739fc57 JB |
98 | runhaskell Setup.hs configure -v2 \ |
99 | %{?with_prof:--enable-library-profiling} \ | |
d42c9e43 JR |
100 | --prefix=%{_prefix} \ |
101 | --libdir=%{_libdir} \ | |
102 | --libexecdir=%{_libexecdir} \ | |
103 | --docdir=%{_docdir}/%{name}-%{version} | |
104 | ||
105 | runhaskell Setup.hs build | |
106 | runhaskell Setup.hs haddock --executables | |
107 | ||
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
111 | ||
112 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
113 | ||
114 | # work around automatic haddock docs installation | |
115 | %{__rm} -rf %{name}-%{version}-doc | |
116 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
117 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
118 | ||
119 | runhaskell Setup.hs register \ | |
0739fc57 | 120 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
d42c9e43 JR |
121 | |
122 | %clean | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %post | |
126 | %ghc_pkg_recache | |
127 | ||
128 | %postun | |
129 | %ghc_pkg_recache | |
130 | ||
131 | %files | |
132 | %defattr(644,root,root,755) | |
133 | %doc %{name}-%{version}-doc/* | |
134 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
135 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
0739fc57 JB |
136 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSzlib-enum-%{version}.o |
137 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-enum-%{version}.a | |
d42c9e43 JR |
138 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec |
139 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib | |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi | |
141 | ||
142 | %files prof | |
143 | %defattr(644,root,root,755) | |
0739fc57 | 144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-enum-%{version}_p.a |
d42c9e43 | 145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi |