]> git.pld-linux.org Git - packages/ocaml-ctypes.git/blob - ocaml-ctypes.spec
- rebuild with ocaml 4.04.1
[packages/ocaml-ctypes.git] / ocaml-ctypes.spec
1 %define         module  ctypes
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
4 Name:           ocaml-%{module}
5 Version:        0.4.1
6 Release:        4
7 License:        MIT
8 Group:          Libraries
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)
18
19 %description
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
22 as possible.
23
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!
29
30 This package contains files needed to run bytecode executables using
31 this library.
32
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
36 najprostszym.
37
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
42 żadnego kodu w C!
43
44 Ten pakiet zawiera pliki niezbędne do uruchamiania programów
45 bajtkodowych wykorzystujących bibliotekę.
46
47 %package devel
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}
52 %requires_eq    ocaml
53
54 %description devel
55 This package contains files needed to develop OCaml programs using
56 ctypes library.
57
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.
61
62 %prep
63 %setup -q
64
65 %build
66 %{__make} -j1 all \
67         CC="%{__cc} %{rpmcflags} -fPIC"
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
72 install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78
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}"
85 EOF
86
87 # packaged as %doc
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
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
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
103
104 %files devel
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}
This page took 0.073955 seconds and 3 git commands to generate.