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