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