]> git.pld-linux.org Git - packages/ocaml-biniou.git/blob - ocaml-biniou.spec
ad7e6f7b0e65db8efb4e78bc0fc801df1120db20
[packages/ocaml-biniou.git] / ocaml-biniou.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define         module  biniou
6 Summary:        Flexible binary data format in OCaml
7 Summary(pl.UTF-8):      Wiązania biniou dla OCamla
8 Name:           ocaml-%{module}
9 Version:        1.0.9
10 Release:        1
11 License:        BSD
12 Group:          Libraries
13 Source0:        http://mjambon.com/releases/biniou/%{module}-%{version}.tar.gz
14 # Source0-md5:  2f9f355281817912ac04c589eb463ef2
15 URL:            http://martin.jambon.free.fr/biniou.html
16 BuildRequires:  ocaml >= 3.04-7
17 BuildRequires:  ocaml-easy-format-devel >= 1.0.1
18 BuildRequires:  ocaml-findlib >= 1.4
19 %requires_eq    ocaml-runtime
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         debug_package   %{nil}
23
24 %description
25 Biniou is a binary data format designed for speed, safety, ease of use
26 and backward compatibility as protocols evolve. Biniou is vastly
27 equivalent to JSON in terms of functionality but allows
28 implementations about 4 times as fast (see godi-yojson for
29 comparison), with 25-35% space savings. Biniou data can be decoded
30 into human-readable form without knowledge of type definitions except
31 for field and variant names which are represented by 31-bit hashes.
32
33 %description -l pl.UTF-8
34 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
35 używających tej biblioteki.
36
37 %package devel
38 Summary:        biniou binding for OCaml - development part
39 Summary(pl.UTF-8):      Wiązania biniou dla OCamla - cześć programistyczna
40 Group:          Development/Libraries
41 %requires_eq    ocaml
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 This package contains files needed to develop OCaml programs using
46 this library.
47
48 %description devel -l pl.UTF-8
49 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
50 tej biblioteki.
51
52 %prep
53 %setup -q -n %{module}-%{version}
54
55 %build
56 %{__make} -j1 all %{?with_opt:opt} \
57         CC="%{__cc} %{rpmcflags} -fPIC"
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml}
62 %{__make} install \
63         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
64         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 # move to dir pld ocamlfind looks
68 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
69 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{,site-lib/}%{module}/META
70 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
71 directory="+%{module}"
72 EOF
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %dir %{_libdir}/ocaml/%{module}
80 %{_libdir}/ocaml/%{module}/*.cmxs
81 %{_libdir}/ocaml/site-lib/%{module}
82
83 %files devel
84 %defattr(644,root,root,755)
85 %doc LICENSE
86 %{_libdir}/ocaml/%{module}/*.cm[ix]
87 %{_libdir}/ocaml/%{module}/*.cm[ao]
88 %{_libdir}/ocaml/%{module}/*.mli
89 %if %{with opt}
90 %attr(755,root,root) %{_bindir}/bdump
91 %{_libdir}/ocaml/%{module}/*.[ao]
92 %{_libdir}/ocaml/%{module}/*.cmxa
93 %endif
This page took 0.186309 seconds and 2 git commands to generate.