1 # TODO: enable cairo support?
4 %bcond_without opengl # without OpenGL libraries
5 %bcond_without xft # without Xft support
7 Summary: Fast Light Tool Kit
8 Summary(pl.UTF-8): FLTK - "lekki" X11 toolkit
9 Summary(pt_BR.UTF-8): Interface gráfica em C++ para X, OpenGL e Windows
13 License: LGPL with amendments (see COPYING)
15 Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
16 # Source0-md5: 9f7e707d4fb7a5a76f0f9b73ff70623d
17 Patch0: %{name}-desktop.patch
18 Patch1: %{name}-1.3.0-as-needed.patch
19 Patch2: %{name}-link.patch
20 Patch3: %{name}-libjpeg.patch
21 URL: http://www.fltk.org/
22 %{?with_opengl:BuildRequires: OpenGL-GLU-devel}
23 BuildRequires: autoconf >= 2.50
24 BuildRequires: doxygen
26 BuildRequires: libjpeg-devel
27 BuildRequires: libpng-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: rpmbuild(macros) >= 1.315
30 BuildRequires: xorg-lib-libXext-devel
31 %{?with_xft:BuildRequires: xorg-lib-libXft-devel}
32 BuildRequires: xorg-lib-libXinerama-devel
33 BuildRequires: xorg-util-makedepend
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _noautoreqdep libGL.so.1 libGLU.so.1
39 # don't propagate strip-flags to fltk-config.
40 %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
43 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
44 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
45 Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
46 by Mr. Bill Spitzak and is currently maintained by a small group of
47 developers across the world with a central repository in the US.
49 %description -l pl.UTF-8
50 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
51 na licencji LGPL narzędziem do tworzenia graficznych interfejsów
52 użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
53 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
54 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
55 deweloperów z różnych stron świata (centralne repozytorium znajduje
58 %description -l pt_BR.UTF-8
59 A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
60 ferramenta e interface gráfica feita em C++ para desenvolver
61 aplicativos para o X, OpenGL e Windows.
64 Summary: FLTK development files
65 Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK
66 Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK
67 Group: X11/Development/Libraries
68 Requires: %{name} = %{version}-%{release}
69 Requires: libjpeg-devel
70 Requires: libpng-devel
71 Requires: libstdc++-devel
72 %{?with_xft:Requires: xorg-lib-libXft-devel}
73 Requires: xorg-lib-libXinerama-devel
74 Obsoletes: libfltk1.1-devel
77 FLTK development files.
79 %description devel -l pl.UTF-8
80 Narzędzia programistyczne dla FLTK.
82 %description devel -l pt_BR.UTF-8
83 Arquivos de inclusão para o FLTK.
86 Summary: FLTK static library
87 Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie
88 Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK
89 Group: X11/Development/Libraries
90 Requires: %{name}-devel = %{version}-%{release}
95 %description static -l pl.UTF-8
96 Biblioteka FLTK konsolidowana statycznie.
98 %description static -l pt_BR.UTF-8
99 Bibliotecas estáticas para o FLTK.
102 Summary: FLTK GL library
103 Summary(pl.UTF-8): Biblioteka FLTK GL
105 Requires: %{name} = %{version}-%{release}
111 %description gl -l pl.UTF-8
115 Summary: Header files for FLTK GL library
116 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL
117 Group: X11/Development/Libraries
118 Requires: %{name}-devel = %{version}-%{release}
119 Requires: %{name}-gl = %{version}-%{release}
121 %description gl-devel
122 Header files for FLTK GL library.
124 %description gl-devel -l pl.UTF-8
125 Pliki nagłówkowe biblioteki FLTK GL.
128 Summary: FLTK GL static library
129 Summary(pl.UTF-8): Statyczna biblioteka FLTK GL
130 Group: X11/Development/Libraries
131 Requires: %{name}-gl-devel = %{version}-%{release}
132 Requires: %{name}-static = %{version}-%{release}
134 %description gl-static
135 FLTK GL static library.
137 %description gl-static -l pl.UTF-8
138 Statyczna biblioteka FLTK GL.
142 Summary(pl.UTF-8): Gry FLTK
143 Group: X11/Applications/Games
144 Requires: %{name} = %{version}-%{release}
147 FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
149 %description games -l pl.UTF-8
150 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
167 --with-optim="%{rpmcxxflags}" \
168 %{!?with_opengl:--disable-gl} \
169 %{?with_xft:--enable-xft}
176 rm -rf $RPM_BUILD_ROOT
180 DESTDIR=$RPM_BUILD_ROOT
182 # less generic games' names
183 for f in blocks checkers sudoku ; do
184 mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
185 mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
188 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
189 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
190 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
193 rm -rf $RPM_BUILD_ROOT
195 %post -p /sbin/ldconfig
196 %postun -p /sbin/ldconfig
199 %defattr(644,root,root,755)
200 # note: COPYING contains amendments to LGPL, so don't remove!
201 %doc CHANGES COPYING CREDITS README
202 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
203 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
204 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
207 %defattr(644,root,root,755)
208 %doc documentation/html/*.{html,jpg,png}
209 %doc %{_datadir}/doc/%{name}
210 %attr(755,root,root) %{_bindir}/fltk-config
211 %attr(755,root,root) %{_bindir}/fluid
212 %attr(755,root,root) %{_libdir}/libfltk.so
213 %attr(755,root,root) %{_libdir}/libfltk_forms.so
214 %attr(755,root,root) %{_libdir}/libfltk_images.so
216 %exclude %{_includedir}/FL/Fl_Gl_Window.*
217 %exclude %{_includedir}/FL/gl*
218 %{_iconsdir}/*/*/*/fluid.png
219 %{_desktopdir}/fluid.desktop
220 # move to some KDE package?
221 #%{_datadir}/mimelnk/application/x-fluid.desktop
222 %{_mandir}/man1/fltk-config.1*
223 %{_mandir}/man1/fluid.1*
224 %{_mandir}/man3/fltk.3*
227 %defattr(644,root,root,755)
229 %{_libdir}/libfltk_forms.a
230 %{_libdir}/libfltk_images.a
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libfltk_gl.so
240 %{_includedir}/FL/Fl_Gl_Window.*
241 %{_includedir}/FL/gl*
244 %defattr(644,root,root,755)
245 %{_libdir}/libfltk_gl.a
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/%{name}-blocks
251 %attr(755,root,root) %{_bindir}/%{name}-checkers
252 %attr(755,root,root) %{_bindir}/%{name}-sudoku
253 %{_iconsdir}/*/*/*/blocks.png
254 %{_iconsdir}/*/*/*/checkers.png
255 %{_iconsdir}/*/*/*/sudoku.png
256 %{_desktopdir}/blocks.desktop
257 %{_desktopdir}/checkers.desktop
258 %{_desktopdir}/sudoku.desktop
259 %{_mandir}/man6/%{name}-blocks.6*
260 %{_mandir}/man6/%{name}-checkers.6*
261 %{_mandir}/man6/%{name}-sudoku.6*