]>
Commit | Line | Data |
---|---|---|
643c0f96 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
1caf459d | 5 | %define pkgname zlib |
8ff4c5a8 | 6 | Summary: Compression and decompression in the gzip and zlib formats |
5366891b | 7 | Summary(pl.UTF-8): Kompresja i dekompresja formatów gzip i zlib |
8ff4c5a8 | 8 | Name: ghc-%{pkgname} |
38ea0be6 | 9 | Version: 0.6.2.1 |
f250a349 | 10 | Release: 1 |
8ff4c5a8 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
5366891b JB |
13 | #Source0Download: http://hackage.haskell.org/package/zlib |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
38ea0be6 JR |
15 | # Source0-md5: a6f9a3a04f2c026863946f943b9f2102 |
16 | Patch0: ghc-8.10.patch | |
5366891b | 17 | URL: http://hackage.haskell.org/package/zlib |
2fc7e84b | 18 | BuildRequires: ghc >= 6.12.3 |
2fcc5037 | 19 | BuildRequires: ghc-base >= 3 |
2fcc5037 | 20 | BuildRequires: ghc-bytestring >= 0.9 |
2fcc5037 JB |
21 | %if %{with prof} |
22 | BuildRequires: ghc-prof >= 6.12.3 | |
23 | BuildRequires: ghc-base-prof >= 3 | |
2fcc5037 | 24 | BuildRequires: ghc-bytestring-prof >= 0.9 |
2fcc5037 | 25 | %endif |
1caf459d | 26 | BuildRequires: rpmbuild(macros) >= 1.608 |
2214eaf1 | 27 | %requires_eq ghc |
2fcc5037 | 28 | Requires: ghc-base >= 3 |
2fcc5037 | 29 | Requires: ghc-bytestring >= 0.9 |
8ff4c5a8 JR |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
2214eaf1 ER |
32 | # debuginfo is not useful for ghc |
33 | %define _enable_debug_packages 0 | |
34 | ||
2fcc5037 JB |
35 | # don't compress haddock files |
36 | %define _noautocompressdoc *.haddock | |
37 | ||
8ff4c5a8 JR |
38 | %description |
39 | This package provides a pure interface for compressing and | |
5366891b JB |
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. | |
8ff4c5a8 | 43 | |
5366891b JB |
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. | |
47 | ||
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". | |
53 | ||
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. | |
8ff4c5a8 | 57 | |
643c0f96 JB |
58 | %package prof |
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} | |
2fcc5037 | 63 | Requires: ghc-base-prof >= 3 |
2fcc5037 | 64 | Requires: ghc-bytestring-prof >= 0.9 |
643c0f96 JB |
65 | |
66 | %description prof | |
67 | Profiling %{pkgname} library for GHC. Should be installed when | |
68 | GHC's profiling subsystem is needed. | |
69 | ||
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. | |
73 | ||
2214eaf1 | 74 | %package doc |
643c0f96 | 75 | Summary: HTML documentation for ghc %{pkgname} package |
5366891b | 76 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} |
2214eaf1 ER |
77 | Group: Documentation |
78 | ||
79 | %description doc | |
643c0f96 | 80 | HTML documentation for ghc %{pkgname} package. |
2214eaf1 ER |
81 | |
82 | %description doc -l pl.UTF-8 | |
5366891b | 83 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. |
2214eaf1 | 84 | |
8ff4c5a8 JR |
85 | %prep |
86 | %setup -q -n %{pkgname}-%{version} | |
38ea0be6 | 87 | %patch0 -p1 |
8ff4c5a8 JR |
88 | |
89 | %build | |
90 | runhaskell Setup.hs configure -v2 \ | |
643c0f96 | 91 | %{?with_prof:--enable-library-profiling} \ |
8ff4c5a8 JR |
92 | --prefix=%{_prefix} \ |
93 | --libdir=%{_libdir} \ | |
94 | --libexecdir=%{_libexecdir} \ | |
0cfb4e7c | 95 | --docdir=%{_docdir}/%{name}-%{version} |
8ff4c5a8 JR |
96 | |
97 | runhaskell Setup.hs build | |
98 | runhaskell Setup.hs haddock --executables | |
99 | ||
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
2fc7e84b JR |
102 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d |
103 | ||
8ff4c5a8 JR |
104 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT |
105 | ||
106 | # work around automatic haddock docs installation | |
5366891b | 107 | %{__rm} -rf %{name}-%{version}-doc |
2214eaf1 | 108 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
5366891b | 109 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
8ff4c5a8 JR |
110 | |
111 | runhaskell Setup.hs register \ | |
643c0f96 | 112 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
8ff4c5a8 JR |
113 | |
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %post | |
1caf459d | 118 | %ghc_pkg_recache |
8ff4c5a8 JR |
119 | |
120 | %postun | |
1caf459d | 121 | %ghc_pkg_recache |
8ff4c5a8 JR |
122 | |
123 | %files | |
124 | %defattr(644,root,root,755) | |
5366891b | 125 | %doc LICENSE |
2fc7e84b | 126 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
643c0f96 | 127 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
38ea0be6 JR |
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 | |
643c0f96 JB |
131 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec |
132 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression | |
133 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.hi | |
38ea0be6 | 134 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.dyn_hi |
643c0f96 JB |
135 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib |
136 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.hi | |
38ea0be6 | 137 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.dyn_hi |
643c0f96 JB |
138 | |
139 | %if %{with prof} | |
140 | %files prof | |
141 | %defattr(644,root,root,755) | |
38ea0be6 | 142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSzlib-%{version}-*_p.a |
643c0f96 JB |
143 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/*.p_hi |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Compression/Zlib/*.p_hi | |
145 | %endif | |
2214eaf1 ER |
146 | |
147 | %files doc | |
148 | %defattr(644,root,root,755) | |
149 | %doc %{name}-%{version}-doc/* |