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