]> git.pld-linux.org Git - packages/ocaml-idl.git/blame - ocaml-idl.spec
- added ocaml_opt patch
[packages/ocaml-idl.git] / ocaml-idl.spec
CommitLineData
ff869cfc
JR
1#
2# Conditional build:
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
4
5%ifarch x32
6# not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
7%undefine with_ocaml_opt
8%endif
9
e82b6925 10%define ocaml_ver 1:3.09.2
487fb0f5 11Summary: CamlIDL is a stub code generator and COM binding for Objective Caml
703c2f16 12Summary(pl.UTF-8): Wiązania IDL dla OCamla
48dce474 13Name: ocaml-idl
f24cc87a 14Version: 1.05
ff869cfc 15Release: 9
487fb0f5 16License: QPL v1.0 (compiler), LGPL v2 (library)
ebc04232 17Group: Libraries
48dce474 18Source0: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.tar.gz
f24cc87a 19# Source0-md5: 4cfb863bc3cbdc1af2502042c45cc675
48dce474 20Source1: http://caml.inria.fr/distrib/bazar-ocaml/camlidl-%{version}.doc.html.tar.gz
f24cc87a 21# Source1-md5: b7c7dad3ba62ddcc0f687bdebe295126
ff869cfc 22Patch0: no-opt.patch
487fb0f5 23URL: http://caml.inria.fr/pub/old_caml_site/camlidl/
4a13f6ed 24BuildRequires: ocaml >= %{ocaml_ver}
487fb0f5 25Obsoletes: ocaml-camlidl < 1.05-3
48dce474
MM
26%requires_eq ocaml-runtime
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
4a13f6ed
ER
30Camlidl is a stub code generator for Objective Caml. It generates stub
31code for interfacing Caml with C from an IDL description of the C
48dce474
MM
32functions. Thus, Camlidl automates the most tedious task in
33interfacing C libraries with Caml programs. It can also be used to
34interface Caml programs with other languages, as long as those
35languages have a well-defined C interface.
36
b81cfd40 37This package contains files needed to run bytecode executables using
48dce474
MM
38this library.
39
eee79846
JR
40%description -l pl.UTF-8
41Camlidl jest generatorem kodu łączącego C z OCamlem. Pozwala on na
42automatyczne tworzenie funkcji, które będą mogły być wywoływane z
43OCamla na podstawie opisu IDL. Automatyzuje więc najbardziej
44niewdzięczne aspekty odwoływania się do bibliotek napisanych w C z
45OCamla. Może być również użyty do komunikacji z innymi językami jeśli
46tylko mają one dobrze zdefiniowany interfejs C.
48dce474 47
eee79846
JR
48Pakiet ten zawiera binaria potrzebne do uruchamiania programów
49używających tej biblioteki.
48dce474
MM
50
51%package devel
52Summary: IDL binding for OCaml - development part
703c2f16 53Summary(pl.UTF-8): Wiązania IDL dla OCamla - cześć programistyczna
48dce474
MM
54Group: Development/Libraries
55Requires: %{name} = %{version}-%{release}
56%requires_eq ocaml
57
58%description devel
4a13f6ed
ER
59Camlidl is a stub code generator for Objective Caml. It generates stub
60code for interfacing Caml with C from an IDL description of the C
48dce474
MM
61functions. Thus, Camlidl automates the most tedious task in
62interfacing C libraries with Caml programs. It can also be used to
63interface Caml programs with other languages, as long as those
64languages have a well-defined C interface.
65
b81cfd40 66This package contains files needed to develop OCaml programs using
48dce474
MM
67this library.
68
eee79846
JR
69%description devel -l pl.UTF-8
70Camlidl jest generatorem kodu łączącego C z OCamlem. Pozwala on na
71automatyczne tworzenie funkcji, które będą mogły być wywoływane z
72OCamla na podstawie opisu IDL. Automatyzuje więc najbardziej
73niewdzięczne aspekty odwoływania się do bibliotek napisanych w C z
74OCamla. Może być również użyty do komunikacji z innymi językami jeśli
75tylko mają one dobrze zdefiniowany interfejs C.
48dce474 76
eee79846 77Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
48dce474
MM
78tej biblioteki.
79
80%prep
81%setup -q -a 1 -n camlidl-%{version}
ff869cfc 82%patch0 -p1
48dce474 83
487fb0f5
ER
84ln -s Makefile.unix config/Makefile
85
48dce474
MM
86# NOTE: make opt to produce camlidl.opt won't work here, there is no such
87# target even. That's bacause there is array.ml module in camlidl so
88# it produces array.o and array.o is also in standard library. And C linker
89# chokes.
90
91%build
ff869cfc
JR
92%{__make} -j1 -C compiler \
93 CPP="%{__cc} -E -x c" \
94 CFLAGS="%{rpmcflags} -fPIC"
95
96%{__make} -j1 -C lib com.cma %{?with_ocaml_opt:com.cmxa} \
97 CPP="%{__cc} -E -x c" \
98 CFLAGS="%{rpmcflags} -fPIC"
99
100%{__make} -j1 -C runtime \
101 CPP="%{__cc} -E -x c" \
102 CFLAGS="%{rpmcflags} -fPIC"
103
104%{__make} -j1 -C tools \
487fb0f5 105 CPP="%{__cc} -E -x c" \
4a13f6ed 106 CFLAGS="%{rpmcflags} -fPIC"
ff869cfc 107
48dce474
MM
108ocamlmklib -o com lib/*.cm[xo] runtime/*.o
109
110%install
111rm -rf $RPM_BUILD_ROOT
487fb0f5
ER
112install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/idl,%{_includedir}/caml}
113ln -sf ../../include/caml $RPM_BUILD_ROOT%{_libdir}/ocaml/caml
114
115%{__make} install \
ff869cfc 116 %{!?with_ocaml_opt:NATIVELIB=""} \
487fb0f5
ER
117 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
118 OCAMLLIB=$RPM_BUILD_ROOT%{_libdir}/ocaml
48dce474 119
487fb0f5 120# fix install to subdir
ff869cfc 121mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{*.{cm[ix],cma%{?with_ocaml_opt:,cmxa,a}},idl}
48dce474 122
487fb0f5
ER
123install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
124install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
48dce474
MM
125
126install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
487fb0f5 127cp -a tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
48dce474 128# remove Windows examples
487fb0f5 129%{__rm} -r $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/{comp,dispatch}
48dce474 130
c8c99e7b
MM
131install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl
132cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl/META <<EOF
48dce474
MM
133requires = ""
134version = "%{version}"
135directory = "+idl"
136archive(byte) = "com.cma"
137archive(native) = "com.cmxa"
138linkopts = ""
139EOF
140
141%clean
142rm -rf $RPM_BUILD_ROOT
143
144%files
145%defattr(644,root,root,755)
63eb2b1c 146%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
48dce474
MM
147
148%files devel
149%defattr(644,root,root,755)
150%doc htmlman LICENSE README Changes
63eb2b1c 151%attr(755,root,root) %{_bindir}/camlidl
487fb0f5 152%dir %{_libdir}/ocaml/idl
48dce474 153%{_libdir}/ocaml/idl/*.cm[ixa]*
ff869cfc 154%if %{with ocaml_opt}
48dce474 155%{_libdir}/ocaml/idl/*.a
ff869cfc 156%endif
0002521f 157%{_libdir}/ocaml/site-lib/camlidl
487fb0f5
ER
158%{_libdir}/ocaml/caml
159%{_includedir}/caml/camlidlruntime.h
160%{_examplesdir}/%{name}-%{version}
This page took 0.170946 seconds and 4 git commands to generate.