]>
Commit | Line | Data |
---|---|---|
e6f50c9d JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname vector-algorithms | |
6 | Summary: Efficient algorithms for vector arrays | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 0.8.0.3 | |
edfcb438 | 9 | Release: 2 |
e6f50c9d JR |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | #Source0Download: http://hackage.haskell.org/package/vector-algorithms | |
13 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
14 | # Source0-md5: 6e0e7d21339a1a659fbf15adc1861708 | |
15 | URL: http://hackage.haskell.org/package/vector-algorithms | |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-vector | |
18 | %if %{with prof} | |
19 | BuildRequires: ghc-prof | |
20 | BuildRequires: ghc-vector-prof | |
21 | %endif | |
22 | BuildRequires: rpmbuild(macros) >= 1.608 | |
23 | %requires_eq ghc | |
24 | Requires(post,postun): /usr/bin/ghc-pkg | |
25 | Requires: ghc-vector | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | # debuginfo is not useful for ghc | |
29 | %define _enable_debug_packages 0 | |
30 | ||
31 | # don't compress haddock files | |
32 | %define _noautocompressdoc *.haddock | |
33 | ||
34 | %description | |
35 | Efficient algorithms for sorting vector arrays. | |
36 | At some stage other vector algorithms may be added. | |
37 | ||
38 | %package prof | |
39 | Summary: Profiling %{pkgname} library for GHC | |
40 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | Requires: ghc-vector-prof | |
44 | ||
45 | %description prof | |
46 | Profiling %{pkgname} library for GHC. Should be installed when | |
47 | GHC's profiling subsystem is needed. | |
48 | ||
49 | %description prof -l pl.UTF-8 | |
50 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
51 | kiedy potrzebujemy systemu profilującego z GHC. | |
52 | ||
53 | %prep | |
54 | %setup -q -n %{pkgname}-%{version} | |
55 | ||
56 | %build | |
57 | runhaskell Setup.lhs configure -v2 \ | |
58 | %{?with_prof:--enable-library-profiling} \ | |
59 | --prefix=%{_prefix} \ | |
60 | --libdir=%{_libdir} \ | |
61 | --libexecdir=%{_libexecdir} \ | |
62 | --docdir=%{_docdir}/%{name}-%{version} | |
63 | ||
64 | runhaskell Setup.lhs build | |
65 | runhaskell Setup.lhs haddock --executables | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
70 | ||
71 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
72 | ||
73 | # work around automatic haddock docs installation | |
74 | %{__rm} -rf %{name}-%{version}-doc | |
75 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
76 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
77 | ||
78 | runhaskell Setup.lhs register \ | |
79 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post | |
85 | %ghc_pkg_recache | |
86 | ||
87 | %postun | |
88 | %ghc_pkg_recache | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %doc CHANGELOG.md LICENSE %{name}-%{version}-doc/html | |
93 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
94 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
95 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so | |
96 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
97 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
98 | ||
99 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
100 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector | |
101 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector/Algorithms | |
102 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector/Algorithms/*.hi | |
103 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector/Algorithms/*.dyn_hi | |
104 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/include | |
105 | ||
106 | %if %{with prof} | |
107 | %files prof | |
108 | %defattr(644,root,root,755) | |
109 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
110 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector/Algorithms/*.p_hi | |
111 | %endif |