]>
Commit | Line | Data |
---|---|---|
fd9ca94e JR |
1 | # |
2 | # Conditional build: | |
9d3387bb | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
fd9ca94e JR |
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 | |
9d3387bb | 14 | Summary(pl.UTF-8): Biblioteka zgodności wykorzystująca Stdlib.Bigarray, jeśli istnieje |
fd9ca94e JR |
15 | Name: ocaml-%{module} |
16 | Version: 1.0.0 | |
17 | Release: 1 | |
18 | License: ISC | |
9d3387bb JB |
19 | Group: Libraries |
20 | #Source0Download: https://github.com/mirage/bigarray-compat/releases | |
fd9ca94e JR |
21 | Source0: https://github.com/mirage/bigarray-compat/archive/v%{version}/%{module}-%{version}.tar.gz |
22 | # Source0-md5: 1cc7c25382a8900bada34aadfd66632e | |
23 | URL: https://github.com/mirage/bigarray-compat | |
9d3387bb | 24 | BuildRequires: ocaml >= 1:4.03.0 |
fd9ca94e JR |
25 | BuildRequires: ocaml-dune >= 1.0 |
26 | %requires_eq ocaml-runtime | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
9d3387bb JB |
30 | Bigarray-compat is an OCaml library that exposes Stdlib.Bigarray |
31 | when possible (OCaml >= 4.07) but can fallback to Bigarray. The | |
32 | compability bigarray module is exposed under Bigarray_compat. | |
fd9ca94e | 33 | |
9d3387bb JB |
34 | %description -l pl.UTF-8 |
35 | Bigarray-compat to biblioteka OCamla w miarę możliwości eksponująca | |
36 | Stdlib.Bigarray (OCaml >= 4.07), ale potrafiąca wykorzystać Bigarray. | |
37 | Moduł zgodności z bigarray jest dostępny jako Bigarray_compat. | |
38 | ||
39 | %package devel | |
40 | Summary: Development files for OCaml bigarray-compat library | |
41 | Summary(pl.UTF-8): Pliki programistyczne biblioteki OCamla bigarray-compat | |
42 | Group: Development/Libraries | |
fd9ca94e | 43 | Requires: %{name} = %{version}-%{release} |
9d3387bb | 44 | %requires_eq ocaml |
fd9ca94e | 45 | |
9d3387bb | 46 | %description devel |
fd9ca94e | 47 | This package contains libraries and signature files for developing |
9d3387bb JB |
48 | applications that use OCaml bigarray-compat library. |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
52 | wykorzystujących bibliotekę OCamla bigarray-compat. | |
fd9ca94e JR |
53 | |
54 | %prep | |
55 | %setup -q -n %{module}-%{version} | |
56 | ||
57 | %build | |
9d3387bb | 58 | dune build %{?_smp_mflags} --display=verbose |
fd9ca94e JR |
59 | |
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
9d3387bb | 62 | |
fd9ca94e JR |
63 | dune install --destdir=$RPM_BUILD_ROOT |
64 | ||
9d3387bb JB |
65 | # sources |
66 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/bigarray-compat/*.ml | |
67 | # packaged as %doc | |
68 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/bigarray-compat | |
69 | ||
fd9ca94e JR |
70 | %clean |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc README.md | |
76 | %dir %{_libdir}/ocaml/bigarray-compat | |
77 | %{_libdir}/ocaml/bigarray-compat/META | |
78 | %{_libdir}/ocaml/bigarray-compat/*.cma | |
fd9ca94e JR |
79 | %if %{with ocaml_opt} |
80 | %attr(755,root,root) %{_libdir}/ocaml/bigarray-compat/*.cmxs | |
81 | %endif | |
82 | ||
83 | %files devel | |
84 | %defattr(644,root,root,755) | |
85 | %{_libdir}/ocaml/bigarray-compat/dune-package | |
86 | %{_libdir}/ocaml/bigarray-compat/opam | |
9d3387bb JB |
87 | %{_libdir}/ocaml/bigarray-compat/*.cmi |
88 | %{_libdir}/ocaml/bigarray-compat/*.cmt | |
fd9ca94e JR |
89 | %if %{with ocaml_opt} |
90 | %{_libdir}/ocaml/bigarray-compat/*.a | |
91 | %{_libdir}/ocaml/bigarray-compat/*.cmx | |
92 | %{_libdir}/ocaml/bigarray-compat/*.cmxa | |
93 | %endif |