1 |
%define _enable_debug_packages %{nil} |
2 |
%define debug_package %{nil} |
3 |
|
4 |
%define oname ppx_optcomp |
5 |
Name: ocaml-%{oname} |
6 |
Epoch: 1 |
7 |
Version: 0.10.0 |
8 |
Release: %mkrel 1 |
9 |
Summary: Optional compilation for OCaml |
10 |
License: Apache 2.0 |
11 |
Group: Development/OCaml |
12 |
URL: https://github.com/janestreet/ppx_optcomp |
13 |
Source0: https://github.com/janestreet/ppx_optcomp/archive/v%{version}.tar.gz |
14 |
BuildRequires: ocaml-findlib >= 1.3.2 |
15 |
BuildRequires: ocaml-oasis >= 0.4 |
16 |
BuildRequires: opam |
17 |
BuildRequires: ocaml-ppx_core-devel >= 1:0.10.0 |
18 |
|
19 |
%description |
20 |
Optional compilation for OCaml |
21 |
|
22 |
%package devel |
23 |
Summary: Development files for %{name} |
24 |
Group: Development/OCaml |
25 |
Requires: %{name} = %{epoch}:%{version}-%{release} |
26 |
|
27 |
%description devel |
28 |
The %{name}-devel package contains libraries and signature files for |
29 |
developing applications that use %{name}. |
30 |
|
31 |
%prep |
32 |
%setup -q -n %{oname}-%{version} |
33 |
|
34 |
%build |
35 |
jbuilder build --verbose -p %{oname} %_smp_mflags |
36 |
|
37 |
%install |
38 |
opam-installer --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml %{oname}.install |
39 |
rm -rf %buildroot/usr/doc |
40 |
|
41 |
%check |
42 |
jbuilder runtest |
43 |
|
44 |
%files |
45 |
%dir %{_libdir}/ocaml/%{oname} |
46 |
%{_bindir}/ppx-optcomp |
47 |
%{_libdir}/ocaml/%{oname}/META |
48 |
%{_libdir}/ocaml/%{oname}/*.cmi |
49 |
%{_libdir}/ocaml/%{oname}/*.cma |
50 |
%{_libdir}/ocaml/%{oname}/*.a |
51 |
%{_libdir}/ocaml/%{oname}/*.cmxa |
52 |
%{_libdir}/ocaml/%{oname}/*.cmxs |
53 |
|
54 |
%files devel |
55 |
%{_libdir}/ocaml/%{oname}/opam |
56 |
%{_libdir}/ocaml/%{oname}/*.cmt |
57 |
%{_libdir}/ocaml/%{oname}/*.cmti |
58 |
%{_libdir}/ocaml/%{oname}/*.cmx |
59 |
%{_libdir}/ocaml/%{oname}/*.mli |