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