- .a file only with ocaml_opt
[packages/ocaml-cmdliner.git] / ocaml-cmdliner.spec
CommitLineData
6d88e6cd
JB
1# TODO: apidocs
2#
3# Conditional build:
4%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5
6# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
7%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
8%undefine with_ocaml_opt
9%endif
10
11Summary: Declarative definition of command line interfaces for OCaml
12Summary(pl.UTF-8): Deklaratywne definiowanie interfejsów linii poleceń dla OCamla
13Name: ocaml-cmdliner
14Version: 1.0.4
15Release: 1
16License: ISC
17Group: Libraries
18Source0: https://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz
19# Source0-md5: fe2213d0bc63b1e10a2d0aa66d2fc8d9
20URL: https://erratique.ch/software/cmdliner
21BuildRequires: ocaml >= 1:4.03.0
22BuildRequires: ocaml-dune
23%requires_eq ocaml-runtime
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define debug_package %{nil}
27
28%description
29Cmdliner allows the declarative definition of command line interfaces
30for OCaml.
31
32%description -l pl.UTF-8
33Cmdliner pozwala na deklaratywne definiowanie interfejsów linii
34poleceń dla OCamla.
35
36%package devel
37Summary: Declarative definition of command line interfaces for OCaml - development part
38Summary(pl.UTF-8): Deklaratywne definiowanie interfejsów linii poleceń dla OCamla - cześć programistyczna
39Group: Development/Libraries
40Requires: %{name} = %{version}-%{release}
41%requires_eq ocaml
42
43%description devel
44This package contains files needed to develop OCaml programs using
45cmdliner library.
46
47%description devel -l pl.UTF-8
48Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
49używających biblioteki cmdliner.
50
51%prep
52%setup -q -n cmdliner-%{version}
53
54%build
55dune build --verbose
56
57%install
58rm -rf $RPM_BUILD_ROOT
59
60dune install --destdir=$RPM_BUILD_ROOT
61
62# sources
63%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/cmdliner/*.ml
64# packaged as %doc
65%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/cmdliner
66
67%clean
68rm -rf $RPM_BUILD_ROOT
69
70%files
71%defattr(644,root,root,755)
72%doc CHANGES.md LICENSE.md README.md
73%dir %{_libdir}/ocaml/cmdliner
74%{_libdir}/ocaml/cmdliner/META
75%{_libdir}/ocaml/cmdliner/*.cma
76%if %{with ocaml_opt}
77%attr(755,root,root) %{_libdir}/ocaml/cmdliner/*.cmxs
78%endif
79
80%files devel
81%defattr(644,root,root,755)
6d88e6cd
JB
82%{_libdir}/ocaml/cmdliner/*.cmi
83%{_libdir}/ocaml/cmdliner/*.cmt
84%{_libdir}/ocaml/cmdliner/*.cmti
85%{_libdir}/ocaml/cmdliner/*.mli
86%if %{with ocaml_opt}
4ae88b46 87%{_libdir}/ocaml/cmdliner/*.a
6d88e6cd
JB
88%{_libdir}/ocaml/cmdliner/*.cmx
89%{_libdir}/ocaml/cmdliner/*.cmxa
90%endif
91%{_libdir}/ocaml/cmdliner/dune-package
92%{_libdir}/ocaml/cmdliner/opam
This page took 0.048393 seconds and 4 git commands to generate.