]> git.pld-linux.org Git - packages/ocaml-yojson.git/blob - ocaml-yojson.spec
Release 4 (by relup.sh)
[packages/ocaml-yojson.git] / ocaml-yojson.spec
1 #
2 # Conditional build:
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
9
10 %define         module  yojson
11 %define         debug_package   %{nil}
12 Summary:        JSON library for OCaml
13 Name:           ocaml-%{module}
14 Version:        1.7.0
15 Release:        4
16 License:        BSD
17 Group:          Libraries
18 Source0:        https://github.com/ocaml-community/yojson/releases/download/%{version}/%{module}-%{version}.tbz
19 # Source0-md5:  b89d39ca3f8c532abe5f547ad3b8f84d
20 URL:            https://github.com/ocaml-community/yojson
21 BuildRequires:  cppo >= 1.5.0
22 BuildRequires:  ocaml >= 3.04-7
23 BuildRequires:  ocaml-biniou-devel >= 1.0.6
24 BuildRequires:  ocaml-dune
25 BuildRequires:  ocaml-easy-format-devel >= 1.0.1
26 BuildRequires:  ocaml-findlib >= 1.4
27 BuildRequires:  ocamlbuild-cppo >= 1.6.1
28 %requires_eq    ocaml-runtime
29 Requires:       ocaml-biniou >= 1.0.6
30 Requires:       ocaml-easy-format >= 1.0.1
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Yojson is an optimized parsing and printing library for the JSON
35 format. It addresses a few shortcomings of json-wheel including 3x
36 speed improvement, polymorphic variants and optional syntax for tuples
37 and variants. . It is a replacement for json-wheel
38 (libjson-wheel-ocaml-dev). . This package contain the development
39 files needed for programming with the library.
40
41 %description -l pl.UTF-8
42 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
43 używających tej biblioteki.
44
45 %package devel
46 Summary:        yojson binding for OCaml - development part
47 Summary(pl.UTF-8):      Wiązania yojson dla OCamla - cześć programistyczna
48 Group:          Development/Libraries
49 %requires_eq ocaml
50 Requires:       %{name} = %{version}-%{release}
51 Requires:       ocaml-biniou-devel >= 1.0.6
52 Requires:       ocaml-easy-format-devel >= 1.0.1
53
54 %description devel
55 This package contains files needed to develop OCaml programs using
56 this library.
57
58 %description devel -l pl.UTF-8
59 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
60 tej biblioteki.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64
65 %build
66 dune build
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -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
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %doc README.md
82 %dir %{_libdir}/ocaml/%{module}
83 %{_libdir}/ocaml/yojson/META
84 %{_libdir}/ocaml/yojson/dune-package
85 %{_libdir}/ocaml/yojson/opam
86 %if %{with ocaml_opt}
87 %{_libdir}/ocaml/%{module}/*.cmxs
88 %endif
89
90 %files devel
91 %defattr(644,root,root,755)
92 %doc LICENSE.md
93 %{_libdir}/ocaml/%{module}/*.cm[ix]
94 %{_libdir}/ocaml/%{module}/*.cm[ao]
95 %{_libdir}/ocaml/%{module}/*.mli
96 %if %{with ocaml_opt}
97 %attr(755,root,root) %{_bindir}/ydump
98 %{_libdir}/ocaml/%{module}/*.[ao]
99 %{_libdir}/ocaml/%{module}/*.cmxa
100 %endif
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.062739 seconds and 3 git commands to generate.