3 %bcond_with opt # build opt
6 %define debug_package %{nil}
7 Summary: JSON library for OCaml
13 Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz
14 # Source0-md5: 7017f2009a33d08c25ab0478598c9023
15 URL: http://mjambon.com/yojson.html
16 BuildRequires: cppo >= 0.9.3
17 BuildRequires: ocaml >= 3.04-7
18 BuildRequires: ocaml-biniou-devel >= 1.0.6
19 BuildRequires: ocaml-easy-format-devel >= 1.0.1
20 BuildRequires: ocaml-findlib >= 1.4
21 %requires_eq ocaml-runtime
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Yojson is an optimized parsing and printing library for the JSON
26 format. It addresses a few shortcomings of json-wheel including 3x
27 speed improvement, polymorphic variants and optional syntax for tuples
28 and variants. . It is a replacement for json-wheel
29 (libjson-wheel-ocaml-dev). . This package contain the development
30 files needed for programming with the library.
32 %description -l pl.UTF-8
33 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34 używających tej biblioteki.
37 Summary: yojson binding for OCaml - development part
38 Summary(pl.UTF-8): Wiązania yojson dla OCamla - cześć programistyczna
39 Group: Development/Libraries
43 This package contains files needed to develop OCaml programs using
46 %description devel -l pl.UTF-8
47 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
51 %setup -q -n %{pkgname}-%{version}
54 %{__make} -j1 all %{?with_opt:opt} \
55 CC="%{__cc} %{rpmcflags} -fPIC"
58 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{%{module},stublibs}
61 cp -p *.cm[ixa]* $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}
63 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
64 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META <<EOF
66 version = "%{version}"
67 directory = "+%{module}"
68 archive(byte) = "%{module}.cma"
69 archive(native) = "%{module}.cmxa"
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
79 %dir %{_libdir}/ocaml/%{module}
80 %{_libdir}/ocaml/%{module}/*.cm[ixa]*
81 %{_libdir}/ocaml/site-lib/%{module}