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