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: Report the current time
11 Summary(pl.UTF-8): Informacja o aktualnym czase
17 #Source0Download: https://github.com/janestreet/time_now/tags
18 Source0: https://github.com/janestreet/time_now/archive/v%{version}/time_now-%{version}.tar.gz
19 # Source0-md5: 2c72607b27ce0a25be6d6390447633bc
20 URL: https://github.com/janestreet/time_now
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-jane-street-headers-devel >= 0.14
26 BuildRequires: ocaml-jane-street-headers-devel < 0.15
27 BuildRequires: ocaml-jst-config-devel >= 0.14
28 BuildRequires: ocaml-jst-config-devel < 0.15
29 BuildRequires: ocaml-ppx_base-devel >= 0.14
30 BuildRequires: ocaml-ppx_base-devel < 0.15
31 BuildRequires: ocaml-ppx_optcomp-devel >= 0.14
32 BuildRequires: ocaml-ppx_optcomp-devel < 0.15
33 BuildRequires: ocaml-ppxlib-devel >= 0.11.0
34 %requires_eq ocaml-runtime
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Provides a single function to report the current time in nanoseconds
39 since the start of the Unix epoch.
41 This package contains files needed to run bytecode executables using
44 %description -l pl.UTF-8
45 Ten moduł udostępnia jedną funkcję, zwracającą aktualny czas w
46 nanosekundach od początku epoki Uniksa.
48 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49 używających biblioteki time_now.
52 Summary: Report the current time - development part
53 Summary(pl.UTF-8): Informacja o aktualnym czase - cześć programistyczna
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
57 Requires: ocaml-base-devel >= 0.14
58 Requires: ocaml-jane-street-headers-devel >= 0.14
59 Requires: ocaml-jst-config-devel >= 0.14
60 Requires: ocaml-ppx_base-devel >= 0.14
61 Requires: ocaml-ppx_optcomp-devel >= 0.14
62 Requires: ocaml-ppxlib-devel >= 0.11.0
65 This package contains files needed to develop OCaml programs using
68 %description devel -l pl.UTF-8
69 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
70 używających biblioteki time_now.
73 %setup -q -n time_now-%{version}
79 rm -rf $RPM_BUILD_ROOT
81 dune install --destdir=$RPM_BUILD_ROOT
84 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/time_now/*.ml
86 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/time_now
89 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
94 %dir %{_libdir}/ocaml/time_now
95 %{_libdir}/ocaml/time_now/META
96 %{_libdir}/ocaml/time_now/runtime.js
97 %{_libdir}/ocaml/time_now/*.cma
99 %attr(755,root,root) %{_libdir}/ocaml/time_now/*.cmxs
101 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltime_now_stubs.so
104 %defattr(644,root,root,755)
105 %{_libdir}/ocaml/time_now/libtime_now_stubs.a
106 %{_libdir}/ocaml/time_now/*.cmi
107 %{_libdir}/ocaml/time_now/*.cmt
108 %{_libdir}/ocaml/time_now/*.cmti
109 %{_libdir}/ocaml/time_now/*.mli
110 %if %{with ocaml_opt}
111 %{_libdir}/ocaml/time_now/time_now.a
112 %{_libdir}/ocaml/time_now/*.cmx
113 %{_libdir}/ocaml/time_now/*.cmxa
115 %{_libdir}/ocaml/time_now/dune-package
116 %{_libdir}/ocaml/time_now/opam