]> git.pld-linux.org Git - packages/ocaml-idl.git/commitdiff
merged changes from ocaml-camlidl; rel 7 auto/th/ocaml-idl-1.05-7
authorElan Ruusamäe <glen@delfi.ee>
Sun, 24 Nov 2013 00:26:31 +0000 (02:26 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 24 Nov 2013 00:26:31 +0000 (02:26 +0200)
ocaml-idl.spec

index 0b3f8c0205b1f26bddc8397e7d7d220b244f8c1d..3e6bdcc9bbdf01cae723d0fab537772d9779ac82 100644 (file)
@@ -1,17 +1,18 @@
 %define                ocaml_ver       1:3.09.2
-Summary:       IDL binding for OCaml
+Summary:       CamlIDL is a stub code generator and COM binding for Objective Caml
 Summary(pl.UTF-8):     Wiązania IDL dla OCamla
 Name:          ocaml-idl
 Version:       1.05
-Release:       6
-License:       QPL
+Release:       7
+License:       QPL v1.0 (compiler), LGPL v2 (library)
 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/
+URL:           http://caml.inria.fr/pub/old_caml_site/camlidl/
 BuildRequires: ocaml >= %{ocaml_ver}
+Obsoletes:     ocaml-camlidl < 1.05-3
 %requires_eq   ocaml-runtime
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -69,31 +70,38 @@ tej biblioteki.
 %prep
 %setup -q -a 1 -n camlidl-%{version}
 
+ln -s Makefile.unix config/Makefile
+
 # 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 \
+       CPP="%{__cc} -E -x c" \
        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,%{_includedir}/caml}
+ln -sf ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
+
+%{__make} install \
+       BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+       OCAMLLIB=$RPM_BUILD_ROOT%{_libdir}/ocaml
 
-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
+# fix install to subdir
+mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{*.{cm[ix],cma,cmxa,a},idl}
 
-install compiler/camlidl $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-cp -r tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 # remove Windows examples
-rm -rf  $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{comp,dispatch}
+%{__rm} -r $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
@@ -110,14 +118,16 @@ 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
+%dir %{_libdir}/ocaml/idl
 %{_libdir}/ocaml/idl/*.cm[ixa]*
 %{_libdir}/ocaml/idl/*.a
-%{_examplesdir}/%{name}-%{version}
 %{_libdir}/ocaml/site-lib/camlidl
+%{_libdir}/ocaml/caml
+%{_includedir}/caml/camlidlruntime.h
+%{_examplesdir}/%{name}-%{version}
This page took 0.078015 seconds and 4 git commands to generate.