]> git.pld-linux.org Git - packages/ghc-bytestring-mmap.git/blob - ghc-bytestring-mmap.spec
d9f8defa4254488df4ab32fdb49dfee32c0c539a
[packages/ghc-bytestring-mmap.git] / ghc-bytestring-mmap.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
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
8 Name:           ghc-%{pkgname}
9 Version:        0.2.2
10 Release:        1
11 License:        BSD
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
22 %if %{with prof}
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
28 %endif
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 Requires(post,postun):  /usr/bin/ghc-pkg
31 %requires_eq    ghc
32 Requires:       ghc-base >= 3
33 Requires:       ghc-base < 6
34 Requires:       ghc-bytestring >= 0.9
35 Requires:       ghc-unix
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # debuginfo is not useful for ghc
39 %define         _enable_debug_packages  0
40
41 # don't compress haddock files
42 %define         _noautocompressdoc      *.haddock
43
44 %description
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.
48
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.
54
55 %package prof
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
64
65 %description prof
66 Profiling %{pkgname} library for GHC. Should be installed when
67 GHC's profiling subsystem is needed.
68
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.
72
73 %package doc
74 Summary:        HTML documentation for ghc %{pkgname} package
75 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
76 Group:          Documentation
77
78 %description doc
79 HTML documentation for ghc %{pkgname} package.
80
81 %description doc -l pl.UTF-8
82 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
83
84 %prep
85 %setup -q -n %{pkgname}-%{version}
86
87 %build
88 runhaskell Setup.lhs configure -v2 \
89         %{?with_prof:--enable-library-profiling} \
90         --prefix=%{_prefix} \
91         --libdir=%{_libdir} \
92         --libexecdir=%{_libexecdir} \
93         --docdir=%{_docdir}/%{name}-%{version}
94
95 runhaskell Setup.lhs build
96 runhaskell Setup.lhs haddock --executables
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
101
102 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
103
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}
108
109 runhaskell Setup.lhs register \
110         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post
116 %ghc_pkg_recache
117
118 %postun
119 %ghc_pkg_recache
120
121 %files
122 %defattr(644,root,root,755)
123 %doc LICENSE
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
135
136 %if %{with prof}
137 %files prof
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
142 %endif
143
144 %files doc
145 %defattr(644,root,root,755)
146 %doc %{name}-%{version}-doc/*
This page took 0.061757 seconds and 2 git commands to generate.