]> git.pld-linux.org Git - packages/ocaml-yojson.git/blame - ocaml-yojson.spec
- new
[packages/ocaml-yojson.git] / ocaml-yojson.spec
CommitLineData
c387939e
ER
1#
2# Conditional build:
b063ee86 3%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
26f5462e 4
b063ee86
JB
5# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
26f5462e
JR
7%undefine with_ocaml_opt
8%endif
c387939e 9
2c1e68e3 10%define module yojson
c387939e
ER
11%define debug_package %{nil}
12Summary: JSON library for OCaml
cbc6980f 13Summary(pl.UTF-8): Biblioteka JSON dla OCamla
2c1e68e3 14Name: ocaml-%{module}
b9f19bb4 15Version: 1.7.0
def79497 16Release: 4
c387939e
ER
17License: BSD
18Group: Libraries
80ff84d1 19#Source0Download: https://github.com/ocaml-community/yojson/releases
b9f19bb4
JR
20Source0: https://github.com/ocaml-community/yojson/releases/download/%{version}/%{module}-%{version}.tbz
21# Source0-md5: b89d39ca3f8c532abe5f547ad3b8f84d
22URL: https://github.com/ocaml-community/yojson
72311284 23BuildRequires: cppo >= 1.5.0
b063ee86
JB
24BuildRequires: ocaml >= 1:4.02.3
25BuildRequires: ocaml-biniou-devel >= 1.2.0
b9f19bb4 26BuildRequires: ocaml-dune
c387939e
ER
27BuildRequires: ocaml-easy-format-devel >= 1.0.1
28BuildRequires: ocaml-findlib >= 1.4
29%requires_eq ocaml-runtime
b063ee86 30Requires: ocaml-biniou >= 1.2.0
14a8d409 31Requires: ocaml-easy-format >= 1.0.1
c387939e
ER
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35Yojson is an optimized parsing and printing library for the JSON
36format. It addresses a few shortcomings of json-wheel including 3x
37speed improvement, polymorphic variants and optional syntax for tuples
cbc6980f 38and variants.
c387939e
ER
39
40%description -l pl.UTF-8
cbc6980f
JB
41Yojson to zoptymalizowana biblioteka do analizy i wypisywania formatu
42JSON. Wychodzi naprzeciw kilku ograniczeniom biblioteki json-wheel,
43m.in. daje trzykrotne przyspieszenie, warianty polimorficzne i
44składnię opcjonalną dla krotek i wariantów.
c387939e
ER
45
46%package devel
cbc6980f 47Summary: JSON library for OCaml - development part
e811cfc4 48Summary(pl.UTF-8): Biblioteka JSON dla OCamla - część programistyczna
c387939e 49Group: Development/Libraries
a49967bb 50Requires: %{name} = %{version}-%{release}
cbc6980f 51%requires_eq ocaml
b063ee86 52Requires: ocaml-biniou-devel >= 1.2.0
14a8d409 53Requires: ocaml-easy-format-devel >= 1.0.1
c387939e
ER
54
55%description devel
56This package contains files needed to develop OCaml programs using
57this library.
58
59%description devel -l pl.UTF-8
cbc6980f
JB
60Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
61używających biblioteki yojson.
c387939e
ER
62
63%prep
2c1e68e3 64%setup -q -n %{module}-%{version}
c387939e
ER
65
66%build
b063ee86 67dune build --verbose
c387939e
ER
68
69%install
70rm -rf $RPM_BUILD_ROOT
b063ee86
JB
71
72dune install --destdir=$RPM_BUILD_ROOT
73
74# sources
75%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}/*.ml
76# packaged as %doc
77%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/%{module}
c387939e 78
c387939e
ER
79%clean
80rm -rf $RPM_BUILD_ROOT
81
a49967bb
JR
82%files
83%defattr(644,root,root,755)
b063ee86
JB
84%doc LICENSE.md README.md
85%dir %{_libdir}/ocaml/yojson
2e761ba0 86%{_libdir}/ocaml/yojson/META
b063ee86 87%{_libdir}/ocaml/yojson/*.cma
26f5462e 88%if %{with ocaml_opt}
b063ee86
JB
89%attr(755,root,root) %{_bindir}/ydump
90%attr(755,root,root) %{_libdir}/ocaml/yojson/*.cmxs
26f5462e 91%endif
a49967bb 92
c387939e
ER
93%files devel
94%defattr(644,root,root,755)
b063ee86
JB
95%{_libdir}/ocaml/yojson/*.cmi
96%{_libdir}/ocaml/yojson/*.cmt
97%{_libdir}/ocaml/yojson/*.cmti
98%{_libdir}/ocaml/yojson/*.mli
26f5462e 99%if %{with ocaml_opt}
b063ee86
JB
100%{_libdir}/ocaml/yojson/*.a
101%{_libdir}/ocaml/yojson/*.cmx
102%{_libdir}/ocaml/yojson/*.cmxa
2c1e68e3 103%endif
b063ee86
JB
104%{_libdir}/ocaml/yojson/dune-package
105%{_libdir}/ocaml/yojson/opam
This page took 1.47263 seconds and 4 git commands to generate.