ocaml-ctypes-vl.spec 2.0 KB

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