]>
Commit | Line | Data |
---|---|---|
ff88e9e1 JR |
1 | # |
2 | # Conditional build: | |
80c96647 | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
ff88e9e1 JR |
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 | |
0fcfed96 | 16 | Summary(pl.UTF-8): Przenośne funkcje rysujące dla OCamla |
ff88e9e1 | 17 | Name: ocaml-%{module} |
80c96647 | 18 | Version: 5.1.2 |
ff88e9e1 | 19 | Release: 1 |
0fcfed96 | 20 | License: LGPL v2 with exceptions |
db890840 | 21 | Group: Libraries |
80c96647 | 22 | #Source0Download: https://github.com/ocaml/graphics/releases/download |
ff88e9e1 | 23 | Source0: https://github.com/ocaml/graphics/releases/download/%{version}/%{module}-%{version}.tbz |
80c96647 | 24 | # Source0-md5: 0b24d47c2157da8529c2e55265b079c3 |
ff88e9e1 JR |
25 | URL: https://github.com/ocaml/graphics |
26 | BuildRequires: ocaml >= 4.09.0 | |
27 | BuildRequires: ocaml-dune-devel >= 2.1 | |
28 | BuildRequires: xorg-lib-libX11-devel | |
29 | %requires_eq ocaml-runtime | |
67efd4ed | 30 | Obsoletes: ocaml-x11graphics < 1:4.09 |
ff88e9e1 JR |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
33 | %description | |
34 | The graphics library provides a set of portable drawing primitives. | |
35 | Drawing takes place in a separate window that is created when | |
36 | Graphics.open_graph is called. | |
37 | ||
0fcfed96 JB |
38 | %description -l pl.UTF-8 |
39 | Biblioteka graphics dostarcza zbiór przenośnych funkcji rysujących. | |
40 | Rysowanie jest wykonywane w osobnym oknie, tworzonym przy wywołaniu | |
41 | Graphics.open_graph. | |
42 | ||
43 | %package devel | |
44 | Summary: Development files for graphics library | |
45 | Summary(pl.UTF-8): Pliki programistyczne biblioteki graphics | |
db890840 | 46 | Group: Development/Libraries |
ff88e9e1 JR |
47 | Requires: %{name} = %{version}-%{release} |
48 | Requires: xorg-lib-libX11-devel | |
67efd4ed | 49 | Obsoletes: ocaml-x11graphics-devel < 1:4.09 |
ff88e9e1 | 50 | |
0fcfed96 JB |
51 | %description devel |
52 | This package contains libraries and signature files for developing | |
53 | applications that use OCaml graphics library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
57 | wykorzystujących bibliotekę OCamla graphics. | |
ff88e9e1 JR |
58 | |
59 | %prep | |
60 | %setup -q -n %{module}-%{version} | |
61 | ||
62 | %build | |
63 | dune build %{?_smp_mflags} --display=verbose | |
64 | ||
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | dune install --destdir=$RPM_BUILD_ROOT | |
69 | ||
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
75 | %doc CHANGES.md README.md | |
76 | %dir %{_libdir}/ocaml/%{module} | |
77 | %{_libdir}/ocaml/%{module}/META | |
78 | %{_libdir}/ocaml/%{module}/*.cma | |
79 | %{_libdir}/ocaml/%{module}/*.cmi | |
80 | %if %{with ocaml_opt} | |
81 | %attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs | |
82 | %endif | |
80c96647 | 83 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgraphics_stubs.so |
ff88e9e1 JR |
84 | |
85 | %files devel | |
86 | %defattr(644,root,root,755) | |
87 | %{_libdir}/ocaml/%{module}/dune-package | |
88 | %{_libdir}/ocaml/%{module}/opam | |
ff88e9e1 | 89 | %{_libdir}/ocaml/%{module}/*.a |
8a35dd05 | 90 | %if %{with ocaml_opt} |
ff88e9e1 JR |
91 | %{_libdir}/ocaml/%{module}/*.cmx |
92 | %{_libdir}/ocaml/%{module}/*.cmxa | |
93 | %endif | |
94 | %{_libdir}/ocaml/%{module}/*.cmt | |
95 | %{_libdir}/ocaml/%{module}/*.cmti | |
96 | %{_libdir}/ocaml/%{module}/*.mli |