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