3 %bcond_without prof # profiling library
6 Summary: A random number library
7 Summary(pl.UTF-8): Biblioteka liczb losowych
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/random
14 Source0: http://hackage.haskell.org/package/random-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 9a249cfa7ff6793cbf2be06e9fcd7538
16 URL: http://hackage.haskell.org/package/random/
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 3
19 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-time
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 3
24 BuildRequires: ghc-base-prof < 5
25 BuildRequires: ghc-time-prof
27 BuildRequires: rpmbuild(macros) >= 1.608
29 Requires: ghc-base >= 3
30 Requires: ghc-base < 5
32 Obsoletes: ghc-random-doc
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 # debuginfo is not useful for ghc
36 %define _enable_debug_packages 0
38 # don't compress haddock files
39 %define _noautocompressdoc *.haddock
42 This package provides a random number library.
44 %description -l pl.UTF-8
45 Ten pakiet zawiera bibliotekę liczb losowych.
48 Summary: Profiling %{pkgname} library for GHC
49 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
52 Requires: ghc-base-prof >= 3
53 Requires: ghc-base-prof < 5
54 Requires: ghc-time-prof
57 Profiling %{pkgname} library for GHC. Should be installed when
58 GHC's profiling subsystem is needed.
60 %description prof -l pl.UTF-8
61 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
62 kiedy potrzebujemy systemu profilującego z GHC.
65 %setup -q -n %{pkgname}-%{version}
67 # it relies on ld.bfd specific options
69 if [ -x /usr/bin/ld.bfd ]; then
70 ln -sf /usr/bin/ld.bfd ld-dir/ld
74 PATH=$(pwd)/ld-dir:$PATH
75 runhaskell Setup.hs configure -v2 \
76 %{?with_prof:--enable-library-profiling} \
79 --libexecdir=%{_libexecdir} \
80 --docdir=%{_docdir}/%{name}-%{version}
82 runhaskell Setup.hs build
83 runhaskell Setup.hs haddock --executables
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
89 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
91 # work around automatic haddock docs installation
92 rm -rf %{name}-%{version}-doc
93 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
95 runhaskell Setup.hs register \
96 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
98 rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
101 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc %{name}-%{version}-doc/*
112 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSrandom-%{version}.o
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}.a
116 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
121 %defattr(644,root,root,755)
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}_p.a
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi