]>
Commit | Line | Data |
---|---|---|
4d73a89c ER |
1 | # |
2 | # Conditional build: | |
1153ea1a | 3 | %bcond_without ocaml_opt # build opt (native code) |
4d73a89c | 4 | |
cf5c4029 | 5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
037fbb73 JB |
6 | %undefine with_ocaml_opt |
7 | %endif | |
8 | ||
dcf67d86 | 9 | %define module easy-format |
4d73a89c | 10 | Summary: easy(ier) pretty printing for OCaml |
1153ea1a | 11 | Summary(pl.UTF-8): Łatwiejsze ładne wypisywanie dla OCamla |
dcf67d86 | 12 | Name: ocaml-%{module} |
cf5c4029 JB |
13 | Version: 1.3.2 |
14 | Release: 1 | |
4d73a89c ER |
15 | License: BSD |
16 | Group: Libraries | |
cf5c4029 JB |
17 | #Source0Download: https://github.com/ocaml-community/easy-format/releases |
18 | Source0: https://github.com/ocaml-community/easy-format/releases/download/%{version}/%{module}-%{version}.tbz | |
19 | # Source0-md5: 8e8e2da60d3566ab1bce5e5784ae75f9 | |
20 | # https://github.com/ocaml-community/easy-format/commit/c6d5ab5ef62e7a1ec20ae8a22a39b0f06ad710a8.patch | |
21 | Patch0: %{name}-compile.patch | |
22 | URL: https://github.com/ocaml-community/easy-format | |
23 | BuildRequires: ocaml >= 1:4.02.3 | |
24 | BuildRequires: ocaml-dune >= 1.10 | |
25 | BuildRequires: ocaml-findlib | |
4d73a89c ER |
26 | %requires_eq ocaml-runtime |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
dcf67d86 ER |
29 | %define debug_package %{nil} |
30 | ||
4d73a89c | 31 | %description |
1153ea1a JB |
32 | easy-format module offers a simplified interface to the Format module |
33 | of the OCaml standard library. Input data must be converted into a | |
34 | tree using 3 kinds of nodes: atoms, lists and labelled nodes. Each | |
35 | node is bound to its own formatting parameters and a single function | |
36 | call produces the formatted output. | |
4d73a89c ER |
37 | |
38 | %description -l pl.UTF-8 | |
1153ea1a JB |
39 | Moduł easy-format oferuje uproszczony interfejs do modułu Format |
40 | biblioteki standardowej OCamla. Dane wejściowe muszą być | |
41 | przekonwertowane do drzewa z użyciem trzech rodzajów węzłów: atomów, | |
42 | list oraz węzłów z etykietami. Każdy węzeł jest powiązany z | |
43 | parametrami formatującymi, a pojedyncze wywołanie funkcji tworzy | |
44 | sformatowane wyjście. | |
4d73a89c ER |
45 | |
46 | %package devel | |
47 | Summary: easy-format binding for OCaml - development part | |
48 | Summary(pl.UTF-8): Wiązania easy-format dla OCamla - cześć programistyczna | |
49 | Group: Development/Libraries | |
50 | %requires_eq ocaml | |
be589c54 | 51 | Requires: %{name} = %{version}-%{release} |
4d73a89c ER |
52 | |
53 | %description devel | |
1153ea1a JB |
54 | easy-format module offers a simplified interface to the Format module |
55 | of the OCaml standard library. Input data must be converted into a | |
56 | tree using 3 kinds of nodes: atoms, lists and labelled nodes. Each | |
57 | node is bound to its own formatting parameters and a single function | |
58 | call produces the formatted output. | |
59 | ||
4d73a89c | 60 | This package contains files needed to develop OCaml programs using |
1153ea1a | 61 | easy-format library. |
4d73a89c ER |
62 | |
63 | %description devel -l pl.UTF-8 | |
1153ea1a JB |
64 | Moduł easy-format oferuje uproszczony interfejs do modułu Format |
65 | biblioteki standardowej OCamla. Dane wejściowe muszą być | |
66 | przekonwertowane do drzewa z użyciem trzech rodzajów węzłów: atomów, | |
67 | list oraz węzłów z etykietami. Każdy węzeł jest powiązany z | |
68 | parametrami formatującymi, a pojedyncze wywołanie funkcji tworzy | |
69 | sformatowane wyjście. | |
70 | ||
4d73a89c | 71 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających |
1153ea1a | 72 | biblioteki easy-format. |
4d73a89c ER |
73 | |
74 | %prep | |
dcf67d86 | 75 | %setup -q -n %{module}-%{version} |
cf5c4029 | 76 | %patch0 -p1 |
4d73a89c ER |
77 | |
78 | %build | |
cf5c4029 | 79 | dune build @all %{?_smp_mflags} --display=verbose |
4d73a89c ER |
80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
1153ea1a | 83 | |
cf5c4029 JB |
84 | dune install --destdir=$RPM_BUILD_ROOT |
85 | ||
86 | # just sources | |
87 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}/easy_format.ml | |
88 | # packaged as %doc | |
89 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/%{module} | |
4d73a89c | 90 | |
4d73a89c ER |
91 | %clean |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
a91c78de JR |
94 | %files |
95 | %defattr(644,root,root,755) | |
cf5c4029 | 96 | %doc CHANGES.md LICENSE README.md |
a91c78de | 97 | %dir %{_libdir}/ocaml/%{module} |
2be8dd26 | 98 | %{_libdir}/ocaml/%{module}/META |
cf5c4029 | 99 | %{_libdir}/ocaml/%{module}/easy_format.cma |
278e611d JB |
100 | %if %{with ocaml_opt} |
101 | %attr(755,root,root) %{_libdir}/ocaml/%{module}/easy_format.cmxs | |
1153ea1a | 102 | %endif |
a91c78de | 103 | |
4d73a89c ER |
104 | %files devel |
105 | %defattr(644,root,root,755) | |
cf5c4029 JB |
106 | %{_libdir}/ocaml/%{module}/dune-package |
107 | %{_libdir}/ocaml/%{module}/opam | |
278e611d | 108 | %{_libdir}/ocaml/%{module}/easy_format.cmi |
cf5c4029 | 109 | %{_libdir}/ocaml/%{module}/easy_format.cmt* |
1153ea1a | 110 | # doc? |
278e611d | 111 | %{_libdir}/ocaml/%{module}/easy_format.mli |
1153ea1a | 112 | %if %{with ocaml_opt} |
cf5c4029 | 113 | %{_libdir}/ocaml/%{module}/easy_format.a |
278e611d | 114 | %{_libdir}/ocaml/%{module}/easy_format.cmx |
cf5c4029 | 115 | %{_libdir}/ocaml/%{module}/easy_format.cmxa |
9b7f6652 | 116 | %endif |