]> git.pld-linux.org Git - packages/ocaml-bigarray-compat.git/blob - ocaml-bigarray-compat.spec
fb05296f356ee9a626b65385eeecd4c6d686f1a5
[packages/ocaml-bigarray-compat.git] / ocaml-bigarray-compat.spec
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 %define         _enable_debug_packages  0
11
12 %define         module  bigarray-compat
13 Summary:        Compatibility library to use Stdlib.Bigarray when possible
14 Name:           ocaml-%{module}
15 Version:        1.0.0
16 Release:        1
17 License:        ISC
18 Source0:        https://github.com/mirage/bigarray-compat/archive/v%{version}/%{module}-%{version}.tar.gz
19 # Source0-md5:  1cc7c25382a8900bada34aadfd66632e
20 URL:            https://github.com/mirage/bigarray-compat
21 BuildRequires:  ocaml >= 4.03.0
22 BuildRequires:  ocaml-dune >= 1.0
23 %requires_eq    ocaml-runtime
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Bigarray-compat is an OCaml library that exposes `Stdlib.Bigarray`
28 when possible (OCaml >= 4.07) but can fallback to `Bigarray`. The
29 compability bigarray module is exposed under `Bigarray_compat`.
30
31 %package        devel
32 Summary:        Development files for %{name}
33 Requires:       %{name} = %{version}-%{release}
34 %requires_eq ocaml
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 -n %{module}-%{version}
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 README.md
56 %dir %{_libdir}/ocaml/bigarray-compat
57 %{_libdir}/ocaml/bigarray-compat/META
58 %{_libdir}/ocaml/bigarray-compat/*.cma
59 %{_libdir}/ocaml/bigarray-compat/*.cmi
60 %if %{with ocaml_opt}
61 %attr(755,root,root) %{_libdir}/ocaml/bigarray-compat/*.cmxs
62 %endif
63
64 %files devel
65 %defattr(644,root,root,755)
66 %{_libdir}/ocaml/bigarray-compat/dune-package
67 %{_libdir}/ocaml/bigarray-compat/opam
68 %if %{with ocaml_opt}
69 %{_libdir}/ocaml/bigarray-compat/*.a
70 %{_libdir}/ocaml/bigarray-compat/*.cmx
71 %{_libdir}/ocaml/bigarray-compat/*.cmxa
72 %endif
73 %{_libdir}/ocaml/bigarray-compat/*.cmt
This page took 0.09276 seconds and 2 git commands to generate.