]> git.pld-linux.org Git - packages/ocaml-easy-format.git/blob - ocaml-easy-format.spec
7ccfd53b2a9a5cbe519a46a55122feb5629c8199
[packages/ocaml-easy-format.git] / ocaml-easy-format.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define         module  easy-format
6 Summary:        easy(ier) pretty printing for OCaml
7 Name:           ocaml-%{module}
8 Version:        1.0.2
9 Release:        1
10 License:        BSD
11 Group:          Libraries
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)
18
19 %define         debug_package   %{nil}
20
21 %description
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
26 the formatted output.
27
28 %description -l pl.UTF-8
29 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
30 używających tej biblioteki.
31
32 %package devel
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
36 %requires_eq    ocaml
37
38 %description devel
39 This package contains files needed to develop OCaml programs using
40 this library.
41
42 %description devel -l pl.UTF-8
43 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
44 tej biblioteki.
45
46 %prep
47 %setup -q -n %{module}-%{version}
48
49 %build
50 %{__make} -j1 all %{?with_opt:opt} \
51         CC="%{__cc} %{rpmcflags} -fPIC"
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
56 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
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}"
66 EOF
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files devel
72 %defattr(644,root,root,755)
73 %doc README Changes LICENSE
74 %dir %{_libdir}/ocaml/%{module}
75 %{_libdir}/ocaml/%{module}/*.cm[xi]
76 %{_libdir}/ocaml/%{module}/*.cmo
77 %{_libdir}/ocaml/%{module}/*.mli
78 %if %{with opt}
79 %{_libdir}/ocaml/%{module}/*.o
80 %endif
81 %{_libdir}/ocaml/site-lib/%{module}
This page took 0.037302 seconds and 2 git commands to generate.