]> git.pld-linux.org Git - packages/ghc-random.git/blame - ghc-random.spec
- up to 1.1
[packages/ghc-random.git] / ghc-random.spec
CommitLineData
02be16cb
JB
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
6a02fcf1 5%define pkgname random
f8442377
JB
6Summary: A random number library
7Summary(pl.UTF-8): Biblioteka liczb losowych
6a02fcf1 8Name: ghc-%{pkgname}
1ca8d67f 9Version: 1.1
54d4cee8 10Release: 1
6a02fcf1
JR
11License: BSD
12Group: Development/Languages
1430df25
JB
13#Source0Download: http://hackage.haskell.org/package/random
14Source0: http://hackage.haskell.org/package/random-%{version}/%{pkgname}-%{version}.tar.gz
1ca8d67f 15# Source0-md5: 474f10b9389b316e4472b71d20298993
6a02fcf1
JR
16URL: http://hackage.haskell.org/package/random/
17BuildRequires: ghc >= 6.12.3
414a68a3
JB
18BuildRequires: ghc-base >= 3
19BuildRequires: ghc-base < 5
20BuildRequires: ghc-time
21%if %{with prof}
22BuildRequires: ghc-prof >= 6.12.3
23BuildRequires: ghc-base-prof >= 3
24BuildRequires: ghc-base-prof < 5
25BuildRequires: ghc-time-prof
26%endif
6a02fcf1
JR
27BuildRequires: rpmbuild(macros) >= 1.608
28%requires_releq ghc
414a68a3
JB
29Requires: ghc-base >= 3
30Requires: ghc-base < 5
31Requires: ghc-time
2f48e81a 32Obsoletes: ghc-random-doc
6a02fcf1
JR
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35# debuginfo is not useful for ghc
36%define _enable_debug_packages 0
37
414a68a3 38# don't compress haddock files
9f85fa41 39%define _noautocompressdoc *.haddock
a3c6b797 40
6a02fcf1
JR
41%description
42This package provides a random number library.
43
f8442377
JB
44%description -l pl.UTF-8
45Ten pakiet zawiera bibliotekę liczb losowych.
46
ec1f01cc
JR
47%package prof
48Summary: Profiling %{pkgname} library for GHC
f8442377 49Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
ec1f01cc
JR
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
414a68a3
JB
52Requires: ghc-base-prof >= 3
53Requires: ghc-base-prof < 5
54Requires: ghc-time-prof
ec1f01cc
JR
55
56%description prof
f8442377 57Profiling %{pkgname} library for GHC. Should be installed when
ec1f01cc
JR
58GHC's profiling subsystem is needed.
59
60%description prof -l pl.UTF-8
f8442377 61Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
ec1f01cc
JR
62kiedy potrzebujemy systemu profilującego z GHC.
63
6a02fcf1
JR
64%prep
65%setup -q -n %{pkgname}-%{version}
66
f8442377
JB
67# it relies on ld.bfd specific options
68mkdir -p ld-dir
69if [ -x /usr/bin/ld.bfd ]; then
70 ln -sf /usr/bin/ld.bfd ld-dir/ld
71fi
72
6a02fcf1 73%build
f8442377 74PATH=$(pwd)/ld-dir:$PATH
02be16cb
JB
75runhaskell Setup.hs configure -v2 \
76 %{?with_prof:--enable-library-profiling} \
6a02fcf1
JR
77 --prefix=%{_prefix} \
78 --libdir=%{_libdir} \
79 --libexecdir=%{_libexecdir} \
80 --docdir=%{_docdir}/%{name}-%{version}
81
82runhaskell Setup.hs build
83runhaskell Setup.hs haddock --executables
84
85%install
86rm -rf $RPM_BUILD_ROOT
87install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
88
89runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
90
91# work around automatic haddock docs installation
92rm -rf %{name}-%{version}-doc
2f48e81a 93cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
6a02fcf1
JR
94
95runhaskell Setup.hs register \
02be16cb 96 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
6a02fcf1 97
fe17e319
ER
98rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
99
6a02fcf1
JR
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%post
104%ghc_pkg_recache
105
106%postun
107%ghc_pkg_recache
108
109%files
110%defattr(644,root,root,755)
2f48e81a 111%doc %{name}-%{version}-doc/*
6a02fcf1 112%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
ec1f01cc 113%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
1ca8d67f
JR
114%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}-*.a
115%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}-*_p.a
116%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}-*.so
ec1f01cc
JR
117%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
118%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
1ca8d67f 119%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi
ec1f01cc 120
02be16cb 121%if %{with prof}
ec1f01cc
JR
122%files prof
123%defattr(644,root,root,755)
1ca8d67f 124%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrandom-%{version}-*_p.a
ec1f01cc 125%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
02be16cb 126%endif
This page took 0.113443 seconds and 4 git commands to generate.