]> git.pld-linux.org Git - packages/ghc-clock.git/blame - ghc-clock.spec
- up to 0.8
[packages/ghc-clock.git] / ghc-clock.spec
CommitLineData
8ec434eb
JP
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname clock
6Summary: High-resolution clock functions: monotonic, realtime, cputime
7Name: ghc-%{pkgname}
621cbe83 8Version: 0.8
8ec434eb
JP
9Release: 1
10License: BSD
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/clock
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
621cbe83 14# Source0-md5: a2fcee09fe0da5f60e1c4356d39ed1bd
8ec434eb
JP
15URL: http://hackage.haskell.org/package/clock
16BuildRequires: ghc >= 6.12.3
17BuildRequires: ghc-base >= 2
18BuildRequires: ghc-base <= 5
19%if %{with prof}
20BuildRequires: ghc-prof >= 6.12.3
21BuildRequires: ghc-base-prof >= 2
22BuildRequires: ghc-base-prof <= 5
23%endif
24BuildRequires: rpmbuild(macros) >= 1.608
25Requires(post,postun): /usr/bin/ghc-pkg
26%requires_eq ghc
27Requires: ghc-base >= 2
28Requires: ghc-base <= 5
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31# debuginfo is not useful for ghc
32%define _enable_debug_packages 0
33
34# don't compress haddock files
35%define _noautocompressdoc *.haddock
36
37%description
38A package for convenient access to high-resolution clock and timer
39functions of different operating systems via a unified API.
40
41%package prof
42Summary: Profiling %{pkgname} library for GHC
43Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
44Group: Development/Libraries
45Requires: %{name} = %{version}-%{release}
46Requires: ghc-base-prof < 6
47Requires: ghc-bytestring-prof
48Requires: ghc-text-prof
49
50%description prof
51Profiling %{pkgname} library for GHC. Should be installed when
52GHC's profiling subsystem is needed.
53
54%description prof -l pl.UTF-8
55Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
56kiedy potrzebujemy systemu profilującego z GHC.
57
58%prep
59%setup -q -n %{pkgname}-%{version}
60
61%build
62runhaskell Setup.hs configure -v2 \
63 %{?with_prof:--enable-library-profiling} \
64 --prefix=%{_prefix} \
65 --libdir=%{_libdir} \
66 --libexecdir=%{_libexecdir} \
67 --docdir=%{_docdir}/%{name}-%{version}
68
69runhaskell Setup.hs build
70runhaskell Setup.hs haddock --executables
71
72%install
73rm -rf $RPM_BUILD_ROOT
74install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
75
76runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
77
78# work around automatic haddock docs installation
79%{__rm} -rf %{name}-%{version}-doc
80cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
81%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
82
83runhaskell Setup.hs register \
84 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%post
90%ghc_pkg_recache
91
92%postun
93%ghc_pkg_recache
94
95%files
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}
621cbe83
JR
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
8ec434eb
JP
103%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
104%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
621cbe83 105%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi
8ec434eb
JP
106
107%if %{with prof}
108%files prof
109%defattr(644,root,root,755)
621cbe83 110%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}-*_p.a
8ec434eb
JP
111%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
112%endif
This page took 0.095233 seconds and 4 git commands to generate.