3 %bcond_without opengl # without OpenGL libraries
4 %bcond_without xft # without Xft support
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
12 License: LGPL with amendments (see COPYING)
14 Source0: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2
15 # Source0-md5: a1765594bc427ff892e36089fe1fa672
16 Source1: http://www.fltk.org/doc-1.1/%{name}.pdf
17 # Source1-md5: 31ed176facf7531ad46bb232fb24906b
18 Patch0: %{name}-desktop.patch
19 Patch1: %{name}-1.1.9-as-needed.patch
20 Patch2: %{name}-1.1.9-glibc2.10-scandir.patch
21 Patch3: %{name}-link.patch
22 URL: http://www.fltk.org/
23 %{?with_opengl:BuildRequires: OpenGL-GLU-devel}
24 BuildRequires: autoconf
25 BuildRequires: libjpeg-devel
26 BuildRequires: libpng-devel
27 BuildRequires: libstdc++-devel
28 BuildRequires: rpmbuild(macros) >= 1.315
29 %{?with_xft:BuildRequires: xorg-lib-libXft-devel}
30 BuildRequires: xorg-lib-libXinerama-devel
31 BuildRequires: xorg-util-makedepend
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _noautoreqdep libGL.so.1 libGLU.so.1
37 # don't propagate strip-flags to fltk-config.
38 %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
41 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
42 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
43 Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
44 by Mr. Bill Spitzak and is currently maintained by a small group of
45 developers across the world with a central repository in the US.
47 %description -l pl.UTF-8
48 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
49 na licencji LGPL narzędziem do tworzenia graficznych interfejsów
50 użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
51 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
52 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
53 deweloperów z różnych stron świata (centralne repozytorium znajduje
56 %description -l pt_BR.UTF-8
57 A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
58 ferramenta e interface gráfica feita em C++ para desenvolver
59 aplicativos para o X, OpenGL e Windows.
62 Summary: FLTK development files
63 Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK
64 Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK
65 Group: X11/Development/Libraries
66 Requires: %{name} = %{version}-%{release}
67 Requires: libjpeg-devel
68 Requires: libpng-devel
69 Requires: libstdc++-devel
70 %{?with_xft:Requires: xorg-lib-libXft-devel}
71 Requires: xorg-lib-libXinerama-devel
72 Obsoletes: libfltk1.1-devel
75 FLTK development files.
77 %description devel -l pl.UTF-8
78 Narzędzia programistyczne dla FLTK.
80 %description devel -l pt_BR.UTF-8
81 Arquivos de inclusão para o FLTK.
84 Summary: FLTK static library
85 Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie
86 Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK
87 Group: X11/Development/Libraries
88 Requires: %{name}-devel = %{version}-%{release}
93 %description static -l pl.UTF-8
94 Biblioteka FLTK konsolidowana statycznie.
96 %description static -l pt_BR.UTF-8
97 Bibliotecas estáticas para o FLTK.
100 Summary: FLTK GL library
101 Summary(pl.UTF-8): Biblioteka FLTK GL
103 Requires: %{name} = %{version}-%{release}
109 %description gl -l pl.UTF-8
113 Summary: Header files for FLTK GL library
114 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL
115 Group: X11/Development/Libraries
116 Requires: %{name}-devel = %{version}-%{release}
117 Requires: %{name}-gl = %{version}-%{release}
119 %description gl-devel
120 Header files for FLTK GL library.
122 %description gl-devel -l pl.UTF-8
123 Pliki nagłówkowe biblioteki FLTK GL.
126 Summary: FLTK GL static library
127 Summary(pl.UTF-8): Statyczna biblioteka FLTK GL
128 Group: X11/Development/Libraries
129 Requires: %{name}-gl-devel = %{version}-%{release}
130 Requires: %{name}-static = %{version}-%{release}
132 %description gl-static
133 FLTK GL static library.
135 %description gl-static -l pl.UTF-8
136 Statyczna biblioteka FLTK GL.
141 Group: X11/Applications/Games
142 Requires: %{name} = %{version}-%{release}
145 FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
147 %description -l pl.UTF-8
148 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
167 --with-optim="%{rpmcxxflags}" \
168 %{!?with_opengl:--disable-gl} \
169 %{?with_xft:--enable-xft}
174 rm -rf $RPM_BUILD_ROOT
178 DESTDIR=$RPM_BUILD_ROOT
180 # less generic games' names
181 for f in blocks checkers sudoku ; do
182 mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
183 mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
186 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
187 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
188 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
191 rm -rf $RPM_BUILD_ROOT
193 %post -p /sbin/ldconfig
194 %postun -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 # note: COPYING contains amendments to LGPL, so don't remove!
199 %doc CHANGES COPYING CREDITS README
200 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
201 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
202 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
205 %defattr(644,root,root,755)
206 %doc documentation/*.{html,gif,jpg} fltk.pdf
207 %doc %{_datadir}/doc/%{name}
208 %attr(755,root,root) %{_bindir}/fltk-config
209 %attr(755,root,root) %{_bindir}/fluid
210 %attr(755,root,root) %{_libdir}/libfltk.so
211 %attr(755,root,root) %{_libdir}/libfltk_forms.so
212 %attr(755,root,root) %{_libdir}/libfltk_images.so
214 %exclude %{_includedir}/FL/Fl_Gl_Window.*
215 %exclude %{_includedir}/FL/gl*
216 %{_iconsdir}/*/*/*/fluid.png
217 %{_desktopdir}/fluid.desktop
218 # move to some KDE package?
219 #%{_datadir}/mimelnk/application/x-fluid.desktop
220 %{_mandir}/man1/fltk-config.1*
221 %{_mandir}/man1/fluid.1*
222 %{_mandir}/man3/fltk.3*
225 %defattr(644,root,root,755)
227 %{_libdir}/libfltk_forms.a
228 %{_libdir}/libfltk_images.a
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libfltk_gl.so
238 %{_includedir}/FL/Fl_Gl_Window.*
239 %{_includedir}/FL/gl*
242 %defattr(644,root,root,755)
243 %{_libdir}/libfltk_gl.a
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/%{name}-blocks
249 %attr(755,root,root) %{_bindir}/%{name}-checkers
250 %attr(755,root,root) %{_bindir}/%{name}-sudoku
251 %{_iconsdir}/*/*/*/blocks.png
252 %{_iconsdir}/*/*/*/checkers.png
253 %{_iconsdir}/*/*/*/sudoku.png
254 %{_desktopdir}/blocks.desktop
255 %{_desktopdir}/checkers.desktop
256 %{_desktopdir}/sudoku.desktop
257 %{_mandir}/man6/%{name}-blocks.6*
258 %{_mandir}/man6/%{name}-checkers.6*
259 %{_mandir}/man6/%{name}-sudoku.6*