1 | %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) |
---|
2 | |
---|
3 | Name: ocaml-ctypes |
---|
4 | Version: 0.3.4 |
---|
5 | Release: 1%{?_dist_release} |
---|
6 | Summary: Library for binding to C libraries using pure OCaml |
---|
7 | |
---|
8 | License: MIT |
---|
9 | Group: System Environment/Libraries |
---|
10 | URL: https://github.com/ocamllabs/ocaml-ctypes |
---|
11 | Source0: https://github.com/ocamllabs/%{name}/archive/%{version}.tar.gz |
---|
12 | |
---|
13 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
14 | BuildRequires: ocaml |
---|
15 | BuildRequires: ocaml-findlib |
---|
16 | BuildRequires: libffi-devel |
---|
17 | BuildRequires: ocaml-ounit-devel |
---|
18 | |
---|
19 | %description |
---|
20 | Ctypes is a library for binding to C libraries using pure OCaml. The primary aim is to make writing C extensions as straightforward as possible. |
---|
21 | |
---|
22 | %package devel |
---|
23 | Summary: Development files for %{name} |
---|
24 | Group: Development/Libraries |
---|
25 | Requires: %{name} = %{version}-%{release} |
---|
26 | |
---|
27 | %description devel |
---|
28 | The %{name}-devel package contains libraries and signature files for |
---|
29 | developing applications that use %{name}. |
---|
30 | |
---|
31 | |
---|
32 | %prep |
---|
33 | %setup -q |
---|
34 | |
---|
35 | %build |
---|
36 | make all |
---|
37 | #make doc |
---|
38 | |
---|
39 | |
---|
40 | %install |
---|
41 | rm -rf $RPM_BUILD_ROOT |
---|
42 | export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml |
---|
43 | mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs |
---|
44 | make install |
---|
45 | |
---|
46 | # Remove this, reinstall it properly with a %%doc rule below. |
---|
47 | #rm -rf $RPM_BUILD_ROOT/usr/local/share/doc |
---|
48 | |
---|
49 | #rm -rf _build/doc |
---|
50 | #mkdir -p _build/doc |
---|
51 | #cp -p *.html *.css _build/doc |
---|
52 | |
---|
53 | %check |
---|
54 | make test |
---|
55 | |
---|
56 | %clean |
---|
57 | rm -rf $RPM_BUILD_ROOT |
---|
58 | |
---|
59 | |
---|
60 | %files |
---|
61 | %doc CHANGES.md LICENSE README.md |
---|
62 | %{_libdir}/ocaml/ctypes |
---|
63 | %{_libdir}/ocaml/stublibs/* |
---|
64 | %if %opt |
---|
65 | %exclude %{_libdir}/ocaml/ctypes/*.a |
---|
66 | %exclude %{_libdir}/ocaml/ctypes/*.cmxa |
---|
67 | %endif |
---|
68 | %exclude %{_libdir}/ocaml/ctypes/*.h |
---|
69 | %exclude %{_libdir}/ocaml/ctypes/*.mli |
---|
70 | |
---|
71 | |
---|
72 | %files devel |
---|
73 | %doc LICENSE README.md |
---|
74 | #doc _build/doc/* |
---|
75 | %if %opt |
---|
76 | %{_libdir}/ocaml/ctypes/*.a |
---|
77 | %{_libdir}/ocaml/ctypes/*.cmxa |
---|
78 | %endif |
---|
79 | %{_libdir}/ocaml/ctypes/*.h |
---|
80 | %{_libdir}/ocaml/ctypes/*.mli |
---|
81 | |
---|
82 | |
---|
83 | %changelog |
---|
84 | * Thu Jun 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.3.4-1 |
---|
85 | - Initial build for VineLinux |
---|