]> git.pld-linux.org Git - packages/ghc-mmap.git/blob - ghc-mmap.spec
- up to 0.5.9
[packages/ghc-mmap.git] / ghc-mmap.spec
1 %define         pkgname mmap
2 Summary:        Memory mapped files for POSIX and Windows
3 Name:           ghc-%{pkgname}
4 Version:        0.5.9
5 Release:        1
6 Epoch:          1
7 License:        BSD
8 Group:          Development/Languages
9 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
10 # Source0-md5:  625301d54b9789e890174e38028c1bcb
11 URL:            http://hackage.haskell.org/package/mmap/
12 BuildRequires:  ghc >= 6.12.3
13 BuildRequires:  ghc-HUnit
14 BuildRequires:  rpmbuild(macros) >= 1.608
15 %requires_eq    ghc
16 Requires:       ghc-HUnit
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 # debuginfo is not useful for ghc
20 %define         _enable_debug_packages  0
21
22 %description
23 This library provides a wrapper to mmap(2) or MapViewOfFile, allowing
24 files or devices to be lazily loaded into memory as strict or lazy
25 ByteStrings, ForeignPtrs or plain Ptrs, using the virtual memory
26 subsystem to do on-demand loading. Modifications are also supported.
27
28 %package doc
29 Summary:        HTML documentation for %{pkgname}
30 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
31 Group:          Documentation
32
33 %description doc
34 HTML documentation for %{pkgname}.
35
36 %description doc -l pl.UTF-8
37 Dokumentacja w formacie HTML dla %{pkgname}.
38
39 %prep
40 %setup -q -n %{pkgname}-%{version}
41
42 %build
43 runhaskell Setup.hs configure -v2 \
44         --prefix=%{_prefix} \
45         --libdir=%{_libdir} \
46         --libexecdir=%{_libexecdir} \
47         --docdir=%{_docdir}/%{name}-%{version}
48
49 runhaskell Setup.hs build
50 runhaskell Setup.hs haddock --executables
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
55
56 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
57
58 # work around automatic haddock docs installation
59 %{__rm} -rf %{name}-%{version}-doc
60 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
61 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
62
63 runhaskell Setup.hs register \
64         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 %ghc_pkg_recache
71
72 %postun
73 %ghc_pkg_recache
74
75 %files
76 %defattr(644,root,root,755)
77 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
78 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
79
80 %files doc
81 %defattr(644,root,root,755)
82 %doc %{name}-%{version}-doc/*
This page took 0.062051 seconds and 3 git commands to generate.