1 %define ocaml_ver 1:3.09.2
2 Summary: CamlIDL is a stub code generator and COM binding for Objective Caml
3 Summary(pl.UTF-8): Wiązania IDL dla OCamla
7 License: QPL v1.0 (compiler), LGPL v2 (library)
9 Source0: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.tar.gz
10 # Source0-md5: 4cfb863bc3cbdc1af2502042c45cc675
11 Source1: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.doc.html.tar.gz
12 # Source1-md5: b7c7dad3ba62ddcc0f687bdebe295126
13 URL: http://caml.inria.fr/pub/old_caml_site/camlidl/
14 BuildRequires: ocaml >= %{ocaml_ver}
15 Obsoletes: ocaml-camlidl < 1.05-3
16 %requires_eq ocaml-runtime
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 Camlidl is a stub code generator for Objective Caml. It generates stub
21 code for interfacing Caml with C from an IDL description of the C
22 functions. Thus, Camlidl automates the most tedious task in
23 interfacing C libraries with Caml programs. It can also be used to
24 interface Caml programs with other languages, as long as those
25 languages have a well-defined C interface.
27 This package contains files needed to run bytecode executables using
30 %description -l pl.UTF-8
31 Camlidl jest generatorem kodu łączącego C z OCamlem. Pozwala on na
32 automatyczne tworzenie funkcji, które będą mogły być wywoływane z
33 OCamla na podstawie opisu IDL. Automatyzuje więc najbardziej
34 niewdzięczne aspekty odwoływania się do bibliotek napisanych w C z
35 OCamla. Może być również użyty do komunikacji z innymi językami jeśli
36 tylko mają one dobrze zdefiniowany interfejs C.
38 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
39 używających tej biblioteki.
42 Summary: IDL binding for OCaml - development part
43 Summary(pl.UTF-8): Wiązania IDL dla OCamla - cześć programistyczna
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
49 Camlidl is a stub code generator for Objective Caml. It generates stub
50 code for interfacing Caml with C from an IDL description of the C
51 functions. Thus, Camlidl automates the most tedious task in
52 interfacing C libraries with Caml programs. It can also be used to
53 interface Caml programs with other languages, as long as those
54 languages have a well-defined C interface.
56 This package contains files needed to develop OCaml programs using
59 %description devel -l pl.UTF-8
60 Camlidl jest generatorem kodu łączącego C z OCamlem. Pozwala on na
61 automatyczne tworzenie funkcji, które będą mogły być wywoływane z
62 OCamla na podstawie opisu IDL. Automatyzuje więc najbardziej
63 niewdzięczne aspekty odwoływania się do bibliotek napisanych w C z
64 OCamla. Może być również użyty do komunikacji z innymi językami jeśli
65 tylko mają one dobrze zdefiniowany interfejs C.
67 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
71 %setup -q -a 1 -n camlidl-%{version}
73 ln -s Makefile.unix config/Makefile
75 # NOTE: make opt to produce camlidl.opt won't work here, there is no such
76 # target even. That's bacause there is array.ml module in camlidl so
77 # it produces array.o and array.o is also in standard library. And C linker
82 CPP="%{__cc} -E -x c" \
83 CFLAGS="%{rpmcflags} -fPIC"
84 ocamlmklib -o com lib/*.cm[xo] runtime/*.o
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/idl,%{_includedir}/caml}
89 ln -sf ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
92 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
93 OCAMLLIB=$RPM_BUILD_ROOT%{_libdir}/ocaml
95 # fix install to subdir
96 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{*.{cm[ix],cma,cmxa,a},idl}
98 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
99 install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
101 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
102 cp -a tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
103 # remove Windows examples
104 %{__rm} -r $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{comp,dispatch}
106 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl
107 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl/META <<EOF
109 version = "%{version}"
111 archive(byte) = "com.cma"
112 archive(native) = "com.cmxa"
117 rm -rf $RPM_BUILD_ROOT
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
124 %defattr(644,root,root,755)
125 %doc htmlman LICENSE README Changes
126 %attr(755,root,root) %{_bindir}/camlidl
127 %dir %{_libdir}/ocaml/idl
128 %{_libdir}/ocaml/idl/*.cm[ixa]*
129 %{_libdir}/ocaml/idl/*.a
130 %{_libdir}/ocaml/site-lib/camlidl
131 %{_libdir}/ocaml/caml
132 %{_includedir}/caml/camlidlruntime.h
133 %{_examplesdir}/%{name}-%{version}