]>
Commit | Line | Data |
---|---|---|
0a0c841b | 1 | # TODO: odoc |
a922b1d9 ER |
2 | # |
3 | # Conditional build: | |
0a0c841b | 4 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
6478751e | 5 | |
0a0c841b JB |
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 | |
6478751e JR |
8 | %undefine with_ocaml_opt |
9 | %endif | |
a922b1d9 | 10 | |
62f7ad48 | 11 | %define module xmlm |
a922b1d9 | 12 | %define debug_package %{nil} |
0a0c841b JB |
13 | Summary: OCaml XML manipulation module |
14 | Summary(pl.UTF-8): Moduł OCamla do operacji na XML-u | |
62f7ad48 | 15 | Name: ocaml-%{module} |
0a0c841b | 16 | Version: 1.3.0 |
b5622107 | 17 | Release: 2 |
0a0c841b | 18 | License: ISC |
a922b1d9 | 19 | Group: Libraries |
0a0c841b JB |
20 | Source0: https://erratique.ch/software/xmlm/releases/%{module}-%{version}.tbz |
21 | # Source0-md5: d63ce15d913975211196b5079e86a797 | |
22 | URL: https://erratique.ch/software/xmlm | |
23 | BuildRequires: ocaml >= 1:4.02.0 | |
24 | BuildRequires: ocaml-topkg >= 0.9.0 | |
25 | BuildRequires: ocaml-findlib-devel >= 1.4 | |
26 | BuildRequires: ocaml-ocamlbuild | |
a922b1d9 | 27 | %requires_eq ocaml-runtime |
5a6d8918 | 28 | Conflicts: ocaml-xmlm-devel < 1.3.0 |
a922b1d9 ER |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
0a0c841b | 32 | Xmlm allows the OCaml programmer to manipulate XML data. Its |
a922b1d9 | 33 | complexity is half-way between the easy xml-light module and a full |
0a0c841b | 34 | parsing of XML data. It is also very simple to upgrade existing code |
a922b1d9 ER |
35 | using xml-light in order to use xmlm. |
36 | ||
37 | %description -l pl.UTF-8 | |
0a0c841b JB |
38 | Xmlm pozwala programistom OCamla operować na danych XML. Złożoność tej |
39 | biblioteki mieści się między łatwym modulem xml-light, a pełną analizą | |
40 | danych XML. Bardzo proste jest też przeniesienie istniejącego kodu | |
41 | wykorzystującego xml-light, aby używał xmlm. | |
a922b1d9 ER |
42 | |
43 | %package devel | |
44 | Summary: xmlm binding for OCaml - development part | |
3b75298f | 45 | Summary(pl.UTF-8): Wiązania xmlm dla OCamla - część programistyczna |
a922b1d9 | 46 | Group: Development/Libraries |
b5622107 | 47 | Requires: %{name} = %{version}-%{release} |
a922b1d9 ER |
48 | %requires_eq ocaml |
49 | ||
50 | %description devel | |
51 | This package contains all the development stuff you need to develop | |
52 | OCaml programs which use xmlm. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
0a0c841b JB |
55 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu |
56 | używających biblioteki xmlm. | |
a922b1d9 ER |
57 | |
58 | %prep | |
62f7ad48 | 59 | %setup -q -n %{module}-%{version} |
a922b1d9 ER |
60 | |
61 | %build | |
0a0c841b | 62 | ocaml pkg/pkg.ml build |
a922b1d9 ER |
63 | |
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
0a0c841b | 66 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module} |
a922b1d9 | 67 | |
0a0c841b JB |
68 | cp -p _build/pkg/META _build/opam $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module} |
69 | cp -p _build/src/*.{cma,cmi,cmt,cmti,mli} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module} | |
70 | %if %{with ocaml_opt} | |
71 | cp -p _build/src/*.{a,cmxs,cmx,cmxa} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module} | |
72 | %endif | |
a922b1d9 ER |
73 | |
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
0a0c841b JB |
77 | %files |
78 | %defattr(644,root,root,755) | |
79 | %doc CHANGES.md LICENSE.md README.md | |
80 | %dir %{_libdir}/ocaml/xmlm | |
81 | %{_libdir}/ocaml/xmlm/META | |
82 | %{_libdir}/ocaml/xmlm/*.cma | |
83 | %if %{with ocaml_opt} | |
84 | %attr(755,root,root) %{_libdir}/ocaml/xmlm/*.cmxs | |
85 | %endif | |
86 | ||
a922b1d9 ER |
87 | %files devel |
88 | %defattr(644,root,root,755) | |
0a0c841b JB |
89 | %doc src/*.mli |
90 | %{_libdir}/ocaml/xmlm/*.cmi | |
91 | %{_libdir}/ocaml/xmlm/*.cmt | |
92 | %{_libdir}/ocaml/xmlm/*.cmti | |
93 | %{_libdir}/ocaml/xmlm/*.mli | |
6478751e | 94 | %if %{with ocaml_opt} |
0a0c841b JB |
95 | %{_libdir}/ocaml/xmlm/*.cmx |
96 | %{_libdir}/ocaml/xmlm/*.cmxa | |
97 | %{_libdir}/ocaml/xmlm/*.a | |
6478751e | 98 | %endif |
0a0c841b | 99 | %{_libdir}/ocaml/xmlm/opam |