]>
Commit | Line | Data |
---|---|---|
2a0616cb JB |
1 | # |
2 | # Conditional build: | |
f8bf4083 JB |
3 | %bcond_without opengl # OpenGL libraries |
4 | %bcond_without xft # Xft support | |
2a0616cb | 5 | # |
7fc6d680 | 6 | Summary: Fast Light Tool Kit |
4b6978bf ER |
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 | |
b60fb8ea | 9 | Name: fltk |
f8bf4083 | 10 | Version: 1.3.8 |
f8428ce5 | 11 | Release: 2 |
33e36aec | 12 | License: LGPL v2 with amendments (see COPYING) |
d81eced3 | 13 | Group: X11/Libraries |
61aaaffe JB |
14 | #Source0Download: https://www.fltk.org/software.php |
15 | Source0: https://www.fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2 | |
f8bf4083 | 16 | # Source0-md5: ed08b7985779213dc6190dc7b75d01a2 |
31d67676 | 17 | Patch0: %{name}-desktop.patch |
33e36aec | 18 | Patch1: %{name}-as-needed.patch |
ab1ed912 | 19 | Patch2: %{name}-link.patch |
61aaaffe | 20 | Patch3: %{name}-mime.patch |
33e36aec | 21 | Patch4: %{name}-export.patch |
61aaaffe | 22 | Patch5: %{name}-docdir.patch |
b60fb8ea | 23 | URL: http://www.fltk.org/ |
63c2ba9a | 24 | %{?with_opengl:BuildRequires: OpenGL-GLU-devel} |
1163b418 | 25 | %{?with_opengl:BuildRequires: OpenGL-GLX-devel} |
f8bf4083 | 26 | BuildRequires: alsa-lib-devel |
7cf84cd2 | 27 | BuildRequires: autoconf >= 2.50 |
1163b418 | 28 | BuildRequires: cairo-devel |
3a0c718d | 29 | BuildRequires: doxygen |
1163b418 | 30 | %{?with_xft:BuildRequires: fontconfig-devel} |
9ef5757d | 31 | BuildRequires: groff |
f367f3af | 32 | BuildRequires: libjpeg-devel |
33 | BuildRequires: libpng-devel | |
e878e300 | 34 | BuildRequires: libstdc++-devel |
1163b418 | 35 | BuildRequires: pkgconfig |
c50b5a59 | 36 | BuildRequires: rpmbuild(macros) >= 1.315 |
f8bf4083 | 37 | BuildRequires: xorg-lib-libX11-devel |
1163b418 | 38 | BuildRequires: xorg-lib-libXcursor-devel |
7cf84cd2 | 39 | BuildRequires: xorg-lib-libXext-devel |
1163b418 | 40 | BuildRequires: xorg-lib-libXfixes-devel |
2a97c2d8 | 41 | %{?with_xft:BuildRequires: xorg-lib-libXft-devel} |
9ef5757d | 42 | BuildRequires: xorg-lib-libXinerama-devel |
f8bf4083 | 43 | BuildRequires: xorg-lib-libXrender-devel |
2a97c2d8 | 44 | BuildRequires: xorg-util-makedepend |
f3efe00a | 45 | Obsoletes: libfltk1.1 < 1.2 |
40ead817 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b60fb8ea | 47 | |
2a97c2d8 PS |
48 | # don't propagate strip-flags to fltk-config. |
49 | %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* | |
50 | ||
b60fb8ea | 51 | %description |
d81eced3 | 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. | |
b60fb8ea | 57 | |
365a84da | 58 | %description -l pl.UTF-8 |
35d364df | 59 | Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym |
365a84da JR |
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) | |
da10c525 | 62 | Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill |
365a84da JR |
63 | Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę |
64 | deweloperów z różnych stron świata (centralne repozytorium znajduje | |
65 | się w USA). | |
da10c525 | 66 | |
365a84da JR |
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 | |
da10c525 | 70 | aplicativos para o X, OpenGL e Windows. |
d08d2885 | 71 | |
9cc982f0 | 72 | %package devel |
73 | Summary: FLTK development files | |
4b6978bf ER |
74 | Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK |
75 | Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK | |
d997f6b0 | 76 | Group: X11/Development/Libraries |
1ca19f4f | 77 | Requires: %{name} = %{version}-%{release} |
f367f3af | 78 | Requires: libjpeg-devel |
79 | Requires: libpng-devel | |
ca9f2784 | 80 | Requires: libstdc++-devel |
f367f3af | 81 | %{?with_xft:Requires: xorg-lib-libXft-devel} |
9ef5757d | 82 | Requires: xorg-lib-libXinerama-devel |
f3efe00a | 83 | Obsoletes: libfltk1.1-devel < 1.2 |
b60fb8ea | 84 | |
9cc982f0 | 85 | %description devel |
86 | FLTK development files. | |
b60fb8ea | 87 | |
365a84da JR |
88 | %description devel -l pl.UTF-8 |
89 | Narzędzia programistyczne dla FLTK. | |
d997f6b0 | 90 | |
365a84da JR |
91 | %description devel -l pt_BR.UTF-8 |
92 | Arquivos de inclusão para o FLTK. | |
da10c525 | 93 | |
9cc982f0 | 94 | %package static |
9d5f643f | 95 | Summary: FLTK static library |
4b6978bf ER |
96 | Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie |
97 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK | |
d997f6b0 | 98 | Group: X11/Development/Libraries |
1ca19f4f | 99 | Requires: %{name}-devel = %{version}-%{release} |
b60fb8ea | 100 | |
9cc982f0 | 101 | %description static |
102 | FLTK static library. | |
b60fb8ea | 103 | |
365a84da | 104 | %description static -l pl.UTF-8 |
a7506872 | 105 | Biblioteka FLTK konsolidowana statycznie. |
b60fb8ea | 106 | |
365a84da JR |
107 | %description static -l pt_BR.UTF-8 |
108 | Bibliotecas estáticas para o FLTK. | |
da10c525 | 109 | |
1163b418 JB |
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 | ||
e878e300 JB |
147 | %package gl |
148 | Summary: FLTK GL library | |
4b6978bf | 149 | Summary(pl.UTF-8): Biblioteka FLTK GL |
e878e300 | 150 | Group: X11/Libraries |
1ca19f4f | 151 | Requires: %{name} = %{version}-%{release} |
e878e300 JB |
152 | Requires: OpenGL |
153 | ||
154 | %description gl | |
155 | FLTK GL library. | |
156 | ||
365a84da | 157 | %description gl -l pl.UTF-8 |
e878e300 JB |
158 | Biblioteka FLTK GL. |
159 | ||
160 | %package gl-devel | |
161 | Summary: Header files for FLTK GL library | |
4b6978bf | 162 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL |
e878e300 | 163 | Group: X11/Development/Libraries |
1ca19f4f JB |
164 | Requires: %{name}-devel = %{version}-%{release} |
165 | Requires: %{name}-gl = %{version}-%{release} | |
e878e300 JB |
166 | |
167 | %description gl-devel | |
168 | Header files for FLTK GL library. | |
169 | ||
365a84da JR |
170 | %description gl-devel -l pl.UTF-8 |
171 | Pliki nagłówkowe biblioteki FLTK GL. | |
e878e300 JB |
172 | |
173 | %package gl-static | |
174 | Summary: FLTK GL static library | |
4b6978bf | 175 | Summary(pl.UTF-8): Statyczna biblioteka FLTK GL |
e878e300 | 176 | Group: X11/Development/Libraries |
1ca19f4f JB |
177 | Requires: %{name}-gl-devel = %{version}-%{release} |
178 | Requires: %{name}-static = %{version}-%{release} | |
e878e300 JB |
179 | |
180 | %description gl-static | |
181 | FLTK GL static library. | |
182 | ||
365a84da | 183 | %description gl-static -l pl.UTF-8 |
e878e300 JB |
184 | Statyczna biblioteka FLTK GL. |
185 | ||
61aaaffe JB |
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} | |
dd4d24cf | 204 | Requires: %{name}-cairo = %{version}-%{release} |
61aaaffe JB |
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 | ||
2213f907 | 213 | %package games |
214 | Summary: FLTK Games | |
e1d0fca4 | 215 | Summary(pl.UTF-8): Gry FLTK |
2213f907 | 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 | ||
097d503d | 222 | %description games -l pl.UTF-8 |
9ef5757d | 223 | Gry FLTK: Atak Klocków!, Warcaby, Sudoku. |
2213f907 | 224 | |
b60fb8ea | 225 | %prep |
3a0c718d | 226 | %setup -q |
2a97c2d8 PS |
227 | %patch0 -p1 |
228 | %patch1 -p1 | |
ab1ed912 | 229 | %patch2 -p1 |
f1004040 | 230 | %patch3 -p1 |
33e36aec | 231 | %patch4 -p1 |
61aaaffe | 232 | %patch5 -p1 |
9cc982f0 | 233 | |
b60fb8ea | 234 | %build |
8ac83007 JB |
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 | |
e878e300 | 241 | %{__autoconf} |
ade5391e | 242 | %configure \ |
1163b418 | 243 | --enable-cairo \ |
98bcdec6 | 244 | --enable-largefile \ |
9cc982f0 | 245 | --enable-shared \ |
98bcdec6 | 246 | --enable-threads \ |
247 | --enable-xinerama \ | |
2a0616cb | 248 | --with-x \ |
1c2d3b78 | 249 | --with-optim="%{rpmcxxflags}" \ |
63c2ba9a | 250 | %{!?with_opengl:--disable-gl} \ |
40ead817 | 251 | %{?with_xft:--enable-xft} |
d997f6b0 | 252 | |
6d2b733d | 253 | %{__make} |
61aaaffe JB |
254 | |
255 | %{__make} -C documentation html | |
b60fb8ea | 256 | |
b60fb8ea | 257 | %install |
258 | rm -rf $RPM_BUILD_ROOT | |
911d5d7f | 259 | |
61aaaffe | 260 | %{__make} install install-desktop \ |
2213f907 | 261 | DESTDIR=$RPM_BUILD_ROOT |
d997f6b0 | 262 | |
2213f907 | 263 | # less generic games' names |
264 | for f in blocks checkers sudoku ; do | |
33e36aec JB |
265 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f} |
266 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6 | |
2213f907 | 267 | done |
b60fb8ea | 268 | |
33e36aec JB |
269 | # we package mans in groff format |
270 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat? | |
271 | ||
61aaaffe | 272 | # packaged as %doc |
33e36aec | 273 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
2a753e56 | 274 | |
b60fb8ea | 275 | %clean |
276 | rm -rf $RPM_BUILD_ROOT | |
277 | ||
51899b70 JB |
278 | %post -p /sbin/ldconfig |
279 | %postun -p /sbin/ldconfig | |
280 | ||
1163b418 JB |
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 | ||
61aaaffe JB |
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 | ||
b60fb8ea | 303 | %files |
304 | %defattr(644,root,root,755) | |
ddfacda5 | 305 | # note: COPYING contains amendments to LGPL, so don't remove! |
61aaaffe | 306 | %doc ANNOUNCEMENT CHANGES COPYING CREDITS README |
e878e300 JB |
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.*.* | |
b60fb8ea | 310 | |
311 | %files devel | |
312 | %defattr(644,root,root,755) | |
ade5391e | 313 | %attr(755,root,root) %{_bindir}/fltk-config |
ade5391e | 314 | %attr(755,root,root) %{_libdir}/libfltk.so |
e878e300 JB |
315 | %attr(755,root,root) %{_libdir}/libfltk_forms.so |
316 | %attr(755,root,root) %{_libdir}/libfltk_images.so | |
9cc982f0 | 317 | %{_includedir}/FL |
1163b418 | 318 | %exclude %{_includedir}/FL/Fl_Cairo*.H |
33e36aec | 319 | %exclude %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 | 320 | %exclude %{_includedir}/FL/gl* |
c1c513bd | 321 | %{_mandir}/man1/fltk-config.1* |
c1c513bd | 322 | %{_mandir}/man3/fltk.3* |
9cc982f0 | 323 | |
324 | %files static | |
325 | %defattr(644,root,root,755) | |
1ca19f4f JB |
326 | %{_libdir}/libfltk.a |
327 | %{_libdir}/libfltk_forms.a | |
328 | %{_libdir}/libfltk_images.a | |
e878e300 | 329 | |
1163b418 JB |
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 | ||
63c2ba9a | 343 | %if %{with opengl} |
e878e300 JB |
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 | |
33e36aec | 351 | %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 JB |
352 | %{_includedir}/FL/gl* |
353 | ||
354 | %files gl-static | |
355 | %defattr(644,root,root,755) | |
1ca19f4f | 356 | %{_libdir}/libfltk_gl.a |
e878e300 | 357 | %endif |
2213f907 | 358 | |
61aaaffe JB |
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 | ||
2213f907 | 371 | %files games |
0b686db1 | 372 | %defattr(644,root,root,755) |
2213f907 | 373 | %attr(755,root,root) %{_bindir}/%{name}-blocks |
374 | %attr(755,root,root) %{_bindir}/%{name}-checkers | |
375 | %attr(755,root,root) %{_bindir}/%{name}-sudoku | |
61aaaffe JB |
376 | %{_iconsdir}/hicolor/*x*/apps/blocks.png |
377 | %{_iconsdir}/hicolor/*x*/apps/checkers.png | |
378 | %{_iconsdir}/hicolor/*x*/apps/sudoku.png | |
2213f907 | 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* |