]> git.pld-linux.org Git - packages/ghc-zlib.git/blob - ghc-zlib.spec
- docdir
[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:        1
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.10
12 %requires_eq    ghc
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         libsubdir       ghc-%(/usr/bin/ghc --numeric-version)/%{pkgname}-%{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         --libsubdir=%{libsubdir} \
37         --docdir=%{_docdir}/%{name}-%{version}
38
39 runhaskell Setup.hs build
40 runhaskell Setup.hs haddock --executables
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
45
46 # work around automatic haddock docs installation
47 rm -rf %{name}-%{version}-doc
48 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
49
50 runhaskell Setup.hs register \
51         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{libsubdir}/%{pkgname}.conf
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 /usr/bin/ghc-pkg update %{_libdir}/%{libsubdir}/%{pkgname}.conf
58
59 %postun
60 if [ "$1" = "0" ]; then
61         /usr/bin/ghc-pkg unregister %{pkgname}-%{version}
62 fi
63
64 %files
65 %defattr(644,root,root,755)
66 %doc %{name}-%{version}-doc/html
67 %{_libdir}/%{libsubdir}
This page took 0.057002 seconds and 4 git commands to generate.