3 %bcond_without prof # profiling library
5 %define pkgname bytestring-mmap
6 Summary: mmap support for strict ByteStrings
7 Summary(pl.UTF-8): Obsługa mmap dla ścisłych ByteStringów
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/bytestring-mmap
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: deabf8e1b20aed80b03e8b4dc44182ac
16 URL: http://hackage.haskell.org/package/bytestring-mmap
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 3
19 BuildRequires: ghc-base < 6
20 BuildRequires: ghc-bytestring >= 0.9
21 BuildRequires: ghc-unix
23 BuildRequires: ghc-prof >= 6.12.3
24 BuildRequires: ghc-base-prof >= 3
25 BuildRequires: ghc-base-prof < 6
26 BuildRequires: ghc-bytestring-prof >= 0.9
27 BuildRequires: ghc-unix-prof
29 BuildRequires: rpmbuild(macros) >= 1.608
30 Requires(post,postun): /usr/bin/ghc-pkg
32 Requires: ghc-base >= 3
33 Requires: ghc-base < 6
34 Requires: ghc-bytestring >= 0.9
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # debuginfo is not useful for ghc
39 %define _enable_debug_packages 0
41 # don't compress haddock files
42 %define _noautocompressdoc *.haddock
45 This library provides a wrapper to mmap(2), allowing files or devices
46 to be lazily loaded into memory as strict or lazy ByteStrings, using
47 the virtual memory subsystem to do on-demand loading.
49 %description -l pl.UTF-8
50 Ta biblioteka dostarcza obudowanie mmap(2), pozwalające na leniwe
51 wczytywanie plików lub urządzeń do pamięci jako ścisłe lub leniwe
52 łańcuchy bajtów (typ ByteString), przy użyciu podsystemu pamięci
53 wirtualnej w celu wczytywania na żądanie.
56 Summary: Profiling %{pkgname} library for GHC
57 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: ghc-base-prof >= 3
61 Requires: ghc-base-prof < 6
62 Requires: ghc-bytestring-prof >= 0.9
63 Requires: ghc-unix-prof
66 Profiling %{pkgname} library for GHC. Should be installed when
67 GHC's profiling subsystem is needed.
69 %description prof -l pl.UTF-8
70 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
71 kiedy potrzebujemy systemu profilującego z GHC.
74 Summary: HTML documentation for ghc %{pkgname} package
75 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
79 HTML documentation for ghc %{pkgname} package.
81 %description doc -l pl.UTF-8
82 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
85 %setup -q -n %{pkgname}-%{version}
88 runhaskell Setup.lhs configure -v2 \
89 %{?with_prof:--enable-library-profiling} \
92 --libexecdir=%{_libexecdir} \
93 --docdir=%{_docdir}/%{name}-%{version}
95 runhaskell Setup.lhs build
96 runhaskell Setup.lhs haddock --executables
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
102 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
104 # work around automatic haddock docs installation
105 %{__rm} -rf %{name}-%{version}-doc
106 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
107 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
109 runhaskell Setup.lhs register \
110 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113 rm -rf $RPM_BUILD_ROOT
122 %defattr(644,root,root,755)
124 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
125 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSbytestring-mmap-%{version}.o
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSbytestring-mmap-%{version}.a
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/include
129 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO
131 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix/MMap.hi
133 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix/MMap
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix/MMap/*.hi
138 %defattr(644,root,root,755)
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSbytestring-mmap-%{version}_p.a
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix/MMap.p_hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/Posix/MMap/*.p_hi
145 %defattr(644,root,root,755)
146 %doc %{name}-%{version}-doc/*