]>
Commit | Line | Data |
---|---|---|
d223055c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
46062bd4 JB |
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 | |
fe46bf7f | 8 | Version: 2.14 |
14ce43a3 | 9 | Release: 3 |
46062bd4 JB |
10 | License: BSD |
11 | Group: Development/Languages | |
9fd6e867 JB |
12 | #Source0Download: http://hackage.haskell.org/package/QuickCheck |
13 | Source0: http://hackage.haskell.org/package/QuickCheck-%{version}/QuickCheck-%{version}.tar.gz | |
fe46bf7f | 14 | # Source0-md5: 2a4e5ddd89f6ab03fe07905cf14d0af1 |
d223055c JB |
15 | URL: http://hackage.haskell.org/package/QuickCheck |
16 | BuildRequires: ghc | |
17 | BuildRequires: ghc-random | |
fe46bf7f | 18 | BuildRequires: ghc-splitmix |
d223055c | 19 | %if %{with prof} |
46062bd4 JB |
20 | BuildRequires: ghc-prof >= 6.12.3 |
21 | BuildRequires: ghc-random-prof | |
fe46bf7f | 22 | BuildRequires: ghc-splitmix-prof |
d223055c | 23 | %endif |
46062bd4 | 24 | BuildRequires: rpmbuild(macros) >= 1.608 |
3c121972 | 25 | %requires_eq ghc |
46062bd4 | 26 | Requires: ghc-random |
fe46bf7f | 27 | Requires: ghc-splitmix |
46062bd4 JB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | # debuginfo is not useful for ghc | |
31 | %define _enable_debug_packages 0 | |
32 | ||
b768fb81 | 33 | # don't compress haddock files |
46062bd4 JB |
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} | |
d223055c | 49 | Requires: ghc-random-prof |
fe46bf7f | 50 | Requires: ghc-splitmix-prof |
46062bd4 JB |
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 | |
d223055c JB |
71 | runhaskell Setup.lhs configure -v2 \ |
72 | %{?with_prof:--enable-library-profiling} \ | |
46062bd4 JB |
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 | |
b58e751b | 89 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
46062bd4 JB |
90 | |
91 | runhaskell Setup.lhs register \ | |
b58e751b | 92 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/QuickCheck.conf |
46062bd4 JB |
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) | |
b58e751b | 105 | %doc LICENSE README %{name}-%{version}-doc/html |
46062bd4 JB |
106 | %{_libdir}/%{ghcdir}/package.conf.d/QuickCheck.conf |
107 | %dir %{_libdir}/%{ghcdir}/QuickCheck-%{version} | |
fe46bf7f JR |
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 | |
46062bd4 JB |
111 | %dir %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test |
112 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/*.hi | |
fe46bf7f | 113 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/*.dyn_hi |
46062bd4 JB |
114 | %dir %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/QuickCheck |
115 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/QuickCheck/*.hi | |
fe46bf7f JR |
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 | |
46062bd4 | 120 | |
d223055c | 121 | %if %{with prof} |
46062bd4 JB |
122 | %files prof |
123 | %defattr(644,root,root,755) | |
fe46bf7f | 124 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/libHSQuickCheck-%{version}-*_p.a |
46062bd4 JB |
125 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/*.p_hi |
126 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/QuickCheck/*.p_hi | |
fe46bf7f | 127 | %{_libdir}/%{ghcdir}/QuickCheck-%{version}/Test/QuickCheck/Gen/*.p_hi |
d223055c | 128 | %endif |