]>
Commit | Line | Data |
---|---|---|
34027e00 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
10 | Summary: A ppx extension to record module startup times | |
11 | Summary(pl.UTF-8): Rozszerzenie ppx to zapisywania czasów startu modułów | |
12 | Name: ocaml-ppx_module_timer | |
13 | Version: 0.14.0 | |
14 | Release: 1 | |
15 | License: MIT | |
16 | Group: Libraries | |
17 | #Source0Download: https://github.com/janestreet/ppx_module_timer/tags | |
18 | Source0: https://github.com/janestreet/ppx_module_timer/archive/v%{version}/ppx_module_timer-%{version}.tar.gz | |
19 | # Source0-md5: 2f4e90c784241a0f01fa56e56433e02a | |
20 | URL: https://github.com/janestreet/ppx_module_timer | |
21 | BuildRequires: ocaml >= 1:4.04.2 | |
22 | BuildRequires: ocaml-base-devel >= 0.14 | |
23 | BuildRequires: ocaml-base-devel < 0.15 | |
24 | BuildRequires: ocaml-dune >= 2.0.0 | |
25 | BuildRequires: ocaml-ppx_base-devel >= 0.14 | |
26 | BuildRequires: ocaml-ppx_base-devel < 0.15 | |
27 | BuildRequires: ocaml-ppxlib-devel >= 0.11.0 | |
28 | BuildRequires: ocaml-stdio-devel >= 0.14 | |
29 | BuildRequires: ocaml-stdio-devel < 0.15 | |
30 | BuildRequires: ocaml-time_now-devel >= 0.14 | |
31 | BuildRequires: ocaml-time_now-devel < 0.15 | |
32 | %requires_eq ocaml-runtime | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %define debug_package %{nil} | |
36 | ||
37 | %description | |
38 | Ppx rewriter that records top-level module startup times. | |
39 | ||
40 | This package contains files needed to run bytecode executables using | |
41 | ppx_module_timer library. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Moduł przepisujący ppx zapisujący czasy startu modułów górnego | |
45 | poziomu. | |
46 | ||
47 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
48 | używających biblioteki ppx_module_timer. | |
49 | ||
50 | %package devel | |
51 | Summary: A ppx extension to record module startup times - development part | |
592f72b1 | 52 | Summary(pl.UTF-8): Rozszerzenie ppx to zapisywania czasów startu modułów - część programistyczna |
34027e00 JB |
53 | Group: Development/Libraries |
54 | Requires: %{name} = %{version}-%{release} | |
55 | %requires_eq ocaml | |
56 | Requires: ocaml-base-devel >= 0.14 | |
57 | Requires: ocaml-ppx_base-devel >= 0.14 | |
58 | Requires: ocaml-ppxlib-devel >= 0.11.0 | |
59 | Requires: ocaml-stdio-devel >= 0.14 | |
60 | Requires: ocaml-time_now-devel >= 0.14 | |
61 | ||
62 | %description devel | |
63 | This package contains files needed to develop OCaml programs using | |
64 | ppx_module_timer library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
68 | używających biblioteki ppx_module_timer. | |
69 | ||
70 | %prep | |
71 | %setup -q -n ppx_module_timer-%{version} | |
72 | ||
73 | %build | |
74 | dune build --verbose | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | dune install --destdir=$RPM_BUILD_ROOT | |
80 | ||
81 | # sources | |
82 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_module_timer/*.ml | |
83 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_module_timer/*/*.ml | |
84 | # packaged as %doc | |
85 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_module_timer | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %doc LICENSE.md README.md | |
93 | %dir %{_libdir}/ocaml/ppx_module_timer | |
94 | %attr(755,root,root) %{_libdir}/ocaml/ppx_module_timer/ppx.exe | |
95 | %{_libdir}/ocaml/ppx_module_timer/META | |
96 | %{_libdir}/ocaml/ppx_module_timer/*.cma | |
97 | %dir %{_libdir}/ocaml/ppx_module_timer/runtime | |
98 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cma | |
99 | %if %{with ocaml_opt} | |
100 | %attr(755,root,root) %{_libdir}/ocaml/ppx_module_timer/*.cmxs | |
101 | %attr(755,root,root) %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmxs | |
102 | %endif | |
103 | ||
104 | %files devel | |
105 | %defattr(644,root,root,755) | |
106 | %{_libdir}/ocaml/ppx_module_timer/*.cmi | |
107 | %{_libdir}/ocaml/ppx_module_timer/*.cmt | |
108 | %{_libdir}/ocaml/ppx_module_timer/*.cmti | |
109 | %{_libdir}/ocaml/ppx_module_timer/*.mli | |
110 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmi | |
111 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmt | |
112 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmti | |
113 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.mli | |
114 | %if %{with ocaml_opt} | |
115 | %{_libdir}/ocaml/ppx_module_timer/ppx_module_timer.a | |
116 | %{_libdir}/ocaml/ppx_module_timer/*.cmx | |
117 | %{_libdir}/ocaml/ppx_module_timer/*.cmxa | |
118 | %{_libdir}/ocaml/ppx_module_timer/runtime/ppx_module_timer_runtime.a | |
119 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmx | |
120 | %{_libdir}/ocaml/ppx_module_timer/runtime/*.cmxa | |
121 | %endif | |
122 | %{_libdir}/ocaml/ppx_module_timer/dune-package | |
123 | %{_libdir}/ocaml/ppx_module_timer/opam |