3 %bcond_without prof # profiling library
6 Summary: High-resolution clock functions: monotonic, realtime, cputime
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/clock
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: a2fcee09fe0da5f60e1c4356d39ed1bd
15 URL: http://hackage.haskell.org/package/clock
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 2
18 BuildRequires: ghc-base <= 5
20 BuildRequires: ghc-prof >= 6.12.3
21 BuildRequires: ghc-base-prof >= 2
22 BuildRequires: ghc-base-prof <= 5
24 BuildRequires: rpmbuild(macros) >= 1.608
25 Requires(post,postun): /usr/bin/ghc-pkg
27 Requires: ghc-base >= 2
28 Requires: ghc-base <= 5
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # debuginfo is not useful for ghc
32 %define _enable_debug_packages 0
34 # don't compress haddock files
35 %define _noautocompressdoc *.haddock
38 A package for convenient access to high-resolution clock and timer
39 functions of different operating systems via a unified API.
42 Summary: Profiling %{pkgname} library for GHC
43 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: ghc-base-prof < 6
47 Requires: ghc-bytestring-prof
48 Requires: ghc-text-prof
51 Profiling %{pkgname} library for GHC. Should be installed when
52 GHC's profiling subsystem is needed.
54 %description prof -l pl.UTF-8
55 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
56 kiedy potrzebujemy systemu profilującego z GHC.
59 %setup -q -n %{pkgname}-%{version}
62 runhaskell Setup.hs configure -v2 \
63 %{?with_prof:--enable-library-profiling} \
66 --libexecdir=%{_libexecdir} \
67 --docdir=%{_docdir}/%{name}-%{version}
69 runhaskell Setup.hs build
70 runhaskell Setup.hs haddock --executables
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
76 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
78 # work around automatic haddock docs installation
79 %{__rm} -rf %{name}-%{version}-doc
80 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
81 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
83 runhaskell Setup.hs register \
84 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
87 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc %{name}-%{version}-doc/*
98 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}-*.so
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}-*.a
102 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}-*_p.a
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi
109 %defattr(644,root,root,755)
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}-*_p.a
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi