]> git.pld-linux.org Git - packages/ocaml-xmlm.git/blob - ocaml-xmlm.spec
cc4eb2dfe5850798673f9cbd63a78124b8665766
[packages/ocaml-xmlm.git] / ocaml-xmlm.spec
1 # TODO: odoc
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 %define         module  xmlm
12 %define         debug_package   %{nil}
13 Summary:        OCaml XML manipulation module
14 Summary(pl.UTF-8):      Moduł OCamla do operacji na XML-u
15 Name:           ocaml-%{module}
16 Version:        1.3.0
17 Release:        2
18 License:        ISC
19 Group:          Libraries
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
27 %requires_eq    ocaml-runtime
28 Conflicts:      ocaml-xmlm-devel < 1.3.0
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Xmlm allows the OCaml programmer to manipulate XML data. Its
33 complexity is half-way between the easy xml-light module and a full
34 parsing of XML data. It is also very simple to upgrade existing code
35 using xml-light in order to use xmlm.
36
37 %description -l pl.UTF-8
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.
42
43 %package devel
44 Summary:        xmlm binding for OCaml - development part
45 Summary(pl.UTF-8):      Wiązania xmlm dla OCamla - cześć programistyczna
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
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
55 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
56 używających biblioteki xmlm.
57
58 %prep
59 %setup -q -n %{module}-%{version}
60
61 %build
62 ocaml pkg/pkg.ml build
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}
67
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
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
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
87 %files devel
88 %defattr(644,root,root,755)
89 %doc src/*.mli
90 %{_libdir}/ocaml/xmlm/*.cmi
91 %{_libdir}/ocaml/xmlm/*.cmt
92 %{_libdir}/ocaml/xmlm/*.cmti
93 %{_libdir}/ocaml/xmlm/*.mli
94 %if %{with ocaml_opt}
95 %{_libdir}/ocaml/xmlm/*.cmx
96 %{_libdir}/ocaml/xmlm/*.cmxa
97 %{_libdir}/ocaml/xmlm/*.a
98 %endif
99 %{_libdir}/ocaml/xmlm/opam
This page took 0.113554 seconds and 2 git commands to generate.