3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Syntax extension for writing in-line benchmarks in OCaml code
11 Summary(pl.UTF-8): Rozszerzenie składni do pisania testów wydajności wewnątrz kodu w OCamlu
17 #Source0Download: https://github.com/janestreet/ppx_bench/tags
18 Source0: https://github.com/janestreet/ppx_bench/archive/v%{version}/ppx_bench-%{version}.tar.gz
19 # Source0-md5: f2852170a6396d60d4fc1c156be1ec62
20 URL: https://github.com/janestreet/ppx_bench
21 BuildRequires: ocaml >= 1:4.04.2
22 BuildRequires: ocaml-dune >= 2.0.0
23 BuildRequires: ocaml-ppx_inline_test-devel >= 0.14
24 BuildRequires: ocaml-ppx_inline_test-devel < 0.15
25 BuildRequires: ocaml-ppxlib-devel >= 0.14.0
26 %requires_eq ocaml-runtime
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define debug_package %{nil}
32 Syntax extension for writing in-line benchmarks in OCaml code.
34 This package contains files needed to run bytecode executables using
37 %description -l pl.UTF-8
38 Rozszerzenie składni do pisania testów wydajności wewnątrz kodu w
41 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
42 używających biblioteki ppx_bench.
45 Summary: Syntax extension for writing in-line benchmarks in OCaml code - development part
46 Summary(pl.UTF-8): Rozszerzenie składni do pisania testów wydajności wewnątrz kodu w OCamlu - część programistyczna
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
50 Requires: ocaml-ppx_inline_test-devel >= 0.14
51 Requires: ocaml-ppxlib-devel >= 0.14.0
54 This package contains files needed to develop OCaml programs using
57 %description devel -l pl.UTF-8
58 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
59 używających biblioteki ppx_bench.
62 %setup -q -n ppx_bench-%{version}
68 rm -rf $RPM_BUILD_ROOT
70 dune install --destdir=$RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 cp -pr example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_bench/*.ml
77 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_bench/*/*.ml
79 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_bench
82 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
86 %doc CHANGES.md LICENSE.md README.md
87 %dir %{_libdir}/ocaml/ppx_bench
88 %attr(755,root,root) %{_libdir}/ocaml/ppx_bench/ppx.exe
89 %{_libdir}/ocaml/ppx_bench/META
90 %{_libdir}/ocaml/ppx_bench/*.cma
91 %dir %{_libdir}/ocaml/ppx_bench/runtime-lib
92 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cma
94 %attr(755,root,root) %{_libdir}/ocaml/ppx_bench/*.cmxs
95 %attr(755,root,root) %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmxs
99 %defattr(644,root,root,755)
100 %{_libdir}/ocaml/ppx_bench/*.cmi
101 %{_libdir}/ocaml/ppx_bench/*.cmt
102 %{_libdir}/ocaml/ppx_bench/*.cmti
103 %{_libdir}/ocaml/ppx_bench/*.mli
104 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmi
105 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmt
106 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmti
107 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.mli
108 %if %{with ocaml_opt}
109 %{_libdir}/ocaml/ppx_bench/ppx_bench.a
110 %{_libdir}/ocaml/ppx_bench/*.cmx
111 %{_libdir}/ocaml/ppx_bench/*.cmxa
112 %{_libdir}/ocaml/ppx_bench/runtime-lib/ppx_bench_lib.a
113 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmx
114 %{_libdir}/ocaml/ppx_bench/runtime-lib/*.cmxa
116 %{_libdir}/ocaml/ppx_bench/dune-package
117 %{_libdir}/ocaml/ppx_bench/opam
118 %{_examplesdir}/%{name}-%{version}