]> git.pld-linux.org Git - packages/ghc-zlib.git/blob - ghc-zlib.spec
- up to 0.6.2.1
[packages/ghc-zlib.git] / ghc-zlib.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname zlib
6 Summary:        Compression and decompression in the gzip and zlib formats
7 Summary(pl.UTF-8):      Kompresja i dekompresja formatów gzip i zlib
8 Name:           ghc-%{pkgname}
9 Version:        0.6.2.1
10 Release:        1
11 License:        BSD
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
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 3
24 BuildRequires:  ghc-bytestring-prof >= 0.9
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.608
27 %requires_eq    ghc
28 Requires:       ghc-base >= 3
29 Requires:       ghc-bytestring >= 0.9
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 # debuginfo is not useful for ghc
33 %define         _enable_debug_packages  0
34
35 # don't compress haddock files
36 %define         _noautocompressdoc      *.haddock
37
38 %description
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.
43
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.
57
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}
63 Requires:       ghc-base-prof >= 3
64 Requires:       ghc-bytestring-prof >= 0.9
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
74 %package doc
75 Summary:        HTML documentation for ghc %{pkgname} package
76 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
77 Group:          Documentation
78
79 %description doc
80 HTML documentation for ghc %{pkgname} package.
81
82 %description doc -l pl.UTF-8
83 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
84
85 %prep
86 %setup -q -n %{pkgname}-%{version}
87 %patch0 -p1
88
89 %build
90 runhaskell Setup.hs configure -v2 \
91         %{?with_prof:--enable-library-profiling} \
92         --prefix=%{_prefix} \
93         --libdir=%{_libdir} \
94         --libexecdir=%{_libexecdir} \
95         --docdir=%{_docdir}/%{name}-%{version}
96
97 runhaskell Setup.hs build
98 runhaskell Setup.hs haddock --executables
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
103
104 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
105
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}
110
111 runhaskell Setup.hs register \
112         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post
118 %ghc_pkg_recache
119
120 %postun
121 %ghc_pkg_recache
122
123 %files
124 %defattr(644,root,root,755)
125 %doc LICENSE
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
138
139 %if %{with prof}
140 %files prof
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
145 %endif
146
147 %files doc
148 %defattr(644,root,root,755)
149 %doc %{name}-%{version}-doc/*
This page took 0.069394 seconds and 3 git commands to generate.