]> git.pld-linux.org Git - packages/ocaml-graphics.git/blob - ocaml-graphics.spec
- new
[packages/ocaml-graphics.git] / ocaml-graphics.spec
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
15 Summary:        Portable drawing primitives for OCaml
16 Name:           ocaml-%{module}
17 Version:        5.1.1
18 Release:        1
19 License:        LGPLv2 with exceptions
20 Source0:        https://github.com/ocaml/graphics/releases/download/%{version}/%{module}-%{version}.tbz
21 # Source0-md5:  bc127b5da919b61f4c928a6657c88886
22 URL:            https://github.com/ocaml/graphics
23 BuildRequires:  ocaml >= 4.09.0
24 BuildRequires:  ocaml-dune-devel >= 2.1
25 BuildRequires:  xorg-lib-libX11-devel
26 %requires_eq    ocaml-runtime
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The graphics library provides a set of portable drawing primitives.
31 Drawing takes place in a separate window that is created when
32 Graphics.open_graph is called.
33
34 %package        devel
35 Summary:        Development files for %{name}
36 Requires:       %{name} = %{version}-%{release}
37 Requires:       xorg-lib-libX11-devel
38
39 %description    devel
40 The %{name}-devel package contains libraries and signature files for
41 developing applications that use %{name}.
42
43 %prep
44 %setup -q -n %{module}-%{version}
45
46 %build
47 dune build %{?_smp_mflags} --display=verbose
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51
52 dune install --destdir=$RPM_BUILD_ROOT
53
54 %clean
55 rm -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.089874 seconds and 4 git commands to generate.