[packages/ocaml-idl] merged changes from ocaml-camlidl; rel 7
glen
glen at pld-linux.org
Sun Nov 24 01:26:40 CET 2013
commit 487fb0f5160df4481ca0c11a60bb478c13fa6ee2
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Nov 24 02:26:31 2013 +0200
merged changes from ocaml-camlidl; rel 7
ocaml-idl.spec | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
---
diff --git a/ocaml-idl.spec b/ocaml-idl.spec
index 0b3f8c0..3e6bdcc 100644
--- a/ocaml-idl.spec
+++ b/ocaml-idl.spec
@@ -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}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-idl.git/commitdiff/487fb0f5160df4481ca0c11a60bb478c13fa6ee2
More information about the pld-cvs-commit
mailing list