]>
Commit | Line | Data |
---|---|---|
e4f66911 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building 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 | %if %{without ocaml_opt} | |
11 | %define _enable_debug_packages 0 | |
12 | %endif | |
13 | ||
14 | Summary: Various signed and unsigned integer types for OCaml | |
15 | Name: ocaml-integers | |
16 | Version: 0.4.0 | |
17 | Release: 1 | |
18 | License: MIT | |
19 | Source0: https://github.com/ocamllabs/ocaml-integers/archive/%{version}/%{name}-%{version}.tar.gz | |
20 | # Source0-md5: c1492352e6525048790508c57aad93c3 | |
21 | URL: https://github.com/ocamllabs/ocaml-integers | |
22 | BuildRequires: ocaml >= 4.02 | |
23 | BuildRequires: ocaml-dune | |
24 | %requires_eq ocaml-runtime | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | The ocaml-integers library provides a number of 8-, 16-, 32- and | |
29 | 64-bit signed and unsigned integer types, together with aliases such | |
30 | as `long` and `size_t` whose sizes depend on the host platform. | |
31 | ||
32 | %package devel | |
33 | Summary: Development files for %{name} | |
34 | Requires: %{name} = %{version}-%{release} | |
35 | ||
36 | %description devel | |
37 | This package contains libraries and signature files for developing | |
38 | applications that use %{name}. | |
39 | ||
40 | %prep | |
41 | %setup -q | |
42 | ||
43 | %build | |
44 | dune build %{?_smp_mflags} | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | dune install --destdir=$RPM_BUILD_ROOT | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %doc CHANGES.md README.md | |
56 | %dir %{_libdir}/ocaml/integers | |
57 | %dir %{_libdir}/ocaml/integers/top | |
58 | %{_libdir}/ocaml/integers/META | |
59 | %{_libdir}/ocaml/integers/*.cma | |
60 | %{_libdir}/ocaml/integers/*.cmi | |
61 | %{_libdir}/ocaml/integers/top/*.cma | |
62 | %{_libdir}/ocaml/integers/top/*.cmi | |
63 | %if %{with ocaml_opt} | |
64 | %attr(755,root,root) %{_libdir}/ocaml/integers/*.cmxs | |
65 | %endif | |
66 | %{_libdir}/ocaml/stublibs/dllintegers_stubs.so | |
67 | ||
68 | %files devel | |
69 | %defattr(644,root,root,755) | |
70 | %{_libdir}/ocaml/integers/dune-package | |
71 | %{_libdir}/ocaml/integers/opam | |
e4f66911 | 72 | %{_libdir}/ocaml/integers/*.a |
4e1868c1 | 73 | %if %{with ocaml_opt} |
e4f66911 JR |
74 | %{_libdir}/ocaml/integers/*.cmx |
75 | %{_libdir}/ocaml/integers/*.cmxa | |
76 | %endif | |
77 | %{_libdir}/ocaml/integers/*.cmt | |
78 | %{_libdir}/ocaml/integers/*.cmti | |
79 | %{_libdir}/ocaml/integers/*.h | |
80 | %{_libdir}/ocaml/integers/*.mli | |
81 | %{_libdir}/ocaml/integers/top/*.cmt | |
82 | %{_libdir}/ocaml/integers/top/*.cmti | |
83 | %{_libdir}/ocaml/integers/top/*.mli |