2 Summary: Library for binding to C libraries using pure OCaml
3 Summary(pl.UTF-8): Biblioteka do wiązania z bibliotekami C przy użyciu czystego OCamla
9 Source0: https://github.com/ocamllabs/ocaml-ctypes/archive/%{version}/%{module}-%{version}.tar.gz
10 # Source0-md5: 08a284c379e341d57b6918611b5bc56b
11 URL: https://github.com/ocamllabs/ocaml-ctypes
12 BuildRequires: libffi-devel
13 BuildRequires: ocaml >= 3.04-7
14 %requires_eq ocaml-runtime
15 # archs with ocaml_opt support (keep in sync with ocaml.spec)
16 ExclusiveArch: %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 ctypes is a library for binding to C libraries using pure OCaml.
21 The primary aim is to make writing C extensions as straightforward
24 The core of ctypes is a set of combinators for describing
25 the structure of C types -- numeric types, arrays, pointers, structs,
26 unions and functions. You can use these combinators to describe the
27 types of the functions that you want to call, then bind directly to
28 those functions -- all without writing or generating any C!
30 This package contains files needed to run bytecode executables using
33 %description -l pl.UTF-8
34 ctypes to biblioteka do wiązania z bibliotekami C przy użyciu czystego
35 OCamla. Głównym celem jest uczynienie pisania rozszerzeń w C jak
38 Serce ctypes to zbiór kombinatorów do opisu struktur typów C - typów
39 liczbowych, tablic, wskaźników, struktur, unii oraz funkcji. Można ich
40 używać do opisu typów funkcji, które mają być wywoływane, a następnie
41 dowiązać bezpośrednio do tych funkcji - bez pisania ani generowania
44 Ten pakiet zawiera pliki niezbędne do uruchamiania programów
45 bajtkodowych wykorzystujących bibliotekę.
48 Summary: Library for binding to C libraries using pure OCaml - development part
49 Summary(pl.UTF-8): Biblioteka do wiązania z bibliotekami C przy użyciu czystego OCamla - część programistyczna
50 Group: Development/Libraries
51 Requires: %{name} = %{version}-%{release}
55 This package contains files needed to develop OCaml programs using
58 %description devel -l pl.UTF-8
59 Ten pakiet zawiera pliki niezbędne do tworzenia programów w OCamlu
60 wykorzystujących bibliotekę ctypes.
67 CC="%{__cc} %{rpmcflags} -fPIC"
70 rm -rf $RPM_BUILD_ROOT
71 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
72 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
74 DESTDIR=$RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79 # move to dir pld ocamlfind looks
80 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
81 mv $OCAMLFIND_DESTDIR/%{module}/META \
82 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
83 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
84 directory="+%{module}"
88 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ctypes/CHANGES.md
89 # findlib files, useless when packaging to rpm
90 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
93 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc CHANGES.md LICENSE README.md
98 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllctypes-foreign-base_stubs.so
99 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllctypes_stubs.so
100 %dir %{_libdir}/ocaml/%{module}
101 %attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs
102 %{_libdir}/ocaml/%{module}/*.cma
105 %defattr(644,root,root,755)
106 %{_libdir}/ocaml/%{module}/*.h
107 %{_libdir}/ocaml/%{module}/*.cm[ix]
108 %{_libdir}/ocaml/%{module}/*.mli
109 %{_libdir}/ocaml/%{module}/*.[ao]
110 %{_libdir}/ocaml/%{module}/*.cmxa
111 %{_libdir}/ocaml/site-lib/%{module}
112 %{_examplesdir}/%{name}-%{version}