3 %bcond_without prof # profiling library
5 %define pkgname vector-algorithms
6 Summary: Efficient algorithms for vector arrays
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
19 BuildRequires: ghc-prof
20 BuildRequires: ghc-vector-prof
22 BuildRequires: rpmbuild(macros) >= 1.608
24 Requires(post,postun): /usr/bin/ghc-pkg
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 # debuginfo is not useful for ghc
29 %define _enable_debug_packages 0
31 # don't compress haddock files
32 %define _noautocompressdoc *.haddock
35 Efficient algorithms for sorting vector arrays.
36 At some stage other vector algorithms may be added.
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
46 Profiling %{pkgname} library for GHC. Should be installed when
47 GHC's profiling subsystem is needed.
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.
54 %setup -q -n %{pkgname}-%{version}
57 runhaskell Setup.lhs configure -v2 \
58 %{?with_prof:--enable-library-profiling} \
61 --libexecdir=%{_libexecdir} \
62 --docdir=%{_docdir}/%{name}-%{version}
64 runhaskell Setup.lhs build
65 runhaskell Setup.lhs haddock --executables
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
71 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
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}
78 runhaskell Setup.lhs register \
79 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
82 rm -rf $RPM_BUILD_ROOT
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
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
108 %defattr(644,root,root,755)
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Vector/Algorithms/*.p_hi