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