]>
Commit | Line | Data |
---|---|---|
9fe9f8c2 JR |
1 | # |
2 | # Conditional build: | |
0681e125 | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
9fe9f8c2 | 4 | |
0681e125 | 5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
9fe9f8c2 JR |
6 | %undefine with_ocaml_opt |
7 | %endif | |
8 | ||
4e2f8f93 JB |
9 | Summary: OUnit: unit tests for OCaml |
10 | Summary(pl.UTF-8): OUnit - testy jednostkowe dla OCamla | |
11 | Name: ocaml-ounit | |
0681e125 JB |
12 | Version: 2.2.4 |
13 | Release: 1 | |
4e2f8f93 | 14 | License: MIT |
0681e125 JB |
15 | Group: Development/Libraries |
16 | #Source0Download: https://github.com/gildor478/ounit/releases | |
17 | Source0: https://github.com/gildor478/ounit/releases/download/v%{version}/ounit-v%{version}.tbz | |
18 | # Source0-md5: 7cc70da6eb7a69bc18936ade68dfae61 | |
19 | Patch0: %{name}-remove-stdlib-shims.patch | |
20 | Patch1: %{name}-remove-Thread-kill.patch | |
21 | URL: https://github.com/gildor478/ounit | |
22 | BuildRequires: ocaml >= 1:4.04.0 | |
23 | BuildRequires: ocaml-dune >= 1.11.0 | |
93213bc8 | 24 | BuildRequires: ocaml-findlib |
0681e125 | 25 | BuildRequires: ocaml-lwt-devel |
4e2f8f93 JB |
26 | %requires_eq ocaml |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
db89d725 JB |
29 | %if %{without ocaml_opt} |
30 | %define _enable_debug_packages 0 | |
31 | %endif | |
32 | ||
4e2f8f93 JB |
33 | %description |
34 | OUnit is a unit testing framework for OCaml, inspired by the JUnit | |
35 | tool for Java, and the HUnit tool for Haskell. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | OUnit to szkielet testów jednostkowych dla OCamla, zainspirowany | |
39 | narzędziami JUnit dla Javy oraz HUnit dla Haskella. | |
40 | ||
0681e125 JB |
41 | %package lwt |
42 | Summary: Helper functions for building Lwt tests using OUnit | |
43 | Summary(pl.UTF-8): Funkcje pomocnicze do tworzenia testów Lwt przy użyciu biblioteki OUnit | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | Requires: ocaml-lwt-devel | |
47 | ||
48 | %description lwt | |
49 | This library contains helper functions for building Lwt tests using | |
50 | OUnit. | |
51 | ||
52 | %description lwt -l pl.UTF-8 | |
53 | Biblioteka zawierająca funkcje pomocnicze do tworzenia testów Lwt przy | |
54 | użyciu biblioteki OUnit. | |
55 | ||
4e2f8f93 | 56 | %prep |
0681e125 JB |
57 | %setup -q -n ounit-v%{version} |
58 | %patch0 -p1 | |
59 | %patch1 -p1 | |
4e2f8f93 JB |
60 | |
61 | %build | |
0681e125 | 62 | dune build @all --verbose |
4e2f8f93 JB |
63 | |
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
4e2f8f93 | 66 | |
0681e125 | 67 | dune install --destdir=$RPM_BUILD_ROOT |
4e2f8f93 JB |
68 | |
69 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
0681e125 | 70 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
4e2f8f93 | 71 | |
0681e125 JB |
72 | # sources |
73 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/{ounit2,ounit2-lwt}/*.ml | |
74 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ounit2/*/*.ml | |
4e2f8f93 | 75 | # packaged as %doc |
0681e125 | 76 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/{ounit,ounit-lwt,ounit2,ounit2-lwt} |
4e2f8f93 JB |
77 | |
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
0681e125 JB |
83 | %doc CHANGES.md LICENSE.txt README.md |
84 | %dir %{_libdir}/ocaml/ounit | |
85 | %{_libdir}/ocaml/ounit/META | |
86 | %{_libdir}/ocaml/ounit/dune-package | |
87 | %{_libdir}/ocaml/ounit/opam | |
88 | %dir %{_libdir}/ocaml/ounit2 | |
89 | %{_libdir}/ocaml/ounit2/META | |
90 | %{_libdir}/ocaml/ounit2/*.cma | |
91 | %{_libdir}/ocaml/ounit2/*.cmi | |
92 | %{_libdir}/ocaml/ounit2/*.cmt | |
93 | %{_libdir}/ocaml/ounit2/*.cmti | |
94 | %{_libdir}/ocaml/ounit2/*.mli | |
95 | %dir %{_libdir}/ocaml/ounit2/advanced | |
96 | %{_libdir}/ocaml/ounit2/advanced/*.cma | |
97 | %{_libdir}/ocaml/ounit2/advanced/*.cmi | |
98 | %{_libdir}/ocaml/ounit2/advanced/*.cmt | |
99 | %{_libdir}/ocaml/ounit2/advanced/*.cmti | |
100 | %{_libdir}/ocaml/ounit2/advanced/*.mli | |
101 | %dir %{_libdir}/ocaml/ounit2/threads | |
102 | %{_libdir}/ocaml/ounit2/threads/*.cma | |
103 | %{_libdir}/ocaml/ounit2/threads/*.cmi | |
104 | %{_libdir}/ocaml/ounit2/threads/*.cmt | |
105 | %dir %{_libdir}/ocaml/ounit2/threads/.private | |
106 | %{_libdir}/ocaml/ounit2/threads/.private/*.cmi | |
107 | %{_libdir}/ocaml/ounit2/threads/.private/*.cmt | |
9fe9f8c2 | 108 | %if %{with ocaml_opt} |
0681e125 JB |
109 | %{_libdir}/ocaml/ounit2/*.a |
110 | %{_libdir}/ocaml/ounit2/*.cmx | |
111 | %{_libdir}/ocaml/ounit2/*.cmxa | |
112 | %attr(755,root,root) %{_libdir}/ocaml/ounit2/*.cmxs | |
113 | %{_libdir}/ocaml/ounit2/advanced/*.a | |
114 | %{_libdir}/ocaml/ounit2/advanced/*.cmx | |
115 | %{_libdir}/ocaml/ounit2/advanced/*.cmxa | |
116 | %attr(755,root,root) %{_libdir}/ocaml/ounit2/advanced/*.cmxs | |
117 | %{_libdir}/ocaml/ounit2/threads/*.a | |
118 | %{_libdir}/ocaml/ounit2/threads/*.cmx | |
119 | %{_libdir}/ocaml/ounit2/threads/*.cmxa | |
120 | %attr(755,root,root) %{_libdir}/ocaml/ounit2/threads/*.cmxs | |
9fe9f8c2 | 121 | %endif |
0681e125 JB |
122 | %{_libdir}/ocaml/ounit2/dune-package |
123 | %{_libdir}/ocaml/ounit2/opam | |
4e2f8f93 | 124 | %{_examplesdir}/%{name}-%{version} |
0681e125 JB |
125 | |
126 | %files lwt | |
127 | %defattr(644,root,root,755) | |
128 | %dir %{_libdir}/ocaml/ounit-lwt | |
129 | %{_libdir}/ocaml/ounit-lwt/META | |
130 | %{_libdir}/ocaml/ounit-lwt/dune-package | |
131 | %{_libdir}/ocaml/ounit-lwt/opam | |
132 | %dir %{_libdir}/ocaml/ounit2-lwt | |
133 | %{_libdir}/ocaml/ounit2-lwt/META | |
134 | %{_libdir}/ocaml/ounit2-lwt/*.cma | |
135 | %{_libdir}/ocaml/ounit2-lwt/*.cmi | |
136 | %{_libdir}/ocaml/ounit2-lwt/*.cmt | |
137 | %if %{with ocaml_opt} | |
138 | %{_libdir}/ocaml/ounit2-lwt/*.a | |
139 | %{_libdir}/ocaml/ounit2-lwt/*.cmx | |
140 | %{_libdir}/ocaml/ounit2-lwt/*.cmxa | |
141 | %attr(755,root,root) %{_libdir}/ocaml/ounit2-lwt/*.cmxs | |
142 | %endif | |
143 | %{_libdir}/ocaml/ounit2-lwt/dune-package | |
144 | %{_libdir}/ocaml/ounit2-lwt/opam |