]> git.pld-linux.org Git - packages/ocaml-yojson.git/blame - ocaml-yojson.spec
Release 4 (by relup.sh)
[packages/ocaml-yojson.git] / ocaml-yojson.spec
CommitLineData
c387939e
ER
1#
2# Conditional build:
26f5462e
JR
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
5# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
6%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
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
2c1e68e3 13Name: ocaml-%{module}
b9f19bb4 14Version: 1.7.0
def79497 15Release: 4
c387939e
ER
16License: BSD
17Group: Libraries
b9f19bb4
JR
18Source0: https://github.com/ocaml-community/yojson/releases/download/%{version}/%{module}-%{version}.tbz
19# Source0-md5: b89d39ca3f8c532abe5f547ad3b8f84d
20URL: https://github.com/ocaml-community/yojson
72311284 21BuildRequires: cppo >= 1.5.0
c387939e
ER
22BuildRequires: ocaml >= 3.04-7
23BuildRequires: ocaml-biniou-devel >= 1.0.6
b9f19bb4 24BuildRequires: ocaml-dune
c387939e
ER
25BuildRequires: ocaml-easy-format-devel >= 1.0.1
26BuildRequires: ocaml-findlib >= 1.4
b9f19bb4 27BuildRequires: ocamlbuild-cppo >= 1.6.1
c387939e 28%requires_eq ocaml-runtime
14a8d409
JR
29Requires: ocaml-biniou >= 1.0.6
30Requires: ocaml-easy-format >= 1.0.1
c387939e
ER
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Yojson is an optimized parsing and printing library for the JSON
35format. It addresses a few shortcomings of json-wheel including 3x
36speed improvement, polymorphic variants and optional syntax for tuples
37and variants. . It is a replacement for json-wheel
38(libjson-wheel-ocaml-dev). . This package contain the development
39files needed for programming with the library.
40
41%description -l pl.UTF-8
42Pakiet ten zawiera binaria potrzebne do uruchamiania programów
43używających tej biblioteki.
44
45%package devel
46Summary: yojson binding for OCaml - development part
47Summary(pl.UTF-8): Wiązania yojson dla OCamla - cześć programistyczna
48Group: Development/Libraries
b9f19bb4 49%requires_eq ocaml
a49967bb 50Requires: %{name} = %{version}-%{release}
14a8d409
JR
51Requires: ocaml-biniou-devel >= 1.0.6
52Requires: ocaml-easy-format-devel >= 1.0.1
c387939e
ER
53
54%description devel
55This package contains files needed to develop OCaml programs using
56this library.
57
58%description devel -l pl.UTF-8
59Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
60tej biblioteki.
61
62%prep
2c1e68e3 63%setup -q -n %{module}-%{version}
c387939e
ER
64
65%build
b9f19bb4 66dune build
c387939e
ER
67
68%install
69rm -rf $RPM_BUILD_ROOT
2c1e68e3
ER
70install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml}
71%{__make} install \
72 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
73 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
74 DESTDIR=$RPM_BUILD_ROOT
c387939e 75
c387939e
ER
76%clean
77rm -rf $RPM_BUILD_ROOT
78
a49967bb
JR
79%files
80%defattr(644,root,root,755)
b9f19bb4 81%doc README.md
a49967bb 82%dir %{_libdir}/ocaml/%{module}
2e761ba0 83%{_libdir}/ocaml/yojson/META
b9f19bb4
JR
84%{_libdir}/ocaml/yojson/dune-package
85%{_libdir}/ocaml/yojson/opam
26f5462e 86%if %{with ocaml_opt}
a49967bb 87%{_libdir}/ocaml/%{module}/*.cmxs
26f5462e 88%endif
a49967bb 89
c387939e
ER
90%files devel
91%defattr(644,root,root,755)
b9f19bb4 92%doc LICENSE.md
2c1e68e3
ER
93%{_libdir}/ocaml/%{module}/*.cm[ix]
94%{_libdir}/ocaml/%{module}/*.cm[ao]
95%{_libdir}/ocaml/%{module}/*.mli
26f5462e 96%if %{with ocaml_opt}
2c1e68e3
ER
97%attr(755,root,root) %{_bindir}/ydump
98%{_libdir}/ocaml/%{module}/*.[ao]
b9f19bb4 99%{_libdir}/ocaml/%{module}/*.cmxa
2c1e68e3 100%endif
b9f19bb4
JR
101%{_libdir}/ocaml/yojson/yojson.cmt
102%{_libdir}/ocaml/yojson/yojson.cmti
103%{_libdir}/ocaml/yojson/yojson_biniou.cmt
104%{_libdir}/ocaml/yojson/yojson_biniou.cmti
This page took 0.035407 seconds and 4 git commands to generate.