- new
[packages/ocaml-graphics.git] / ocaml-graphics.spec
CommitLineData
ff88e9e1
JR
1#
2# Conditional build:
3%bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built)
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
14%define module graphics
15Summary: Portable drawing primitives for OCaml
16Name: ocaml-%{module}
17Version: 5.1.1
18Release: 1
19License: LGPLv2 with exceptions
20Source0: https://github.com/ocaml/graphics/releases/download/%{version}/%{module}-%{version}.tbz
21# Source0-md5: bc127b5da919b61f4c928a6657c88886
22URL: https://github.com/ocaml/graphics
23BuildRequires: ocaml >= 4.09.0
24BuildRequires: ocaml-dune-devel >= 2.1
25BuildRequires: xorg-lib-libX11-devel
26%requires_eq ocaml-runtime
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30The graphics library provides a set of portable drawing primitives.
31Drawing takes place in a separate window that is created when
32Graphics.open_graph is called.
33
34%package devel
35Summary: Development files for %{name}
36Requires: %{name} = %{version}-%{release}
37Requires: xorg-lib-libX11-devel
38
39%description devel
40The %{name}-devel package contains libraries and signature files for
41developing applications that use %{name}.
42
43%prep
44%setup -q -n %{module}-%{version}
45
46%build
47dune build %{?_smp_mflags} --display=verbose
48
49%install
50rm -rf $RPM_BUILD_ROOT
51
52dune install --destdir=$RPM_BUILD_ROOT
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%files
58%defattr(644,root,root,755)
59%doc CHANGES.md README.md
60%dir %{_libdir}/ocaml/%{module}
61%{_libdir}/ocaml/%{module}/META
62%{_libdir}/ocaml/%{module}/*.cma
63%{_libdir}/ocaml/%{module}/*.cmi
64%if %{with ocaml_opt}
65%attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs
66%endif
67%{_libdir}/ocaml/stublibs/dllgraphics_stubs.so
68
69%files devel
70%defattr(644,root,root,755)
71%{_libdir}/ocaml/%{module}/dune-package
72%{_libdir}/ocaml/%{module}/opam
73%if %{with ocaml_opt}
74%{_libdir}/ocaml/%{module}/*.a
75%{_libdir}/ocaml/%{module}/*.cmx
76%{_libdir}/ocaml/%{module}/*.cmxa
77%endif
78%{_libdir}/ocaml/%{module}/*.cmt
79%{_libdir}/ocaml/%{module}/*.cmti
80%{_libdir}/ocaml/%{module}/*.mli
This page took 0.173992 seconds and 4 git commands to generate.