]> git.pld-linux.org Git - packages/ghc-zlib.git/blob - ghc-zlib.spec
- release 2
[packages/ghc-zlib.git] / ghc-zlib.spec
1 %define pkgname zlib
2 Summary:        Compression and decompression in the gzip and zlib formats
3 Name:           ghc-%{pkgname}
4 Version:        0.5.2.0
5 Release:        2
6 License:        BSD
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5:  19859e241dc18ef1501a5d44d8523507
10 URL:            http://hackage.haskell.org/package/%{pkgname}/
11 BuildRequires:  ghc >= 6.12.3
12 %requires_releq ghc
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         ghcdir          ghc-%(/usr/bin/ghc --numeric-version)
16
17 %description
18 This package provides a pure interface for compressing and
19 decompressing streams of data represented as lazy
20 'ByteString's. It uses the zlib C library so it has high
21 performance. It supports the "zlib", "gzip" and "raw"
22 compression formats.
23
24 It provides a convenient high level API suitable for most
25 tasks and for the few cases where more control is needed it
26 provides access to the full zlib feature set.
27
28 %prep
29 %setup -q -n %{pkgname}-%{version}
30
31 %build
32 runhaskell Setup.hs configure -v2 \
33         --prefix=%{_prefix} \
34         --libdir=%{_libdir} \
35         --libexecdir=%{_libexecdir} \
36         --docdir=%{_docdir}/%{name}-%{version}
37
38 runhaskell Setup.hs build
39 runhaskell Setup.hs haddock --executables
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
44
45 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
46
47 # work around automatic haddock docs installation
48 rm -rf %{name}-%{version}-doc
49 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
50
51 runhaskell Setup.hs register \
52         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 /usr/bin/ghc-pkg recache
59
60 %postun
61 /usr/bin/ghc-pkg recache
62
63 %files
64 %defattr(644,root,root,755)
65 %doc %{name}-%{version}-doc/html
66 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
67 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
This page took 0.032987 seconds and 4 git commands to generate.