]>
Commit | Line | Data |
---|---|---|
16638ffb JB |
1 | # TODO: C optflags (currently are taken from ocamlc -config) |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without gtk # lablgtk2 interface (cairo_gtk) | |
5 | %bcond_without ocaml_opt # build opt (native code) | |
6 | ||
7 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 | |
8 | %undefine with_ocaml_opt | |
9 | %endif | |
10 | ||
11 | Summary: OCaml interface to Cairo | |
12 | Summary(pl.UTF-8): Interfejs OCamla do biblioteki Cairo | |
13 | Name: ocaml-cairo2 | |
3ce04602 JR |
14 | Version: 0.6.2 |
15 | Release: 1 | |
f665e510 | 16 | License: LGPL v3+ |
16638ffb JB |
17 | Group: Libraries |
18 | #Source0Download: https://github.com/Chris00/ocaml-cairo/releases | |
3ce04602 JR |
19 | Source0: https://github.com/Chris00/ocaml-cairo/releases/download/%{version}/cairo2-%{version}.tbz |
20 | # Source0-md5: 2d13f7ae6c90dd29a72571e7e94dc2dd | |
16638ffb | 21 | URL: https://github.com/Chris00/ocaml-cairo |
f665e510 JB |
22 | BuildRequires: ocaml >= 1:4.02 |
23 | BuildRequires: ocaml-dune | |
3ce04602 | 24 | BuildRequires: ocaml-graphics-devel |
16638ffb | 25 | %{?with_gtk:BuildRequires: ocaml-lablgtk2-devel} |
f665e510 | 26 | BuildRequires: pkgconfig |
16638ffb JB |
27 | %requires_eq ocaml-runtime |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | OCaml interface to Cairo, a 2D vector graphics library. | |
32 | ||
33 | This package contains files needed to run bytecode executables using | |
34 | Cairo library. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Interfejs OCamla do biblioteki dwuwymiarowej grafiki wektorowej Cairo. | |
38 | ||
39 | Ten pakiet zawiera binaria potrzebne do uruchamiania programów | |
40 | używających biblioteki Cairo. | |
41 | ||
42 | %package devel | |
43 | Summary: OCaml interface to Cairo - development part | |
44 | Summary(pl.UTF-8): Interfejs OCamla do Cairo - cześć programistyczna | |
45 | Group: Development/Libraries | |
46 | Requires: %{name} = %{version}-%{release} | |
3ce04602 | 47 | %requires_eq ocaml |
16638ffb JB |
48 | |
49 | %description devel | |
50 | OCaml interface to Cairo, a 2D vector graphics library. | |
51 | ||
52 | This package contains files needed to develop OCaml programs using | |
53 | Cairo library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Interfejs OCamla do biblioteki dwuwymiarowej grafiki wektorowej Cairo. | |
57 | ||
58 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
59 | biblioteki Cairo. | |
60 | ||
61 | %package gtk | |
62 | Summary: OCaml interface to Cairo - Gtk canvas rendering | |
63 | Summary(pl.UTF-8): Interfejs OCamla do biblioteki Cairo - rendering na płótnie Gtk | |
64 | Group: Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: ocaml-lablgtk2 | |
67 | ||
68 | %description gtk | |
69 | OCaml interface to Cairo with Gtk canvas rendering. | |
70 | ||
71 | This package contains files needed to run bytecode executables using | |
72 | Cairo-Gtk library. | |
73 | ||
74 | %description gtk -l pl.UTF-8 | |
75 | Interfejs OCamla do biblioteki Cairo z renderowaniem na płótnie Gtk. | |
76 | ||
77 | Ten pakiet zawiera binaria potrzebne do uruchamiania programów | |
78 | używających biblioteki Cairo-Gtk. | |
79 | ||
80 | %package gtk-devel | |
81 | Summary: OCaml interface to Cairo with Gtk canvas - development part | |
82 | Summary(pl.UTF-8): Interfejs OCamla do Cairo z płótnem Canvas - cześć programistyczna | |
83 | Group: Development/Libraries | |
84 | Requires: %{name}-devel = %{version}-%{release} | |
85 | Requires: %{name}-gtk = %{version}-%{release} | |
86 | Requires: ocaml-lablgtk2-devel | |
87 | ||
88 | %description gtk-devel | |
89 | OCaml interface to Cairo with Gtk canvas rendering. | |
90 | ||
91 | This package contains files needed to develop OCaml programs using | |
f665e510 | 92 | Cairo-Gtk library. |
16638ffb JB |
93 | |
94 | %description gtk-devel -l pl.UTF-8 | |
95 | Interfejs OCamla do biblioteki Cairo z renderowaniem na płótnie Gtk. | |
96 | ||
97 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
f665e510 | 98 | biblioteki Cairo-Gtk. |
16638ffb | 99 | |
3ce04602 JR |
100 | %package pango |
101 | Summary: OCaml interface to Cairo - Pango text rendering | |
f665e510 | 102 | Summary(pl.UTF-8): Interfejs OCamla do biblioteki Cairo - rendering tekstu poprzez Pango |
3ce04602 JR |
103 | Group: Libraries |
104 | Requires: %{name} = %{version}-%{release} | |
105 | Requires: ocaml-lablgtk2 | |
106 | ||
107 | %description pango | |
108 | OCaml interface to Cairo with Pango text rendering. | |
109 | ||
110 | This package contains files needed to run bytecode executables using | |
f665e510 | 111 | Cairo-Pango library. |
3ce04602 JR |
112 | |
113 | %description pango -l pl.UTF-8 | |
114 | Interfejs OCamla do biblioteki Cairo z renderowaniem tekstu Pango. | |
115 | ||
116 | Ten pakiet zawiera binaria potrzebne do uruchamiania programów | |
f665e510 | 117 | używających biblioteki Cairo-Pango. |
3ce04602 JR |
118 | |
119 | %package pango-devel | |
120 | Summary: OCaml interface toa Cairo with Pango - development part | |
121 | Summary(pl.UTF-8): Interfejs OCamla do Cairo z Pango - cześć programistyczna | |
122 | Group: Development/Libraries | |
123 | Requires: %{name}-devel = %{version}-%{release} | |
124 | Requires: %{name}-pango = %{version}-%{release} | |
125 | Requires: ocaml-lablgtk2-devel | |
126 | ||
127 | %description pango-devel | |
128 | OCaml interface to Cairo with Pango text rendering. | |
129 | ||
130 | This package contains files needed to develop OCaml programs using | |
f665e510 | 131 | Cairo-Pango library. |
3ce04602 JR |
132 | |
133 | %description pango-devel -l pl.UTF-8 | |
134 | Interfejs OCamla do biblioteki Cairo z renderowaniem tekstu Pango. | |
135 | ||
136 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
f665e510 | 137 | biblioteki Cairo-Pango. |
3ce04602 | 138 | |
16638ffb JB |
139 | %prep |
140 | %setup -q -n cairo2-%{version} | |
141 | ||
142 | %build | |
3ce04602 | 143 | %{__make} |
16638ffb JB |
144 | |
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs | |
148 | ||
3ce04602 | 149 | dune install --destdir=$RPM_BUILD_ROOT |
16638ffb JB |
150 | |
151 | # packaged as %doc | |
152 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/cairo2/*.mli | |
f665e510 | 153 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/cairo2{,-gtk,-pango} |
16638ffb JB |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %files | |
159 | %defattr(644,root,root,755) | |
3ce04602 JR |
160 | %doc CHANGES.md README.md |
161 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcairo_stubs.so | |
162 | %{_libdir}/ocaml/cairo2/cairo.cma | |
16638ffb | 163 | %if %{with ocaml_opt} |
3ce04602 | 164 | %attr(755,root,root) %{_libdir}/ocaml/cairo2/cairo.cmxs |
16638ffb JB |
165 | %endif |
166 | ||
167 | %files devel | |
168 | %defattr(644,root,root,755) | |
169 | %doc src/cairo.mli | |
170 | %dir %{_libdir}/ocaml/cairo2 | |
3ce04602 JR |
171 | %{_libdir}/ocaml/cairo2/META |
172 | %{_libdir}/ocaml/cairo2/cairo.cmt | |
173 | %{_libdir}/ocaml/cairo2/cairo.cmti | |
174 | %{_libdir}/ocaml/cairo2/cairo.ml | |
175 | %{_libdir}/ocaml/cairo2/cairo_ocaml.h | |
176 | %{_libdir}/ocaml/cairo2/dune-package | |
16638ffb JB |
177 | %{_libdir}/ocaml/cairo2/cairo.cmi |
178 | %if %{with ocaml_opt} | |
179 | %{_libdir}/ocaml/cairo2/cairo.cmx | |
3ce04602 JR |
180 | %{_libdir}/ocaml/cairo2/cairo.a |
181 | %{_libdir}/ocaml/cairo2/cairo.cmxa | |
16638ffb | 182 | %endif |
3ce04602 JR |
183 | %{_libdir}/ocaml/cairo2/libcairo_stubs.a |
184 | %{_libdir}/ocaml/cairo2/opam | |
16638ffb JB |
185 | |
186 | %if %{with gtk} | |
187 | %files gtk | |
188 | %defattr(644,root,root,755) | |
189 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcairo_gtk_stubs.so | |
3ce04602 JR |
190 | %dir %{_libdir}/ocaml/cairo2-gtk |
191 | %{_libdir}/ocaml/cairo2-gtk/META | |
192 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cma | |
16638ffb | 193 | %if %{with ocaml_opt} |
3ce04602 | 194 | %attr(755,root,root) %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmxs |
16638ffb JB |
195 | %endif |
196 | ||
197 | %files gtk-devel | |
198 | %defattr(644,root,root,755) | |
3ce04602 JR |
199 | %doc gtk/cairo_gtk.mli |
200 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmi | |
201 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmt | |
202 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmti | |
203 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.ml | |
204 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.mli | |
3ce04602 JR |
205 | %{_libdir}/ocaml/cairo2-gtk/dune-package |
206 | %{_libdir}/ocaml/cairo2-gtk/opam | |
16638ffb | 207 | %if %{with ocaml_opt} |
498e0269 | 208 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.a |
3ce04602 JR |
209 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmx |
210 | %{_libdir}/ocaml/cairo2-gtk/cairo_gtk.cmxa | |
211 | %endif | |
212 | %{_libdir}/ocaml/cairo2-gtk/libcairo_gtk_stubs.a | |
16638ffb | 213 | %endif |
3ce04602 JR |
214 | |
215 | %files pango | |
f665e510 JB |
216 | %defattr(644,root,root,755) |
217 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcairo_pango_stubs.so | |
3ce04602 JR |
218 | %dir %{_libdir}/ocaml/cairo2-pango |
219 | %{_libdir}/ocaml/cairo2-pango/META | |
220 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cma | |
221 | %if %{with ocaml_opt} | |
f665e510 | 222 | %attr(755,root,root) %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmxs |
3ce04602 JR |
223 | %endif |
224 | ||
225 | %files pango-devel | |
f665e510 | 226 | %defattr(644,root,root,755) |
3ce04602 JR |
227 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmi |
228 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmt | |
229 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmti | |
230 | %if %{with ocaml_opt} | |
498e0269 | 231 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.a |
3ce04602 JR |
232 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmx |
233 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.cmxa | |
16638ffb | 234 | %endif |
3ce04602 JR |
235 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.ml |
236 | %{_libdir}/ocaml/cairo2-pango/cairo_pango.mli | |
237 | %{_libdir}/ocaml/cairo2-pango/dune-package | |
238 | %{_libdir}/ocaml/cairo2-pango/opam | |
239 | %{_libdir}/ocaml/cairo2-pango/libcairo_pango_stubs.a |