]> git.pld-linux.org Git - SPECS.git/blob - ocaml-lablgtk.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ocaml-lablgtk.spec
1 #
2 # Conditional build:
3 %bcond_with     opengl  # build with lablgtkgl packages
4 %bcond_with     glade   # build with lablgtkglade packages
5 %bcond_with     gnome   # build with lablgtkgnome packages
6 #
7 %define         ocaml_ver       1:3.09.2
8 Summary:        GTK+ binding for OCaml
9 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla
10 Name:           ocaml-lablgtk
11 Version:        1.2.7
12 Release:        13
13 Epoch:          1
14 License:        LGPL w/ linking exceptions
15 Group:          Libraries
16 Source0:        http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%{version}.tar.gz
17 # Source0-md5:  73a797e3a459190fdcaa8288935f6fb9
18 URL:            http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html
19 BuildRequires:  gdk-pixbuf-devel
20 %{?with_gnome:BuildRequires:    gnome-libs-devel}
21 BuildRequires:  gtk+-devel
22 %{?with_opengl:BuildRequires:   gtkglarea1-devel >= 1.2.0}
23 %{?with_glade:BuildRequires:    libglade-devel}
24 %if %{with glade} && %{with gnome}
25 BuildRequires:  libglade-gnome-devel
26 %endif
27 BuildRequires:  libxml-devel
28 BuildRequires:  ocaml-camlp4 >= %{ocaml_ver}
29 %{?with_opengl:BuildRequires:   ocaml-lablgl-devel}
30 BuildRequires:  which
31 %requires_eq    ocaml-runtime
32 Obsoletes:      lablgtk
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 GTK+ binding for OCaml. This package contains files needed to run
37 bytecode OCaml programs using LablGtk.
38
39 %description -l pl.UTF-8
40 Wiązania GTK+ dla OCamla. Pakiet ten zawiera binaria potrzebne do
41 uruchamiania programów używających LablGtk.
42
43 %package devel
44 Summary:        GTK+ binding for OCaml - development part
45 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - cześć programistyczna
46 Group:          Development/Libraries
47 Requires:       %{name} = %{epoch}:%{version}-%{release}
48 %requires_eq    ocaml
49 %{?with_opengl:%requires_eq     ocaml-lablgl-devel}
50 Obsoletes:      lablgtk-examples
51
52 %description devel
53 GTK+ binding for OCaml. This package contains files needed to develop
54 OCaml programs using LablGtk.
55
56 %description devel -l pl.UTF-8
57 Wiązania GTK+ dla OCamla. Pakiet ten zawiera pliki niezbędne do
58 tworzenia programów używających LablGtk.
59
60 %package gnome
61 Summary:        GTK+ binding for OCaml - GNOME support
62 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla GNOME
63 Group:          Libraries
64 Requires:       %{name} = %{epoch}:%{version}-%{release}
65 %requires_eq    ocaml-runtime
66
67 %description gnome
68 GTK+ binding for OCaml, GNOME support. This package contains files
69 needed to run bytecode OCaml programs using LablGtk-GNOME.
70
71 %description gnome -l pl.UTF-8
72 Wiązania GTK+ dla OCamla, wsparcie dla GNOME. Pakiet ten zawiera
73 binaria potrzebne do uruchamiania programów używających LablGtk-GNOME.
74
75 %package gnome-devel
76 Summary:        GTK+ binding for OCaml - GNOME support, development part
77 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla GNOME, część programistyczna
78 Group:          Development/Libraries
79 Requires:       %{name}-gnome = %{epoch}:%{version}-%{release}
80 %requires_eq    ocaml
81
82 %description gnome-devel
83 GTK+ binding for OCaml, GNOME support. This package contains files
84 needed to develop OCaml programs using LablGtk-GNOME.
85
86 %description gnome-devel -l pl.UTF-8
87 Wiązania GTK+ dla OCamla, wsparcie dla GNOME. Pakiet ten zawiera pliki
88 niezbędne do tworzenia programów używających LablGtk-GNOME.
89
90 %package glade
91 Summary:        GTK+ binding for OCaml - Glade support
92 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla Glade
93 Group:          Libraries
94 Requires:       %{name} = %{epoch}:%{version}-%{release}
95 %requires_eq    ocaml-runtime
96
97 %description glade
98 GTK+ binding for OCaml, Glade support. This package contains files
99 needed to run bytecode OCaml programs using LablGtk-Glade.
100
101 %description glade -l pl.UTF-8
102 Wiązania GTK+ dla OCamla, wsparcie dla Glade. Pakiet ten zawiera
103 binaria potrzebne do uruchamiania programów używających LablGtk-Glade.
104
105 %package glade-devel
106 Summary:        GTK+ binding for OCaml - Glade support, development part
107 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla Glade, część programistyczna
108 Group:          Development/Libraries
109 Requires:       %{name}-glade = %{epoch}:%{version}-%{release}
110 %requires_eq    ocaml
111
112 %description glade-devel
113 GTK+ binding for OCaml, Glade support. This package contains files
114 needed to develop OCaml programs using LablGtk-Glade.
115
116 %description glade-devel -l pl.UTF-8
117 Wiązania GTK+ dla OCamla, wsparcie dla Glade. Pakiet ten zawiera pliki
118 niezbędne do tworzenia programów używających LablGtk-Glade.
119
120 %package gl
121 Summary:        GTK+ binding for OCaml - GtkGL support
122 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla GtkGL
123 Group:          Libraries
124 Requires:       %{name} = %{epoch}:%{version}-%{release}
125 %requires_eq    ocaml-runtime
126 %{?with_opengl:%requires_eq     ocaml-lablgl}
127
128 %description gl
129 GTK+ binding for OCaml, GtkGL support. This package contains files
130 needed to run bytecode OCaml programs using LablGtk-GtkGL.
131
132 %description gl -l pl.UTF-8
133 Wiązania GTK+ dla OCamla, wsparcie dla GtkGL. Pakiet ten zawiera
134 binaria potrzebne do uruchamiania programów używających LablGtk-GtkGL.
135
136 %package gl-devel
137 Summary:        GTK+ binding for OCaml - GtkGL support, development part
138 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - wsparcie dla GtkGL, część programistyczna
139 Group:          Development/Libraries
140 Requires:       %{name}-gl = %{epoch}:%{version}-%{release}
141 %requires_eq    ocaml
142 %{?with_opengl:%requires_eq     ocaml-lablgl-devel}
143
144 %description gl-devel
145 GTK+ binding for OCaml, GtkGL support. This package contains files
146 needed to develop OCaml programs using LablGtk-GtkGL.
147
148 %description gl-devel -l pl.UTF-8
149 Wiązania GTK+ dla OCamla, wsparcie dla GtkGL. Pakiet ten zawiera pliki
150 niezbędne do tworzenia programów używających LablGtk-GtkGL.
151
152 %package toplevel
153 Summary:        GTK+ binding for OCaml - interactive system
154 Summary(pl.UTF-8):      Wiązania GTK+ dla OCamla - system interaktywny
155 Group:          Development/Libraries
156 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
157 %requires_eq    ocaml
158
159 %description toplevel
160 GTK+ binding for OCaml. GNOME and Glade support is included. This
161 package contains OCaml toplevel interactive system linked with
162 lablgtk.
163
164 %description toplevel -l pl.UTF-8
165 Wiązania GTK+ dla OCamla. Wsparcie dla GNOME i Glade jest dołączone.
166 Pakiet ten zawiera system interaktywny OCamla skonsolidowany z
167 lablgtk.
168
169 %prep
170 %setup -q -n lablgtk-%{version}
171
172 %build
173 %{__make} configure \
174         CC="%{__cc} %{rpmcflags} -fPIC" \
175         USE_CC=1 \
176         %{?with_gnome:USE_GNOME=1} \
177         %{?with_glade:USE_GLADE=1} \
178         %{?with_opengl:USE_GL=1}
179
180 %{__make} all opt -j1 \
181         LABLGLDIR=%{_libdir}/ocaml/lablgl
182
183 %install
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/ocaml/stublibs}
186
187 %{__make} install \
188         INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk \
189         DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
190         LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
191         BINDIR=$RPM_BUILD_ROOT%{_bindir}
192
193 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
194 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
195
196 # .mli files stay, they are the only documentation, but .ml go
197 rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.ml
198 gzip -9nf $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.mli
199 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/lablgtk/*.gz .
200
201 # make METAs for findlib
202 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labl{gtk,gnome,glade,gtkgl}
203 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk/META <<EOF
204 # Specifications for the "lablgtk" library:
205 requires = ""
206 version = "%{version}"
207 directory = "+lablgtk"
208 archive(byte) = "lablgtk.cma gtkInit.cmo"
209 archive(native) = "lablgtk.cmxa gtkInit.cmx"
210 linkopts = ""
211 EOF
212
213 for f in gnome glade gtkgl ; do
214 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labl$f/META <<EOF
215 # Specifications for the "lablgtk" library:
216 requires = "lablgtk"
217 version = "%{version}"
218 directory = "+lablgtk"
219 archive(byte) = "labl$f.cma"
220 archive(native) = "labl$f.cmxa"
221 linkopts = ""
222 EOF
223 done
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %files
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtk.so
231
232 %files devel
233 %defattr(644,root,root,755)
234 %doc CHANGES COPYING README
235 %dir %{_libdir}/ocaml/lablgtk
236 %{_libdir}/ocaml/lablgtk/g[BCDELMOPRTUWadp]*.cm*
237 %{_libdir}/ocaml/lablgtk/glib.cm*
238 %{_libdir}/ocaml/lablgtk/gtk.cm*
239 %{_libdir}/ocaml/lablgtk/gtk[ABDEILMNPRSTW]*.cm*
240 # hmm.. where did xml_lexer go?
241 #%%{_libdir}/ocaml/lablgtk/x*.cm*
242 %{_libdir}/ocaml/lablgtk/*.[ho]
243 %{_libdir}/ocaml/lablgtk/lablgtk.*
244 %{_libdir}/ocaml/lablgtk/liblablgtk.*
245 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/varcc
246 %{_examplesdir}/%{name}-%{version}
247 %{_libdir}/ocaml/site-lib/lablgtk
248
249 %if %{with gnome}
250 %files gnome
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgnome.so
253 %{_libdir}/ocaml/dlllablgnome.so
254
255 %files gnome-devel
256 %defattr(644,root,root,755)
257 %{_libdir}/ocaml/lablgtk/gtkXmHTML.cm*
258 %{_libdir}/ocaml/lablgtk/gHtml.cm*
259 %{_libdir}/ocaml/lablgtk/lablgnome.*
260 %{_libdir}/ocaml/lablgtk/liblablgnome.*
261 %{_libdir}/ocaml/site-lib/lablgnome
262 %endif
263
264 %if %{with glade}
265 %files glade
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablglade.so
268 %{_libdir}/ocaml/dlllablglade.so
269
270 %files glade-devel
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_bindir}/lablgladecc
273 %{_libdir}/ocaml/lablgtk/glade.cm*
274 %{_libdir}/ocaml/lablgtk/lablglade.*
275 %{_libdir}/ocaml/lablgtk/liblablglade.*
276 %{_libdir}/ocaml/site-lib/lablglade
277 %endif
278
279 %if %{with opengl}
280 %files gl
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dlllablgtkgl.so
283 %{_libdir}/ocaml/dlllablgtkgl.so
284
285 %files gl-devel
286 %defattr(644,root,root,755)
287 %{_libdir}/ocaml/lablgtk/glGtk.cm*
288 %{_libdir}/ocaml/lablgtk/lablgtkgl.*
289 %{_libdir}/ocaml/lablgtk/liblablgtkgl.*
290 %{_libdir}/ocaml/site-lib/lablgtkgl
291 %endif
292
293 %files toplevel
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_bindir}/lablgtk
296 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/lablgtktop
297 %attr(755,root,root) %{_libdir}/ocaml/lablgtk/lablgtktop_t
This page took 0.051797 seconds and 3 git commands to generate.