3 %bcond_without opt # build opt
5 %define module easy-format
6 Summary: easy(ier) pretty printing for OCaml
12 Source0: http://mjambon.com/releases/easy-format/%{module}-%{version}.tar.gz
13 # Source0-md5: 82f6db85477831cab11e4cfe80321225
14 URL: http://mjambon.com/easy-format.html
15 BuildRequires: ocaml >= 3.04-7
16 %requires_eq ocaml-runtime
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define debug_package %{nil}
22 This module offers a simplified interface to the Format module of the
23 OCaml standard library. Input data must be converted into a tree using
24 3 kinds of nodes: atoms, lists and labelled nodes. Each node is bound
25 to its own formatting parameters and a single function call produces
28 %description -l pl.UTF-8
29 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
30 używających tej biblioteki.
33 Summary: easy-format binding for OCaml - development part
34 Summary(pl.UTF-8): Wiązania easy-format dla OCamla - cześć programistyczna
35 Group: Development/Libraries
39 This package contains files needed to develop OCaml programs using
42 %description devel -l pl.UTF-8
43 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
47 %setup -q -n %{module}-%{version}
50 %{__make} -j1 all %{?with_opt:opt} \
51 CC="%{__cc} %{rpmcflags} -fPIC"
54 rm -rf $RPM_BUILD_ROOT
55 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
56 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
58 DESTDIR=$RPM_BUILD_ROOT
60 # move to dir pld ocamlfind looks
61 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
62 mv $OCAMLFIND_DESTDIR/%{module}/META \
63 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
64 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
65 directory="+%{module}"
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %dir %{_libdir}/ocaml/%{module}
74 %{_libdir}/ocaml/%{module}/*.cmxs
75 %{_libdir}/ocaml/site-lib/%{module}
78 %defattr(644,root,root,755)
79 %doc README.md Changes LICENSE
80 %{_libdir}/ocaml/%{module}/*.cm[xi]
81 %{_libdir}/ocaml/%{module}/*.cmo
82 %{_libdir}/ocaml/%{module}/*.mli
84 %{_libdir}/ocaml/%{module}/*.o