]> git.pld-linux.org Git - packages/ocaml-ctypes.git/blame - ocaml-ctypes.spec
- release 3 (libffi 3.4.x)
[packages/ocaml-ctypes.git] / ocaml-ctypes.spec
CommitLineData
46f28b30
JR
1#
2# Conditional build:
c3c5f57f 3%bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
46f28b30
JR
4
5# not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7%undefine with_ocaml_opt
8%endif
9
10%if %{without ocaml_opt}
11%define _enable_debug_packages 0
12%endif
13
0c952b3b
JR
14%define module ctypes
15Summary: Library for binding to C libraries using pure OCaml
adbf4531 16Summary(pl.UTF-8): Biblioteka do wiązania z bibliotekami C przy użyciu czystego OCamla
0c952b3b 17Name: ocaml-%{module}
c3c5f57f 18Version: 0.19.1
b7e549ef 19Release: 3
adbf4531 20License: MIT
0c952b3b 21Group: Libraries
6596d3f6 22#Source0Download: https://github.com/ocamllabs/ocaml-ctypes/releases
cfd85255 23Source0: https://github.com/ocamllabs/ocaml-ctypes/archive/%{version}/%{module}-%{version}.tar.gz
c3c5f57f 24# Source0-md5: ceb891ec568fd7da76c31af270a2afe2
0c952b3b 25URL: https://github.com/ocamllabs/ocaml-ctypes
adbf4531 26BuildRequires: libffi-devel
c3c5f57f 27BuildRequires: ocaml >= 1:4.03.0
c79b9828 28BuildRequires: ocaml-bigarray-compat-devel
c3c5f57f 29BuildRequires: ocaml-integers-devel >= 0.3.0
0c952b3b
JR
30%requires_eq ocaml-runtime
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
c79b9828
JR
34ctypes is a library for binding to C libraries using pure OCaml. The
35primary aim is to make writing C extensions as straightforward as
36possible.
0c952b3b 37
c79b9828
JR
38The core of ctypes is a set of combinators for describing the
39structure of C types -- numeric types, arrays, pointers, structs,
0c952b3b
JR
40unions and functions. You can use these combinators to describe the
41types of the functions that you want to call, then bind directly to
42those functions -- all without writing or generating any C!
adbf4531 43
0c952b3b
JR
44This package contains files needed to run bytecode executables using
45this library.
46
adbf4531
JB
47%description -l pl.UTF-8
48ctypes to biblioteka do wiązania z bibliotekami C przy użyciu czystego
49OCamla. Głównym celem jest uczynienie pisania rozszerzeń w C jak
50najprostszym.
51
52Serce ctypes to zbiór kombinatorów do opisu struktur typów C - typów
53liczbowych, tablic, wskaźników, struktur, unii oraz funkcji. Można ich
54używać do opisu typów funkcji, które mają być wywoływane, a następnie
55dowiązać bezpośrednio do tych funkcji - bez pisania ani generowania
56żadnego kodu w C!
57
58Ten pakiet zawiera pliki niezbędne do uruchamiania programów
59bajtkodowych wykorzystujących bibliotekę.
60
0c952b3b 61%package devel
6e15805b 62Summary: Library for binding to C libraries using pure OCaml - development part
adbf4531 63Summary(pl.UTF-8): Biblioteka do wiązania z bibliotekami C przy użyciu czystego OCamla - część programistyczna
0c952b3b
JR
64Group: Development/Libraries
65Requires: %{name} = %{version}-%{release}
64406cb8
JB
66Requires: ocaml-bigarray-compat-devel
67Requires: ocaml-integers-devel >= 0.3.0
c3c5f57f 68%requires_eq ocaml
0c952b3b
JR
69
70%description devel
71This package contains files needed to develop OCaml programs using
6e15805b 72ctypes library.
0c952b3b 73
adbf4531
JB
74%description devel -l pl.UTF-8
75Ten pakiet zawiera pliki niezbędne do tworzenia programów w OCamlu
76wykorzystujących bibliotekę ctypes.
77
0c952b3b 78%prep
7ab0e45d 79%setup -q
0c952b3b
JR
80
81%build
7ab0e45d 82%{__make} -j1 all \
0c952b3b
JR
83 CC="%{__cc} %{rpmcflags} -fPIC"
84
85%install
86rm -rf $RPM_BUILD_ROOT
87export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
88install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
c3c5f57f 89
0c952b3b
JR
90%{__make} install \
91 DESTDIR=$RPM_BUILD_ROOT
92
7ab0e45d
JR
93install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
94cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
0c952b3b 95
cfd85255
JB
96# packaged as %doc
97%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ctypes/CHANGES.md
98# findlib files, useless when packaging to rpm
99%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.owner
100
0c952b3b
JR
101%clean
102rm -rf $RPM_BUILD_ROOT
103
104%files
105%defattr(644,root,root,755)
adbf4531 106%doc CHANGES.md LICENSE README.md
adbf4531 107%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllctypes_stubs.so
c79b9828 108%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllctypes-foreign_stubs.so
dbd2b6bd 109%dir %{_libdir}/ocaml/%{module}
c79b9828 110%{_libdir}/ocaml/%{module}/META
46f28b30 111%if %{with ocaml_opt}
dbd2b6bd 112%attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs
46f28b30 113%endif
dbd2b6bd 114%{_libdir}/ocaml/%{module}/*.cma
0c952b3b
JR
115
116%files devel
117%defattr(644,root,root,755)
6e15805b 118%{_libdir}/ocaml/%{module}/*.h
46f28b30
JR
119%{_libdir}/ocaml/%{module}/*.cmi
120%{_libdir}/ocaml/%{module}/*.cmti
0c952b3b 121%{_libdir}/ocaml/%{module}/*.mli
6596d3f6 122%{_libdir}/ocaml/%{module}/*.a
46f28b30 123%if %{with ocaml_opt}
60d10e85 124%{_libdir}/ocaml/%{module}/*.cmt
46f28b30 125%{_libdir}/ocaml/%{module}/*.cmx
0c952b3b 126%{_libdir}/ocaml/%{module}/*.cmxa
46f28b30 127%endif
0c952b3b 128%{_examplesdir}/%{name}-%{version}
This page took 0.104584 seconds and 4 git commands to generate.