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