]> git.pld-linux.org Git - packages/ocaml-time_now.git/blob - ocaml-time_now.spec
62097722c8c6596dcac114ef90f60c1bb8d1743e
[packages/ocaml-time_now.git] / ocaml-time_now.spec
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:        Report the current time
11 Summary(pl.UTF-8):      Informacja o aktualnym czase
12 Name:           ocaml-time_now
13 Version:        0.14.0
14 Release:        1
15 License:        MIT
16 Group:          Libraries
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)
36
37 %description
38 Provides a single function to report the current time in nanoseconds
39 since the start of the Unix epoch.
40
41 This package contains files needed to run bytecode executables using
42 time_now library.
43
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.
47
48 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49 używających biblioteki time_now.
50
51 %package devel
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}
56 %requires_eq    ocaml
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
63
64 %description devel
65 This package contains files needed to develop OCaml programs using
66 time_now library.
67
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.
71
72 %prep
73 %setup -q -n time_now-%{version}
74
75 %build
76 dune build --verbose
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 dune install --destdir=$RPM_BUILD_ROOT
82
83 # sources
84 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/time_now/*.ml
85 # packaged as %doc
86 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/time_now
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc LICENSE.md
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
98 %if %{with ocaml_opt}
99 %attr(755,root,root) %{_libdir}/ocaml/time_now/*.cmxs
100 %endif
101 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlltime_now_stubs.so
102
103 %files devel
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
114 %endif
115 %{_libdir}/ocaml/time_now/dune-package
116 %{_libdir}/ocaml/time_now/opam
This page took 0.06292 seconds and 2 git commands to generate.