]>
Commit | Line | Data |
---|---|---|
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 | ||
11 | Summary: Declarative definition of command line interfaces for OCaml | |
12 | Summary(pl.UTF-8): Deklaratywne definiowanie interfejsów linii poleceń dla OCamla | |
13 | Name: ocaml-cmdliner | |
14 | Version: 1.0.4 | |
15 | Release: 1 | |
16 | License: ISC | |
17 | Group: Libraries | |
18 | Source0: https://erratique.ch/software/cmdliner/releases/cmdliner-%{version}.tbz | |
19 | # Source0-md5: fe2213d0bc63b1e10a2d0aa66d2fc8d9 | |
20 | URL: https://erratique.ch/software/cmdliner | |
21 | BuildRequires: ocaml >= 1:4.03.0 | |
22 | BuildRequires: ocaml-dune | |
23 | %requires_eq ocaml-runtime | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define debug_package %{nil} | |
27 | ||
28 | %description | |
29 | Cmdliner allows the declarative definition of command line interfaces | |
30 | for OCaml. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | Cmdliner pozwala na deklaratywne definiowanie interfejsów linii | |
34 | poleceń dla OCamla. | |
35 | ||
36 | %package devel | |
37 | Summary: Declarative definition of command line interfaces for OCaml - development part | |
38 | Summary(pl.UTF-8): Deklaratywne definiowanie interfejsów linii poleceń dla OCamla - cześć programistyczna | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | %requires_eq ocaml | |
42 | ||
43 | %description devel | |
44 | This package contains files needed to develop OCaml programs using | |
45 | cmdliner library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
49 | używających biblioteki cmdliner. | |
50 | ||
51 | %prep | |
52 | %setup -q -n cmdliner-%{version} | |
53 | ||
54 | %build | |
55 | dune build --verbose | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | dune 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 | |
68 | rm -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) | |
82 | %{_libdir}/ocaml/cmdliner/*.a | |
83 | %{_libdir}/ocaml/cmdliner/*.cmi | |
84 | %{_libdir}/ocaml/cmdliner/*.cmt | |
85 | %{_libdir}/ocaml/cmdliner/*.cmti | |
86 | %{_libdir}/ocaml/cmdliner/*.mli | |
87 | %if %{with ocaml_opt} | |
88 | %{_libdir}/ocaml/cmdliner/*.cmx | |
89 | %{_libdir}/ocaml/cmdliner/*.cmxa | |
90 | %endif | |
91 | %{_libdir}/ocaml/cmdliner/dune-package | |
92 | %{_libdir}/ocaml/cmdliner/opam |