]> git.pld-linux.org Git - packages/fltk.git/blame - fltk.spec
- release 2 to get rid of -R from fltk-config
[packages/fltk.git] / fltk.spec
CommitLineData
2a0616cb
JB
1#
2# Conditional build:
f8bf4083
JB
3%bcond_without opengl # OpenGL libraries
4%bcond_without xft # Xft support
2a0616cb 5#
7fc6d680 6Summary: Fast Light Tool Kit
4b6978bf
ER
7Summary(pl.UTF-8): FLTK - "lekki" X11 toolkit
8Summary(pt_BR.UTF-8): Interface gráfica em C++ para X, OpenGL e Windows
b60fb8ea 9Name: fltk
f8bf4083 10Version: 1.3.8
f8428ce5 11Release: 2
33e36aec 12License: LGPL v2 with amendments (see COPYING)
d81eced3 13Group: X11/Libraries
61aaaffe
JB
14#Source0Download: https://www.fltk.org/software.php
15Source0: https://www.fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2
f8bf4083 16# Source0-md5: ed08b7985779213dc6190dc7b75d01a2
31d67676 17Patch0: %{name}-desktop.patch
33e36aec 18Patch1: %{name}-as-needed.patch
ab1ed912 19Patch2: %{name}-link.patch
61aaaffe 20Patch3: %{name}-mime.patch
33e36aec 21Patch4: %{name}-export.patch
61aaaffe 22Patch5: %{name}-docdir.patch
b60fb8ea 23URL: http://www.fltk.org/
63c2ba9a 24%{?with_opengl:BuildRequires: OpenGL-GLU-devel}
1163b418 25%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
f8bf4083 26BuildRequires: alsa-lib-devel
7cf84cd2 27BuildRequires: autoconf >= 2.50
1163b418 28BuildRequires: cairo-devel
3a0c718d 29BuildRequires: doxygen
1163b418 30%{?with_xft:BuildRequires: fontconfig-devel}
9ef5757d 31BuildRequires: groff
f367f3af 32BuildRequires: libjpeg-devel
33BuildRequires: libpng-devel
e878e300 34BuildRequires: libstdc++-devel
1163b418 35BuildRequires: pkgconfig
c50b5a59 36BuildRequires: rpmbuild(macros) >= 1.315
f8bf4083 37BuildRequires: xorg-lib-libX11-devel
1163b418 38BuildRequires: xorg-lib-libXcursor-devel
7cf84cd2 39BuildRequires: xorg-lib-libXext-devel
1163b418 40BuildRequires: xorg-lib-libXfixes-devel
2a97c2d8 41%{?with_xft:BuildRequires: xorg-lib-libXft-devel}
9ef5757d 42BuildRequires: xorg-lib-libXinerama-devel
f8bf4083 43BuildRequires: xorg-lib-libXrender-devel
2a97c2d8 44BuildRequires: xorg-util-makedepend
f3efe00a 45Obsoletes: libfltk1.1 < 1.2
40ead817 46BuildRoot: %{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 52The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
53C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
54Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
55by Mr. Bill Spitzak and is currently maintained by a small group of
56developers across the world with a central repository in the US.
b60fb8ea 57
365a84da 58%description -l pl.UTF-8
35d364df 59Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
365a84da
JR
60na licencji LGPL narzędziem do tworzenia graficznych interfejsów
61użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
da10c525 62Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
365a84da
JR
63Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
64deweloperów z różnych stron świata (centralne repozytorium znajduje
65się w USA).
da10c525 66
365a84da
JR
67%description -l pt_BR.UTF-8
68A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
69ferramenta e interface gráfica feita em C++ para desenvolver
da10c525 70aplicativos para o X, OpenGL e Windows.
d08d2885 71
9cc982f0 72%package devel
73Summary: FLTK development files
4b6978bf
ER
74Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK
75Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK
d997f6b0 76Group: X11/Development/Libraries
1ca19f4f 77Requires: %{name} = %{version}-%{release}
f367f3af 78Requires: libjpeg-devel
79Requires: libpng-devel
ca9f2784 80Requires: libstdc++-devel
f367f3af 81%{?with_xft:Requires: xorg-lib-libXft-devel}
9ef5757d 82Requires: xorg-lib-libXinerama-devel
f3efe00a 83Obsoletes: libfltk1.1-devel < 1.2
b60fb8ea 84
9cc982f0 85%description devel
86FLTK development files.
b60fb8ea 87
365a84da
JR
88%description devel -l pl.UTF-8
89Narzędzia programistyczne dla FLTK.
d997f6b0 90
365a84da
JR
91%description devel -l pt_BR.UTF-8
92Arquivos de inclusão para o FLTK.
da10c525 93
9cc982f0 94%package static
9d5f643f 95Summary: FLTK static library
4b6978bf
ER
96Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie
97Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK
d997f6b0 98Group: X11/Development/Libraries
1ca19f4f 99Requires: %{name}-devel = %{version}-%{release}
b60fb8ea 100
9cc982f0 101%description static
102FLTK static library.
b60fb8ea 103
365a84da 104%description static -l pl.UTF-8
a7506872 105Biblioteka FLTK konsolidowana statycznie.
b60fb8ea 106
365a84da
JR
107%description static -l pt_BR.UTF-8
108Bibliotecas estáticas para o FLTK.
da10c525 109
1163b418
JB
110%package cairo
111Summary: FLTK Cairo library
112Summary(pl.UTF-8): Biblioteka FLTK Cairo
113Group: X11/Libraries
114Requires: %{name} = %{version}-%{release}
115
116%description cairo
117FLTK Cairo library.
118
119%description cairo -l pl.UTF-8
120Biblioteka FLTK Cairo.
121
122%package cairo-devel
123Summary: Header files for FLTK Cairo library
124Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK Cairo
125Group: X11/Development/Libraries
126Requires: %{name}-devel = %{version}-%{release}
127Requires: %{name}-cairo = %{version}-%{release}
128
129%description cairo-devel
130Header files for FLTK Cairo library.
131
132%description cairo-devel -l pl.UTF-8
133Pliki nagłówkowe biblioteki FLTK Cairo.
134
135%package cairo-static
136Summary: FLTK Cairo static library
137Summary(pl.UTF-8): Statyczna biblioteka FLTK Cairo
138Group: X11/Development/Libraries
139Requires: %{name}-cairo-devel = %{version}-%{release}
140
141%description cairo-static
142FLTK Cairo static library.
143
144%description cairo-static -l pl.UTF-8
145Statyczna biblioteka FLTK Cairo.
146
e878e300
JB
147%package gl
148Summary: FLTK GL library
4b6978bf 149Summary(pl.UTF-8): Biblioteka FLTK GL
e878e300 150Group: X11/Libraries
1ca19f4f 151Requires: %{name} = %{version}-%{release}
e878e300
JB
152Requires: OpenGL
153
154%description gl
155FLTK GL library.
156
365a84da 157%description gl -l pl.UTF-8
e878e300
JB
158Biblioteka FLTK GL.
159
160%package gl-devel
161Summary: Header files for FLTK GL library
4b6978bf 162Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL
e878e300 163Group: X11/Development/Libraries
1ca19f4f
JB
164Requires: %{name}-devel = %{version}-%{release}
165Requires: %{name}-gl = %{version}-%{release}
e878e300
JB
166
167%description gl-devel
168Header files for FLTK GL library.
169
365a84da
JR
170%description gl-devel -l pl.UTF-8
171Pliki nagłówkowe biblioteki FLTK GL.
e878e300
JB
172
173%package gl-static
174Summary: FLTK GL static library
4b6978bf 175Summary(pl.UTF-8): Statyczna biblioteka FLTK GL
e878e300 176Group: X11/Development/Libraries
1ca19f4f
JB
177Requires: %{name}-gl-devel = %{version}-%{release}
178Requires: %{name}-static = %{version}-%{release}
e878e300
JB
179
180%description gl-static
181FLTK GL static library.
182
365a84da 183%description gl-static -l pl.UTF-8
e878e300
JB
184Statyczna biblioteka FLTK GL.
185
61aaaffe
JB
186%package apidocs
187Summary: API documentation for FLTK library
188Summary(pl.UTF-8): Dokumentacja API biblioteki FLTK
189Group: Documentation
190
191%description apidocs
192API documentation for FLTK library.
193
194%description apidocs -l pl.UTF-8
195Dokumentacja API biblioteki FLTK.
196
197%package fluid
198Summary: FLTK GUI Designer
199Summary(pl.UTF-8): Narzędzie FLTK do projektowania GUI
200Group: X11/Development/Tools
201Requires(post,postun): desktop-file-utils
202Requires(post,postun): shared-mime-info
203Requires: %{name} = %{version}-%{release}
dd4d24cf 204Requires: %{name}-cairo = %{version}-%{release}
61aaaffe
JB
205Suggests: %{name}-apidocs = %{version}-%{release}
206
207%description fluid
208FLTK GUI Designer.
209
210%description fluid -l pl.UTF-8
211Narzędzie FLTK do projektowania GUI.
212
2213f907 213%package games
214Summary: FLTK Games
e1d0fca4 215Summary(pl.UTF-8): Gry FLTK
2213f907 216Group: X11/Applications/Games
217Requires: %{name} = %{version}-%{release}
218
219%description games
220FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
221
097d503d 222%description games -l pl.UTF-8
9ef5757d 223Gry 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
236if [ -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
240fi
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
258rm -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
264for 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 267done
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
276rm -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*
This page took 0.121105 seconds and 4 git commands to generate.