# $Revision: 1.17 $, $Date: 2006/05/31 12:54:50 $ %define ocaml_ver 1:3.09.2 Summary: IDL binding for OCaml Summary(pl): Wi±zania IDL dla OCamla Name: ocaml-idl Version: 1.05 Release: 6 License: QPL Group: Libraries Source0: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.tar.gz # Source0-md5: 4cfb863bc3cbdc1af2502042c45cc675 Source1: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.doc.html.tar.gz # Source1-md5: b7c7dad3ba62ddcc0f687bdebe295126 URL: http://caml.inria.fr/camlidl/ BuildRequires: ocaml >= %{ocaml_ver} %requires_eq ocaml-runtime BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Camlidl is a stub code generator for Objective Caml. It generates stub code for interfacing Caml with C from an IDL description of the C functions. Thus, Camlidl automates the most tedious task in interfacing C libraries with Caml programs. It can also be used to interface Caml programs with other languages, as long as those languages have a well-defined C interface. This package contains files needed to run bytecode executables using this library. %description -l pl Camlidl jest generatorem kodu ³±cz±cego C z OCamlem. Pozwala on na automatyczne tworzenie funkcji, które bêd± mog³y byæ wywo³ywane z OCamla na podstawie opisu IDL. Automatyzuje wiêc najbardziej niewdziêczne aspekty odwo³ywania siê do bibliotek napisanych w C z OCamla. Mo¿e byæ równie¿ u¿yty do komunikacji z innymi jêzykami je¶li tylko maj± one dobrze zdefiniowany interfejs C. Pakiet ten zawiera binaria potrzebne do uruchamiania programów u¿ywaj±cych tej biblioteki. %package devel Summary: IDL binding for OCaml - development part Summary(pl): Wi±zania IDL dla OCamla - cze¶æ programistyczna Group: Development/Libraries Requires: %{name} = %{version}-%{release} %requires_eq ocaml %description devel Camlidl is a stub code generator for Objective Caml. It generates stub code for interfacing Caml with C from an IDL description of the C functions. Thus, Camlidl automates the most tedious task in interfacing C libraries with Caml programs. It can also be used to interface Caml programs with other languages, as long as those languages have a well-defined C interface. This package contains files needed to develop OCaml programs using this library. %description devel -l pl Camlidl jest generatorem kodu ³±cz±cego C z OCamlem. Pozwala on na automatyczne tworzenie funkcji, które bêd± mog³y byæ wywo³ywane z OCamla na podstawie opisu IDL. Automatyzuje wiêc najbardziej niewdziêczne aspekty odwo³ywania siê do bibliotek napisanych w C z OCamla. Mo¿e byæ równie¿ u¿yty do komunikacji z innymi jêzykami je¶li tylko maj± one dobrze zdefiniowany interfejs C. Pakiet ten zawiera pliki niezbêdne do tworzenia programów u¿ywaj±cych tej biblioteki. %prep %setup -q -a 1 -n camlidl-%{version} # NOTE: make opt to produce camlidl.opt won't work here, there is no such # target even. That's bacause there is array.ml module in camlidl so # it produces array.o and array.o is also in standard library. And C linker # chokes. %build rm -f config/Makefile cp config/Makefile.unix config/Makefile %{__make} -j1 \ CFLAGS="%{rpmcflags} -fPIC" ocamlmklib -o com lib/*.cm[xo] runtime/*.o %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/{idl,stublibs}} install lib/*.cm[ix] *.cm* *.a $RPM_BUILD_ROOT%{_libdir}/ocaml/idl install dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs install compiler/camlidl $RPM_BUILD_ROOT%{_bindir} install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} cp -r tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} # remove Windows examples rm -rf $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{comp,dispatch} install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl/META <<EOF requires = "" version = "%{version}" directory = "+idl" archive(byte) = "com.cma" archive(native) = "com.cmxa" linkopts = "" EOF %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %dir %{_libdir}/ocaml/idl %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so %files devel %defattr(644,root,root,755) %doc htmlman LICENSE README Changes %attr(755,root,root) %{_bindir}/camlidl %{_libdir}/ocaml/idl/*.cm[ixa]* %{_libdir}/ocaml/idl/*.a %{_examplesdir}/%{name}-%{version} %{_libdir}/ocaml/site-lib/camlidl %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} PLD Team <feedback@pld-linux.org> All persons listed below can be reached at <cvs_login>@pld-linux.org $Log: ocaml-idl.spec,v $ Revision 1.17 2006/05/31 12:54:50 glen - rel 6 (rebuild with ocaml-3.09.2) Revision 1.16 2006/04/16 10:20:54 glen - ocaml epoch is 1 Revision 1.15 2006/04/15 22:11:00 glen - ocaml 3.09.1 Revision 1.14 2005/12/10 18:43:46 baggins - release 3 for ocaml 3.09.0 Revision 1.13 2005/10/11 20:13:52 paszczus - release up to rebuild with new ocaml Revision 1.12 2004/10/18 18:28:40 qboosh - unification Revision 1.11 2004/09/09 12:11:52 kolodko - reduced rel to 1 Revision 1.10 2004/09/08 14:46:10 darekr - updated to 1.05 Revision 1.9 2004/08/27 23:36:00 havner - [mass commit], rel up for rebuild with ocaml Revision 1.8 2003/09/03 22:40:29 malekith - release 3 for ocaml 3.07 Revision 1.7 2003/08/18 08:08:22 gotar - mass commit: cosmetics (removed trailing white spaces) Revision 1.6 2003/05/29 12:20:11 malekith - oops, rename in files too Revision 1.5 2003/05/29 12:19:00 malekith - rename meta from idl to camlidl Revision 1.4 2003/05/29 12:17:04 malekith - release 2 - use stublibs Revision 1.3 2003/05/28 13:00:01 malekith - massive attack: source-md5 Revision 1.2 2003/05/25 05:51:17 misi3k - massive attack s/pld.org.pl/pld-linux.org/ Revision 1.1 2002/05/21 11:22:39 malekith - initial; from scratch