]> git.pld-linux.org Git - packages/fltk.git/blob - fltk.spec
- release 2 to get rid of -R from fltk-config
[packages/fltk.git] / fltk.spec
1 #
2 # Conditional build:
3 %bcond_without  opengl  # OpenGL libraries
4 %bcond_without  xft     # Xft support
5 #
6 Summary:        Fast Light Tool Kit
7 Summary(pl.UTF-8):      FLTK - "lekki" X11 toolkit
8 Summary(pt_BR.UTF-8):   Interface gráfica em C++ para X, OpenGL e Windows
9 Name:           fltk
10 Version:        1.3.8
11 Release:        2
12 License:        LGPL v2 with amendments (see COPYING)
13 Group:          X11/Libraries
14 #Source0Download: https://www.fltk.org/software.php
15 Source0:        https://www.fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2
16 # Source0-md5:  ed08b7985779213dc6190dc7b75d01a2
17 Patch0:         %{name}-desktop.patch
18 Patch1:         %{name}-as-needed.patch
19 Patch2:         %{name}-link.patch
20 Patch3:         %{name}-mime.patch
21 Patch4:         %{name}-export.patch
22 Patch5:         %{name}-docdir.patch
23 URL:            http://www.fltk.org/
24 %{?with_opengl:BuildRequires:   OpenGL-GLU-devel}
25 %{?with_opengl:BuildRequires:   OpenGL-GLX-devel}
26 BuildRequires:  alsa-lib-devel
27 BuildRequires:  autoconf >= 2.50
28 BuildRequires:  cairo-devel
29 BuildRequires:  doxygen
30 %{?with_xft:BuildRequires:      fontconfig-devel}
31 BuildRequires:  groff
32 BuildRequires:  libjpeg-devel
33 BuildRequires:  libpng-devel
34 BuildRequires:  libstdc++-devel
35 BuildRequires:  pkgconfig
36 BuildRequires:  rpmbuild(macros) >= 1.315
37 BuildRequires:  xorg-lib-libX11-devel
38 BuildRequires:  xorg-lib-libXcursor-devel
39 BuildRequires:  xorg-lib-libXext-devel
40 BuildRequires:  xorg-lib-libXfixes-devel
41 %{?with_xft:BuildRequires:      xorg-lib-libXft-devel}
42 BuildRequires:  xorg-lib-libXinerama-devel
43 BuildRequires:  xorg-lib-libXrender-devel
44 BuildRequires:  xorg-util-makedepend
45 Obsoletes:      libfltk1.1 < 1.2
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # don't propagate strip-flags to fltk-config.
49 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
50
51 %description
52 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
53 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
54 Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
55 by Mr. Bill Spitzak and is currently maintained by a small group of
56 developers across the world with a central repository in the US.
57
58 %description -l pl.UTF-8
59 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
60 na licencji LGPL narzędziem do tworzenia graficznych interfejsów
61 użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
62 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
63 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
64 deweloperów z różnych stron świata (centralne repozytorium znajduje
65 się w USA).
66
67 %description -l pt_BR.UTF-8
68 A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
69 ferramenta e interface gráfica feita em C++ para desenvolver
70 aplicativos para o X, OpenGL e Windows.
71
72 %package devel
73 Summary:        FLTK development files
74 Summary(pl.UTF-8):      Narzędzia programistyczne dla FLTK
75 Summary(pt_BR.UTF-8):   Arquivos de inclusão para o FLTK
76 Group:          X11/Development/Libraries
77 Requires:       %{name} = %{version}-%{release}
78 Requires:       libjpeg-devel
79 Requires:       libpng-devel
80 Requires:       libstdc++-devel
81 %{?with_xft:Requires:   xorg-lib-libXft-devel}
82 Requires:       xorg-lib-libXinerama-devel
83 Obsoletes:      libfltk1.1-devel < 1.2
84
85 %description devel
86 FLTK development files.
87
88 %description devel -l pl.UTF-8
89 Narzędzia programistyczne dla FLTK.
90
91 %description devel -l pt_BR.UTF-8
92 Arquivos de inclusão para o FLTK.
93
94 %package static
95 Summary:        FLTK static library
96 Summary(pl.UTF-8):      Biblioteka FLTK konsolidowana statycznie
97 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para o FLTK
98 Group:          X11/Development/Libraries
99 Requires:       %{name}-devel = %{version}-%{release}
100
101 %description static
102 FLTK static library.
103
104 %description static -l pl.UTF-8
105 Biblioteka FLTK konsolidowana statycznie.
106
107 %description static -l pt_BR.UTF-8
108 Bibliotecas estáticas para o FLTK.
109
110 %package cairo
111 Summary:        FLTK Cairo library
112 Summary(pl.UTF-8):      Biblioteka FLTK Cairo
113 Group:          X11/Libraries
114 Requires:       %{name} = %{version}-%{release}
115
116 %description cairo
117 FLTK Cairo library.
118
119 %description cairo -l pl.UTF-8
120 Biblioteka FLTK Cairo.
121
122 %package cairo-devel
123 Summary:        Header files for FLTK Cairo library
124 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FLTK Cairo
125 Group:          X11/Development/Libraries
126 Requires:       %{name}-devel = %{version}-%{release}
127 Requires:       %{name}-cairo = %{version}-%{release}
128
129 %description cairo-devel
130 Header files for FLTK Cairo library.
131
132 %description cairo-devel -l pl.UTF-8
133 Pliki nagłówkowe biblioteki FLTK Cairo.
134
135 %package cairo-static
136 Summary:        FLTK Cairo static library
137 Summary(pl.UTF-8):      Statyczna biblioteka FLTK Cairo
138 Group:          X11/Development/Libraries
139 Requires:       %{name}-cairo-devel = %{version}-%{release}
140
141 %description cairo-static
142 FLTK Cairo static library.
143
144 %description cairo-static -l pl.UTF-8
145 Statyczna biblioteka FLTK Cairo.
146
147 %package gl
148 Summary:        FLTK GL library
149 Summary(pl.UTF-8):      Biblioteka FLTK GL
150 Group:          X11/Libraries
151 Requires:       %{name} = %{version}-%{release}
152 Requires:       OpenGL
153
154 %description gl
155 FLTK GL library.
156
157 %description gl -l pl.UTF-8
158 Biblioteka FLTK GL.
159
160 %package gl-devel
161 Summary:        Header files for FLTK GL library
162 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FLTK GL
163 Group:          X11/Development/Libraries
164 Requires:       %{name}-devel = %{version}-%{release}
165 Requires:       %{name}-gl = %{version}-%{release}
166
167 %description gl-devel
168 Header files for FLTK GL library.
169
170 %description gl-devel -l pl.UTF-8
171 Pliki nagłówkowe biblioteki FLTK GL.
172
173 %package gl-static
174 Summary:        FLTK GL static library
175 Summary(pl.UTF-8):      Statyczna biblioteka FLTK GL
176 Group:          X11/Development/Libraries
177 Requires:       %{name}-gl-devel = %{version}-%{release}
178 Requires:       %{name}-static = %{version}-%{release}
179
180 %description gl-static
181 FLTK GL static library.
182
183 %description gl-static -l pl.UTF-8
184 Statyczna biblioteka FLTK GL.
185
186 %package apidocs
187 Summary:        API documentation for FLTK library
188 Summary(pl.UTF-8):      Dokumentacja API biblioteki FLTK
189 Group:          Documentation
190
191 %description apidocs
192 API documentation for FLTK library.
193
194 %description apidocs -l pl.UTF-8
195 Dokumentacja API biblioteki FLTK.
196
197 %package fluid
198 Summary:        FLTK GUI Designer
199 Summary(pl.UTF-8):      Narzędzie FLTK do projektowania GUI
200 Group:          X11/Development/Tools
201 Requires(post,postun):  desktop-file-utils
202 Requires(post,postun):  shared-mime-info
203 Requires:       %{name} = %{version}-%{release}
204 Requires:       %{name}-cairo = %{version}-%{release}
205 Suggests:       %{name}-apidocs = %{version}-%{release}
206
207 %description fluid
208 FLTK GUI Designer.
209
210 %description fluid -l pl.UTF-8
211 Narzędzie FLTK do projektowania GUI.
212
213 %package games
214 Summary:        FLTK Games
215 Summary(pl.UTF-8):      Gry FLTK
216 Group:          X11/Applications/Games
217 Requires:       %{name} = %{version}-%{release}
218
219 %description games
220 FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
221
222 %description games -l pl.UTF-8
223 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
224
225 %prep
226 %setup -q
227 %patch0 -p1
228 %patch1 -p1
229 %patch2 -p1
230 %patch3 -p1
231 %patch4 -p1
232 %patch5 -p1
233
234 %build
235 # gold doesn't understand -l:path/to/library.so
236 if [ -x /usr/bin/ld.bfd ]; then
237         install -d ld-dir
238         ln -sf /usr/bin/ld.bfd ld-dir/ld
239         export PATH=$(pwd)/ld-dir:$PATH
240 fi
241 %{__autoconf}
242 %configure \
243         --enable-cairo \
244         --enable-largefile \
245         --enable-shared \
246         --enable-threads \
247         --enable-xinerama \
248         --with-x \
249         --with-optim="%{rpmcxxflags}" \
250         %{!?with_opengl:--disable-gl} \
251         %{?with_xft:--enable-xft}
252
253 %{__make}
254
255 %{__make} -C documentation html
256
257 %install
258 rm -rf $RPM_BUILD_ROOT
259
260 %{__make} install install-desktop \
261         DESTDIR=$RPM_BUILD_ROOT
262
263 # less generic games' names
264 for f in blocks checkers sudoku ; do
265 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
266 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
267 done
268
269 # we package mans in groff format
270 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat?
271
272 # packaged as %doc
273 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
274
275 %clean
276 rm -rf $RPM_BUILD_ROOT
277
278 %post   -p /sbin/ldconfig
279 %postun -p /sbin/ldconfig
280
281 %post   cairo -p /sbin/ldconfig
282 %postun cairo -p /sbin/ldconfig
283
284 %post   gl -p /sbin/ldconfig
285 %postun gl -p /sbin/ldconfig
286
287 %post   fluid
288 %update_icon_cache hicolor
289 %update_desktop_database
290 %update_mime_database
291
292 %postun fluid
293 %update_icon_cache hicolor
294 %update_desktop_database
295 %update_mime_database
296
297 %post   games
298 %update_icon_cache hicolor
299
300 %postun games
301 %update_icon_cache hicolor
302
303 %files
304 %defattr(644,root,root,755)
305 # note: COPYING contains amendments to LGPL, so don't remove!
306 %doc ANNOUNCEMENT CHANGES COPYING CREDITS README
307 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
308 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
309 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
310
311 %files devel
312 %defattr(644,root,root,755)
313 %attr(755,root,root) %{_bindir}/fltk-config
314 %attr(755,root,root) %{_libdir}/libfltk.so
315 %attr(755,root,root) %{_libdir}/libfltk_forms.so
316 %attr(755,root,root) %{_libdir}/libfltk_images.so
317 %{_includedir}/FL
318 %exclude %{_includedir}/FL/Fl_Cairo*.H
319 %exclude %{_includedir}/FL/Fl_Gl_Window.H
320 %exclude %{_includedir}/FL/gl*
321 %{_mandir}/man1/fltk-config.1*
322 %{_mandir}/man3/fltk.3*
323
324 %files static
325 %defattr(644,root,root,755)
326 %{_libdir}/libfltk.a
327 %{_libdir}/libfltk_forms.a
328 %{_libdir}/libfltk_images.a
329
330 %files cairo
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/libfltk_cairo.so.*.*
333
334 %files cairo-devel
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_libdir}/libfltk_cairo.so
337 %{_includedir}/FL/Fl_Cairo*.H
338
339 %files cairo-static
340 %defattr(644,root,root,755)
341 %{_libdir}/libfltk_cairo.a
342
343 %if %{with opengl}
344 %files gl
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
347
348 %files gl-devel
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libdir}/libfltk_gl.so
351 %{_includedir}/FL/Fl_Gl_Window.H
352 %{_includedir}/FL/gl*
353
354 %files gl-static
355 %defattr(644,root,root,755)
356 %{_libdir}/libfltk_gl.a
357 %endif
358
359 %files apidocs
360 %defattr(644,root,root,755)
361 %doc documentation/html/*.{html,jpg,png}
362
363 %files fluid
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_bindir}/fluid
366 %{_iconsdir}/hicolor/*x*/apps/fluid.png
367 %{_desktopdir}/fluid.desktop
368 %{_datadir}/mime/packages/fluid.xml
369 %{_mandir}/man1/fluid.1*
370
371 %files games
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_bindir}/%{name}-blocks
374 %attr(755,root,root) %{_bindir}/%{name}-checkers
375 %attr(755,root,root) %{_bindir}/%{name}-sudoku
376 %{_iconsdir}/hicolor/*x*/apps/blocks.png
377 %{_iconsdir}/hicolor/*x*/apps/checkers.png
378 %{_iconsdir}/hicolor/*x*/apps/sudoku.png
379 %{_desktopdir}/blocks.desktop
380 %{_desktopdir}/checkers.desktop
381 %{_desktopdir}/sudoku.desktop
382 %{_mandir}/man6/%{name}-blocks.6*
383 %{_mandir}/man6/%{name}-checkers.6*
384 %{_mandir}/man6/%{name}-sudoku.6*
This page took 0.124812 seconds and 4 git commands to generate.