]> git.pld-linux.org Git - packages/ocaml-idl.git/blob - ocaml-idl.spec
9c049e691fef09cbce7d2732389ce9eccf946799
[packages/ocaml-idl.git] / ocaml-idl.spec
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
4 Name:           ocaml-idl
5 Version:        1.05
6 Release:        8
7 License:        QPL v1.0 (compiler), LGPL v2 (library)
8 Group:          Libraries
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)
18
19 %description
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.
26
27 This package contains files needed to run bytecode executables using
28 this library.
29
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.
37
38 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
39 używających tej biblioteki.
40
41 %package devel
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}
46 %requires_eq    ocaml
47
48 %description devel
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.
55
56 This package contains files needed to develop OCaml programs using
57 this library.
58
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.
66
67 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
68 tej biblioteki.
69
70 %prep
71 %setup -q -a 1 -n camlidl-%{version}
72
73 ln -s Makefile.unix config/Makefile
74
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
78 # chokes.
79
80 %build
81 %{__make} -j1 \
82         CPP="%{__cc} -E -x c" \
83         CFLAGS="%{rpmcflags} -fPIC"
84 ocamlmklib -o com lib/*.cm[xo] runtime/*.o
85
86 %install
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
90
91 %{__make} install \
92         BINDIR=$RPM_BUILD_ROOT%{_bindir} \
93         OCAMLLIB=$RPM_BUILD_ROOT%{_libdir}/ocaml
94
95 # fix install to subdir
96 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/{*.{cm[ix],cma,cmxa,a},idl}
97
98 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
99 install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
100
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}
105
106 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl
107 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/camlidl/META <<EOF
108 requires = ""
109 version = "%{version}"
110 directory = "+idl"
111 archive(byte) = "com.cma"
112 archive(native) = "com.cmxa"
113 linkopts = ""
114 EOF
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %files
120 %defattr(644,root,root,755)
121 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
122
123 %files devel
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}
This page took 0.099185 seconds and 2 git commands to generate.