]> git.pld-linux.org Git - packages/ocaml-yojson.git/blob - ocaml-yojson.spec
acc4c4c682bb50bdf59d7faabf29435c1473dba8
[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:        1
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 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
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.
31
32 %description -l pl.UTF-8
33 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
34 używających tej biblioteki.
35
36 %package devel
37 Summary:        yojson binding for OCaml - development part
38 Summary(pl.UTF-8):      Wiązania yojson dla OCamla - cześć programistyczna
39 Group:          Development/Libraries
40 %requires_eq    ocaml
41
42 %description devel
43 This package contains files needed to develop OCaml programs using
44 this library.
45
46 %description devel -l pl.UTF-8
47 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
48 tej biblioteki.
49
50 %prep
51 %setup -q -n %{module}-%{version}
52
53 %build
54 %{__make} -j1 all %{?with_opt:opt} \
55         CC="%{__cc} %{rpmcflags} -fPIC"
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml}
60 %{__make} install \
61         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
62         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 # move to dir pld ocamlfind looks
66 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
67 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{,site-lib/}%{module}/META
68 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
69 directory="+%{module}"
70 EOF
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files devel
76 %defattr(644,root,root,755)
77 %doc LICENSE
78 %dir %{_libdir}/ocaml/%{module}
79 %{_libdir}/ocaml/%{module}/*.cm[ix]
80 %{_libdir}/ocaml/%{module}/*.cm[ao]
81 %{_libdir}/ocaml/%{module}/*.mli
82 %if %{with opt}
83 %attr(755,root,root) %{_bindir}/ydump
84 %{_libdir}/ocaml/%{module}/*.[ao]
85 #%{_libdir}/ocaml/%{module}/*.cmxa
86 %endif
87 %{_libdir}/ocaml/site-lib/%{module}
This page took 0.052522 seconds and 2 git commands to generate.