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