3 %bcond_without prof # profiling library
6 Summary: Compression and decompression in the gzip and zlib formats
7 Summary(pl.UTF-8): Kompresja i dekompresja formatów gzip i zlib
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/zlib
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: a6f9a3a04f2c026863946f943b9f2102
16 Patch0: ghc-8.10.patch
17 URL: http://hackage.haskell.org/package/zlib
18 BuildRequires: ghc >= 6.12.3
19 BuildRequires: ghc-base >= 3
20 BuildRequires: ghc-bytestring >= 0.9
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 3
24 BuildRequires: ghc-bytestring-prof >= 0.9
26 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires: ghc-base >= 3
29 Requires: ghc-bytestring >= 0.9
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 # debuginfo is not useful for ghc
33 %define _enable_debug_packages 0
35 # don't compress haddock files
36 %define _noautocompressdoc *.haddock
39 This package provides a pure interface for compressing and
40 decompressing streams of data represented as lazy 'ByteString's. It
41 uses the zlib C library so it has high performance. It supports the
42 "zlib", "gzip" and "raw" compression formats.
44 It provides a convenient high level API suitable for most tasks and
45 for the few cases where more control is needed it provides access to
46 the full zlib feature set.
48 %description -l pl.UTF-8
49 Ten pakiet zapewnia czysty interfejs do kompresji i dekompresji
50 strumieni danych reprezentowanych jako leniwe "ByteString"i.
51 Wykorzystuje bibliotekę C zlib, więc ma dużą wydajność. Obsługuje
52 formaty kompresji "zlib", "gzip" i "surowy".
54 Udostępnia wygodne, wysokopoziomowe API, nadające się do większości
55 zadań; dla nielicznych przypadków, gdzie potrzeba większej kontroli,
56 daje dostęp do pełnych możliwości zliba.
59 Summary: Profiling %{pkgname} library for GHC
60 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 Requires: ghc-base-prof >= 3
64 Requires: ghc-bytestring-prof >= 0.9
67 Profiling %{pkgname} library for GHC. Should be installed when
68 GHC's profiling subsystem is needed.
70 %description prof -l pl.UTF-8
71 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
72 kiedy potrzebujemy systemu profilującego z GHC.
75 Summary: HTML documentation for ghc %{pkgname} package
76 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
80 HTML documentation for ghc %{pkgname} package.
82 %description doc -l pl.UTF-8
83 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
86 %setup -q -n %{pkgname}-%{version}
90 runhaskell Setup.hs configure -v2 \
91 %{?with_prof:--enable-library-profiling} \
94 --libexecdir=%{_libexecdir} \
95 --docdir=%{_docdir}/%{name}-%{version}
97 runhaskell Setup.hs build
98 runhaskell Setup.hs haddock --executables
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
104 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
106 # work around automatic haddock docs installation
107 %{__rm} -rf %{name}-%{version}-doc
108 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
109 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
111 runhaskell Setup.hs register \
112 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
115 rm -rf $RPM_BUILD_ROOT
124 %defattr(644,root,root,755)
126 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-%{version}-*.so
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-%{version}-*.a
130 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-%{version}-*_p.a
131 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.dyn_hi
135 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.dyn_hi
141 %defattr(644,root,root,755)
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-%{version}-*_p.a
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.p_hi
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.p_hi
148 %defattr(644,root,root,755)
149 %doc %{name}-%{version}-doc/*