3 %bcond_without prof # profiling library
5 %define pkgname zlib-enum
6 Summary: Enumerator interface for zlib compression
7 Summary(pl.UTF-8): Interfejs enumeratora do kompresji zlib
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/zlib-enum
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: dac776d2e3611187973301edbef9180a
16 URL: http://hackage.haskell.org/package/zlib-enum
17 BuildRequires: ghc >= 6.12.3
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
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
41 BuildRequires: rpmbuild(macros) >= 1.608
42 Requires(post,postun): /usr/bin/ghc-pkg
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
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56 # debuginfo is not useful for ghc
57 %define _enable_debug_packages 0
59 # don't compress haddock files
60 %define _noautocompressdoc *.haddock
63 zlib-enum is a stop-gap package to provide enumeratees for zlib
64 compression/decompression.
66 %description -l pl.UTF-8
67 zlib-enum to prowizoryczny pakiet zapewniający funkcje enumeratee
68 do kompresji/dekompresji zlib.
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}
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
87 Profiling %{pkgname} library for GHC. Should be installed when GHC's
88 profiling subsystem is needed.
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.
95 %setup -q -n %{pkgname}-%{version}
98 runhaskell Setup.hs configure -v2 \
99 %{?with_prof:--enable-library-profiling} \
100 --prefix=%{_prefix} \
101 --libdir=%{_libdir} \
102 --libexecdir=%{_libexecdir} \
103 --docdir=%{_docdir}/%{name}-%{version}
105 runhaskell Setup.hs build
106 runhaskell Setup.hs haddock --executables
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
112 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
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}
119 runhaskell Setup.hs register \
120 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
123 rm -rf $RPM_BUILD_ROOT
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}
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSzlib-enum-%{version}.o
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-enum-%{version}.a
138 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.hi
143 %defattr(644,root,root,755)
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-enum-%{version}_p.a
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Zlib/*.p_hi