]>
Commit | Line | Data |
---|---|---|
2a0616cb JB |
1 | # |
2 | # Conditional build: | |
63c2ba9a | 3 | %bcond_without opengl # without OpenGL libraries |
2a97c2d8 | 4 | %bcond_without xft # without 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 |
33e36aec | 10 | Version: 1.3.3 |
fcebd051 | 11 | Release: 2 |
33e36aec | 12 | License: LGPL v2 with amendments (see COPYING) |
d81eced3 | 13 | Group: X11/Libraries |
3a0c718d | 14 | Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz |
33e36aec | 15 | # Source0-md5: 9ccdb0d19dc104b87179bd9fd10822e3 |
31d67676 | 16 | Patch0: %{name}-desktop.patch |
33e36aec | 17 | Patch1: %{name}-as-needed.patch |
ab1ed912 | 18 | Patch2: %{name}-link.patch |
f1004040 | 19 | Patch3: %{name}-libjpeg.patch |
33e36aec | 20 | Patch4: %{name}-export.patch |
b60fb8ea | 21 | URL: http://www.fltk.org/ |
63c2ba9a | 22 | %{?with_opengl:BuildRequires: OpenGL-GLU-devel} |
1163b418 | 23 | %{?with_opengl:BuildRequires: OpenGL-GLX-devel} |
7cf84cd2 | 24 | BuildRequires: autoconf >= 2.50 |
1163b418 | 25 | BuildRequires: cairo-devel |
3a0c718d | 26 | BuildRequires: doxygen |
1163b418 | 27 | %{?with_xft:BuildRequires: fontconfig-devel} |
9ef5757d | 28 | BuildRequires: groff |
f367f3af | 29 | BuildRequires: libjpeg-devel |
30 | BuildRequires: libpng-devel | |
e878e300 | 31 | BuildRequires: libstdc++-devel |
1163b418 | 32 | BuildRequires: pkgconfig |
c50b5a59 | 33 | BuildRequires: rpmbuild(macros) >= 1.315 |
1163b418 | 34 | BuildRequires: xorg-lib-libXcursor-devel |
7cf84cd2 | 35 | BuildRequires: xorg-lib-libXext-devel |
1163b418 | 36 | BuildRequires: xorg-lib-libXfixes-devel |
2a97c2d8 | 37 | %{?with_xft:BuildRequires: xorg-lib-libXft-devel} |
9ef5757d | 38 | BuildRequires: xorg-lib-libXinerama-devel |
2a97c2d8 | 39 | BuildRequires: xorg-util-makedepend |
da10c525 | 40 | Obsoletes: libfltk1.1 |
40ead817 | 41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b60fb8ea | 42 | |
2a97c2d8 PS |
43 | # don't propagate strip-flags to fltk-config. |
44 | %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* | |
45 | ||
b60fb8ea | 46 | %description |
d81eced3 | 47 | The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd |
48 | C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and | |
49 | Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed | |
50 | by Mr. Bill Spitzak and is currently maintained by a small group of | |
51 | developers across the world with a central repository in the US. | |
b60fb8ea | 52 | |
365a84da | 53 | %description -l pl.UTF-8 |
35d364df | 54 | Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym |
365a84da JR |
55 | na licencji LGPL narzędziem do tworzenia graficznych interfejsów |
56 | użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r) | |
da10c525 | 57 | Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill |
365a84da JR |
58 | Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę |
59 | deweloperów z różnych stron świata (centralne repozytorium znajduje | |
60 | się w USA). | |
da10c525 | 61 | |
365a84da JR |
62 | %description -l pt_BR.UTF-8 |
63 | A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma | |
64 | ferramenta e interface gráfica feita em C++ para desenvolver | |
da10c525 | 65 | aplicativos para o X, OpenGL e Windows. |
d08d2885 | 66 | |
9cc982f0 | 67 | %package devel |
68 | Summary: FLTK development files | |
4b6978bf ER |
69 | Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK |
70 | Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK | |
d997f6b0 | 71 | Group: X11/Development/Libraries |
1ca19f4f | 72 | Requires: %{name} = %{version}-%{release} |
f367f3af | 73 | Requires: libjpeg-devel |
74 | Requires: libpng-devel | |
ca9f2784 | 75 | Requires: libstdc++-devel |
f367f3af | 76 | %{?with_xft:Requires: xorg-lib-libXft-devel} |
9ef5757d | 77 | Requires: xorg-lib-libXinerama-devel |
da10c525 | 78 | Obsoletes: libfltk1.1-devel |
b60fb8ea | 79 | |
9cc982f0 | 80 | %description devel |
81 | FLTK development files. | |
b60fb8ea | 82 | |
365a84da JR |
83 | %description devel -l pl.UTF-8 |
84 | Narzędzia programistyczne dla FLTK. | |
d997f6b0 | 85 | |
365a84da JR |
86 | %description devel -l pt_BR.UTF-8 |
87 | Arquivos de inclusão para o FLTK. | |
da10c525 | 88 | |
9cc982f0 | 89 | %package static |
9d5f643f | 90 | Summary: FLTK static library |
4b6978bf ER |
91 | Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie |
92 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK | |
d997f6b0 | 93 | Group: X11/Development/Libraries |
1ca19f4f | 94 | Requires: %{name}-devel = %{version}-%{release} |
b60fb8ea | 95 | |
9cc982f0 | 96 | %description static |
97 | FLTK static library. | |
b60fb8ea | 98 | |
365a84da | 99 | %description static -l pl.UTF-8 |
a7506872 | 100 | Biblioteka FLTK konsolidowana statycznie. |
b60fb8ea | 101 | |
365a84da JR |
102 | %description static -l pt_BR.UTF-8 |
103 | Bibliotecas estáticas para o FLTK. | |
da10c525 | 104 | |
1163b418 JB |
105 | %package cairo |
106 | Summary: FLTK Cairo library | |
107 | Summary(pl.UTF-8): Biblioteka FLTK Cairo | |
108 | Group: X11/Libraries | |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description cairo | |
112 | FLTK Cairo library. | |
113 | ||
114 | %description cairo -l pl.UTF-8 | |
115 | Biblioteka FLTK Cairo. | |
116 | ||
117 | %package cairo-devel | |
118 | Summary: Header files for FLTK Cairo library | |
119 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK Cairo | |
120 | Group: X11/Development/Libraries | |
121 | Requires: %{name}-devel = %{version}-%{release} | |
122 | Requires: %{name}-cairo = %{version}-%{release} | |
123 | ||
124 | %description cairo-devel | |
125 | Header files for FLTK Cairo library. | |
126 | ||
127 | %description cairo-devel -l pl.UTF-8 | |
128 | Pliki nagłówkowe biblioteki FLTK Cairo. | |
129 | ||
130 | %package cairo-static | |
131 | Summary: FLTK Cairo static library | |
132 | Summary(pl.UTF-8): Statyczna biblioteka FLTK Cairo | |
133 | Group: X11/Development/Libraries | |
134 | Requires: %{name}-cairo-devel = %{version}-%{release} | |
135 | ||
136 | %description cairo-static | |
137 | FLTK Cairo static library. | |
138 | ||
139 | %description cairo-static -l pl.UTF-8 | |
140 | Statyczna biblioteka FLTK Cairo. | |
141 | ||
e878e300 JB |
142 | %package gl |
143 | Summary: FLTK GL library | |
4b6978bf | 144 | Summary(pl.UTF-8): Biblioteka FLTK GL |
e878e300 | 145 | Group: X11/Libraries |
1ca19f4f | 146 | Requires: %{name} = %{version}-%{release} |
e878e300 JB |
147 | Requires: OpenGL |
148 | ||
149 | %description gl | |
150 | FLTK GL library. | |
151 | ||
365a84da | 152 | %description gl -l pl.UTF-8 |
e878e300 JB |
153 | Biblioteka FLTK GL. |
154 | ||
155 | %package gl-devel | |
156 | Summary: Header files for FLTK GL library | |
4b6978bf | 157 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL |
e878e300 | 158 | Group: X11/Development/Libraries |
1ca19f4f JB |
159 | Requires: %{name}-devel = %{version}-%{release} |
160 | Requires: %{name}-gl = %{version}-%{release} | |
e878e300 JB |
161 | |
162 | %description gl-devel | |
163 | Header files for FLTK GL library. | |
164 | ||
365a84da JR |
165 | %description gl-devel -l pl.UTF-8 |
166 | Pliki nagłówkowe biblioteki FLTK GL. | |
e878e300 JB |
167 | |
168 | %package gl-static | |
169 | Summary: FLTK GL static library | |
4b6978bf | 170 | Summary(pl.UTF-8): Statyczna biblioteka FLTK GL |
e878e300 | 171 | Group: X11/Development/Libraries |
1ca19f4f JB |
172 | Requires: %{name}-gl-devel = %{version}-%{release} |
173 | Requires: %{name}-static = %{version}-%{release} | |
e878e300 JB |
174 | |
175 | %description gl-static | |
176 | FLTK GL static library. | |
177 | ||
365a84da | 178 | %description gl-static -l pl.UTF-8 |
e878e300 JB |
179 | Statyczna biblioteka FLTK GL. |
180 | ||
2213f907 | 181 | %package games |
182 | Summary: FLTK Games | |
e1d0fca4 | 183 | Summary(pl.UTF-8): Gry FLTK |
2213f907 | 184 | Group: X11/Applications/Games |
185 | Requires: %{name} = %{version}-%{release} | |
186 | ||
187 | %description games | |
188 | FLTK games: Block Attack!, Checkers, or Sudoku on your computer. | |
189 | ||
097d503d | 190 | %description games -l pl.UTF-8 |
9ef5757d | 191 | Gry FLTK: Atak Klocków!, Warcaby, Sudoku. |
2213f907 | 192 | |
b60fb8ea | 193 | %prep |
3a0c718d | 194 | %setup -q |
2a97c2d8 PS |
195 | %patch0 -p1 |
196 | %patch1 -p1 | |
ab1ed912 | 197 | %patch2 -p1 |
f1004040 | 198 | %patch3 -p1 |
33e36aec | 199 | %patch4 -p1 |
9cc982f0 | 200 | |
b60fb8ea | 201 | %build |
8ac83007 JB |
202 | # gold doesn't understand -l:path/to/library.so |
203 | if [ -x /usr/bin/ld.bfd ]; then | |
204 | install -d ld-dir | |
205 | ln -sf /usr/bin/ld.bfd ld-dir/ld | |
206 | export PATH=$(pwd)/ld-dir:$PATH | |
207 | fi | |
e878e300 | 208 | %{__autoconf} |
ade5391e | 209 | %configure \ |
1163b418 | 210 | --enable-cairo \ |
98bcdec6 | 211 | --enable-largefile \ |
9cc982f0 | 212 | --enable-shared \ |
98bcdec6 | 213 | --enable-threads \ |
214 | --enable-xinerama \ | |
2a0616cb | 215 | --with-x \ |
1c2d3b78 | 216 | --with-optim="%{rpmcxxflags}" \ |
63c2ba9a | 217 | %{!?with_opengl:--disable-gl} \ |
40ead817 | 218 | %{?with_xft:--enable-xft} |
d997f6b0 | 219 | |
6d2b733d | 220 | %{__make} |
3a0c718d MK |
221 | cd documentation |
222 | %{__make} html | |
b60fb8ea | 223 | |
b60fb8ea | 224 | %install |
225 | rm -rf $RPM_BUILD_ROOT | |
911d5d7f | 226 | |
ade5391e | 227 | %{__make} install \ |
2213f907 | 228 | install-desktop \ |
229 | DESTDIR=$RPM_BUILD_ROOT | |
d997f6b0 | 230 | |
2213f907 | 231 | # less generic games' names |
232 | for f in blocks checkers sudoku ; do | |
33e36aec JB |
233 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f} |
234 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6 | |
2213f907 | 235 | done |
b60fb8ea | 236 | |
33e36aec JB |
237 | # we package mans in groff format |
238 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat? | |
239 | ||
2a753e56 | 240 | # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install |
33e36aec | 241 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
a518c581 | 242 | ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
2a753e56 | 243 | |
b60fb8ea | 244 | %clean |
245 | rm -rf $RPM_BUILD_ROOT | |
246 | ||
51899b70 JB |
247 | %post -p /sbin/ldconfig |
248 | %postun -p /sbin/ldconfig | |
249 | ||
1163b418 JB |
250 | %post cairo -p /sbin/ldconfig |
251 | %postun cairo -p /sbin/ldconfig | |
252 | ||
253 | %post gl -p /sbin/ldconfig | |
254 | %postun gl -p /sbin/ldconfig | |
255 | ||
b60fb8ea | 256 | %files |
257 | %defattr(644,root,root,755) | |
ddfacda5 | 258 | # note: COPYING contains amendments to LGPL, so don't remove! |
ade5391e | 259 | %doc CHANGES COPYING CREDITS README |
e878e300 JB |
260 | %attr(755,root,root) %{_libdir}/libfltk.so.*.* |
261 | %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.* | |
262 | %attr(755,root,root) %{_libdir}/libfltk_images.so.*.* | |
b60fb8ea | 263 | |
264 | %files devel | |
265 | %defattr(644,root,root,755) | |
3a0c718d | 266 | %doc documentation/html/*.{html,jpg,png} |
2a753e56 | 267 | %doc %{_datadir}/doc/%{name} |
ade5391e | 268 | %attr(755,root,root) %{_bindir}/fltk-config |
d997f6b0 | 269 | %attr(755,root,root) %{_bindir}/fluid |
ade5391e | 270 | %attr(755,root,root) %{_libdir}/libfltk.so |
e878e300 JB |
271 | %attr(755,root,root) %{_libdir}/libfltk_forms.so |
272 | %attr(755,root,root) %{_libdir}/libfltk_images.so | |
9cc982f0 | 273 | %{_includedir}/FL |
1163b418 | 274 | %exclude %{_includedir}/FL/Fl_Cairo*.H |
33e36aec | 275 | %exclude %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 | 276 | %exclude %{_includedir}/FL/gl* |
33e36aec | 277 | %{_iconsdir}/hicolor/*/apps/fluid.png |
c1c513bd JB |
278 | %{_desktopdir}/fluid.desktop |
279 | # move to some KDE package? | |
280 | #%{_datadir}/mimelnk/application/x-fluid.desktop | |
281 | %{_mandir}/man1/fltk-config.1* | |
282 | %{_mandir}/man1/fluid.1* | |
283 | %{_mandir}/man3/fltk.3* | |
9cc982f0 | 284 | |
285 | %files static | |
286 | %defattr(644,root,root,755) | |
1ca19f4f JB |
287 | %{_libdir}/libfltk.a |
288 | %{_libdir}/libfltk_forms.a | |
289 | %{_libdir}/libfltk_images.a | |
e878e300 | 290 | |
1163b418 JB |
291 | %files cairo |
292 | %defattr(644,root,root,755) | |
293 | %attr(755,root,root) %{_libdir}/libfltk_cairo.so.*.* | |
294 | ||
295 | %files cairo-devel | |
296 | %defattr(644,root,root,755) | |
297 | %attr(755,root,root) %{_libdir}/libfltk_cairo.so | |
298 | %{_includedir}/FL/Fl_Cairo*.H | |
299 | ||
300 | %files cairo-static | |
301 | %defattr(644,root,root,755) | |
302 | %{_libdir}/libfltk_cairo.a | |
303 | ||
63c2ba9a | 304 | %if %{with opengl} |
e878e300 JB |
305 | %files gl |
306 | %defattr(644,root,root,755) | |
307 | %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.* | |
308 | ||
309 | %files gl-devel | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_libdir}/libfltk_gl.so | |
33e36aec | 312 | %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 JB |
313 | %{_includedir}/FL/gl* |
314 | ||
315 | %files gl-static | |
316 | %defattr(644,root,root,755) | |
1ca19f4f | 317 | %{_libdir}/libfltk_gl.a |
e878e300 | 318 | %endif |
2213f907 | 319 | |
320 | %files games | |
0b686db1 | 321 | %defattr(644,root,root,755) |
2213f907 | 322 | %attr(755,root,root) %{_bindir}/%{name}-blocks |
323 | %attr(755,root,root) %{_bindir}/%{name}-checkers | |
324 | %attr(755,root,root) %{_bindir}/%{name}-sudoku | |
1163b418 JB |
325 | %{_iconsdir}/hicolor/*/apps/blocks.png |
326 | %{_iconsdir}/hicolor/*/apps/checkers.png | |
327 | %{_iconsdir}/hicolor/*/apps/sudoku.png | |
2213f907 | 328 | %{_desktopdir}/blocks.desktop |
329 | %{_desktopdir}/checkers.desktop | |
330 | %{_desktopdir}/sudoku.desktop | |
331 | %{_mandir}/man6/%{name}-blocks.6* | |
332 | %{_mandir}/man6/%{name}-checkers.6* | |
333 | %{_mandir}/man6/%{name}-sudoku.6* |