]> git.pld-linux.org Git - packages/ocaml-yojson.git/blame - ocaml-yojson.spec
- added main package with native plugins for dynamic loading
[packages/ocaml-yojson.git] / ocaml-yojson.spec
CommitLineData
c387939e
ER
1#
2# Conditional build:
2c1e68e3 3%bcond_without opt # build opt
c387939e 4
2c1e68e3 5%define module yojson
c387939e
ER
6%define debug_package %{nil}
7Summary: JSON library for OCaml
2c1e68e3 8Name: ocaml-%{module}
2b97a4c9 9Version: 1.1.8
c387939e
ER
10Release: 1
11License: BSD
12Group: Libraries
13Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz
2b97a4c9 14# Source0-md5: e3c53004f74410c3835d851b02c1bf21
c387939e
ER
15URL: http://mjambon.com/yojson.html
16BuildRequires: cppo >= 0.9.3
17BuildRequires: ocaml >= 3.04-7
18BuildRequires: ocaml-biniou-devel >= 1.0.6
19BuildRequires: ocaml-easy-format-devel >= 1.0.1
20BuildRequires: ocaml-findlib >= 1.4
21%requires_eq ocaml-runtime
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%description
25Yojson is an optimized parsing and printing library for the JSON
26format. It addresses a few shortcomings of json-wheel including 3x
27speed improvement, polymorphic variants and optional syntax for tuples
28and variants. . It is a replacement for json-wheel
29(libjson-wheel-ocaml-dev). . This package contain the development
30files needed for programming with the library.
31
32%description -l pl.UTF-8
33Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34używających tej biblioteki.
35
36%package devel
37Summary: yojson binding for OCaml - development part
38Summary(pl.UTF-8): Wiązania yojson dla OCamla - cześć programistyczna
39Group: Development/Libraries
40%requires_eq ocaml
a49967bb 41Requires: %{name} = %{version}-%{release}
c387939e
ER
42
43%description devel
44This package contains files needed to develop OCaml programs using
45this library.
46
47%description devel -l pl.UTF-8
48Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
49tej biblioteki.
50
51%prep
2c1e68e3 52%setup -q -n %{module}-%{version}
c387939e
ER
53
54%build
55%{__make} -j1 all %{?with_opt:opt} \
56 CC="%{__cc} %{rpmcflags} -fPIC"
57
58%install
59rm -rf $RPM_BUILD_ROOT
2c1e68e3
ER
60install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml}
61%{__make} install \
62 OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
63 PREFIX=$RPM_BUILD_ROOT%{_prefix} \
64 DESTDIR=$RPM_BUILD_ROOT
c387939e 65
2c1e68e3 66# move to dir pld ocamlfind looks
ce1e9b9d 67install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
2c1e68e3
ER
68mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{,site-lib/}%{module}/META
69cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
70directory="+%{module}"
c387939e
ER
71EOF
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
a49967bb
JR
76%files
77%defattr(644,root,root,755)
78%dir %{_libdir}/ocaml/%{module}
79%{_libdir}/ocaml/%{module}/*.cmxs
80%{_libdir}/ocaml/site-lib/%{module}
81
c387939e
ER
82%files devel
83%defattr(644,root,root,755)
2c1e68e3 84%doc LICENSE
2c1e68e3
ER
85%{_libdir}/ocaml/%{module}/*.cm[ix]
86%{_libdir}/ocaml/%{module}/*.cm[ao]
87%{_libdir}/ocaml/%{module}/*.mli
88%if %{with opt}
89%attr(755,root,root) %{_bindir}/ydump
90%{_libdir}/ocaml/%{module}/*.[ao]
91#%{_libdir}/ocaml/%{module}/*.cmxa
92%endif
This page took 0.076863 seconds and 4 git commands to generate.