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 v2 with amendments (see COPYING)
15 Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
16 # Source0-md5: 9ccdb0d19dc104b87179bd9fd10822e3
17 Patch0: %{name}-desktop.patch
18 Patch1: %{name}-as-needed.patch
19 Patch2: %{name}-link.patch
20 Patch3: %{name}-libjpeg.patch
21 Patch4: %{name}-export.patch
22 URL: http://www.fltk.org/
23 %{?with_opengl:BuildRequires: OpenGL-GLU-devel}
24 BuildRequires: autoconf >= 2.50
25 BuildRequires: doxygen
27 BuildRequires: libjpeg-devel
28 BuildRequires: libpng-devel
29 BuildRequires: libstdc++-devel
30 BuildRequires: rpmbuild(macros) >= 1.315
31 BuildRequires: xorg-lib-libXext-devel
32 %{?with_xft:BuildRequires: xorg-lib-libXft-devel}
33 BuildRequires: xorg-lib-libXinerama-devel
34 BuildRequires: xorg-util-makedepend
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # don't propagate strip-flags to fltk-config.
39 %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
42 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
43 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
44 Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
45 by Mr. Bill Spitzak and is currently maintained by a small group of
46 developers across the world with a central repository in the US.
48 %description -l pl.UTF-8
49 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
50 na licencji LGPL narzędziem do tworzenia graficznych interfejsów
51 użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
52 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
53 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
54 deweloperów z różnych stron świata (centralne repozytorium znajduje
57 %description -l pt_BR.UTF-8
58 A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
59 ferramenta e interface gráfica feita em C++ para desenvolver
60 aplicativos para o X, OpenGL e Windows.
63 Summary: FLTK development files
64 Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK
65 Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK
66 Group: X11/Development/Libraries
67 Requires: %{name} = %{version}-%{release}
68 Requires: libjpeg-devel
69 Requires: libpng-devel
70 Requires: libstdc++-devel
71 %{?with_xft:Requires: xorg-lib-libXft-devel}
72 Requires: xorg-lib-libXinerama-devel
73 Obsoletes: libfltk1.1-devel
76 FLTK development files.
78 %description devel -l pl.UTF-8
79 Narzędzia programistyczne dla FLTK.
81 %description devel -l pt_BR.UTF-8
82 Arquivos de inclusão para o FLTK.
85 Summary: FLTK static library
86 Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie
87 Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK
88 Group: X11/Development/Libraries
89 Requires: %{name}-devel = %{version}-%{release}
94 %description static -l pl.UTF-8
95 Biblioteka FLTK konsolidowana statycznie.
97 %description static -l pt_BR.UTF-8
98 Bibliotecas estáticas para o FLTK.
101 Summary: FLTK GL library
102 Summary(pl.UTF-8): Biblioteka FLTK GL
104 Requires: %{name} = %{version}-%{release}
110 %description gl -l pl.UTF-8
114 Summary: Header files for FLTK GL library
115 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL
116 Group: X11/Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
118 Requires: %{name}-gl = %{version}-%{release}
120 %description gl-devel
121 Header files for FLTK GL library.
123 %description gl-devel -l pl.UTF-8
124 Pliki nagłówkowe biblioteki FLTK GL.
127 Summary: FLTK GL static library
128 Summary(pl.UTF-8): Statyczna biblioteka FLTK GL
129 Group: X11/Development/Libraries
130 Requires: %{name}-gl-devel = %{version}-%{release}
131 Requires: %{name}-static = %{version}-%{release}
133 %description gl-static
134 FLTK GL static library.
136 %description gl-static -l pl.UTF-8
137 Statyczna biblioteka FLTK GL.
141 Summary(pl.UTF-8): Gry FLTK
142 Group: X11/Applications/Games
143 Requires: %{name} = %{version}-%{release}
146 FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
148 %description games -l pl.UTF-8
149 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
160 # gold doesn't understand -l:path/to/library.so
161 if [ -x /usr/bin/ld.bfd ]; then
163 ln -sf /usr/bin/ld.bfd ld-dir/ld
164 export PATH=$(pwd)/ld-dir:$PATH
173 --with-optim="%{rpmcxxflags}" \
174 %{!?with_opengl:--disable-gl} \
175 %{?with_xft:--enable-xft}
182 rm -rf $RPM_BUILD_ROOT
186 DESTDIR=$RPM_BUILD_ROOT
188 # less generic games' names
189 for f in blocks checkers sudoku ; do
190 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
191 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
194 # we package mans in groff format
195 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat?
197 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
198 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
199 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
202 rm -rf $RPM_BUILD_ROOT
204 %post -p /sbin/ldconfig
205 %postun -p /sbin/ldconfig
208 %defattr(644,root,root,755)
209 # note: COPYING contains amendments to LGPL, so don't remove!
210 %doc CHANGES COPYING CREDITS README
211 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
212 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
213 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
216 %defattr(644,root,root,755)
217 %doc documentation/html/*.{html,jpg,png}
218 %doc %{_datadir}/doc/%{name}
219 %attr(755,root,root) %{_bindir}/fltk-config
220 %attr(755,root,root) %{_bindir}/fluid
221 %attr(755,root,root) %{_libdir}/libfltk.so
222 %attr(755,root,root) %{_libdir}/libfltk_forms.so
223 %attr(755,root,root) %{_libdir}/libfltk_images.so
225 %exclude %{_includedir}/FL/Fl_Gl_Window.H
226 %exclude %{_includedir}/FL/gl*
227 %{_iconsdir}/hicolor/*/apps/fluid.png
228 %{_desktopdir}/fluid.desktop
229 # move to some KDE package?
230 #%{_datadir}/mimelnk/application/x-fluid.desktop
231 %{_mandir}/man1/fltk-config.1*
232 %{_mandir}/man1/fluid.1*
233 %{_mandir}/man3/fltk.3*
236 %defattr(644,root,root,755)
238 %{_libdir}/libfltk_forms.a
239 %{_libdir}/libfltk_images.a
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/libfltk_gl.so
249 %{_includedir}/FL/Fl_Gl_Window.H
250 %{_includedir}/FL/gl*
253 %defattr(644,root,root,755)
254 %{_libdir}/libfltk_gl.a
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_bindir}/%{name}-blocks
260 %attr(755,root,root) %{_bindir}/%{name}-checkers
261 %attr(755,root,root) %{_bindir}/%{name}-sudoku
262 %{_iconsdir}/*/*/*/blocks.png
263 %{_iconsdir}/*/*/*/checkers.png
264 %{_iconsdir}/*/*/*/sudoku.png
265 %{_desktopdir}/blocks.desktop
266 %{_desktopdir}/checkers.desktop
267 %{_desktopdir}/sudoku.desktop
268 %{_mandir}/man6/%{name}-blocks.6*
269 %{_mandir}/man6/%{name}-checkers.6*
270 %{_mandir}/man6/%{name}-sudoku.6*