]>
Commit | Line | Data |
---|---|---|
7cf84cd2 | 1 | # TODO: enable cairo support? |
2a0616cb JB |
2 | # |
3 | # Conditional build: | |
63c2ba9a | 4 | %bcond_without opengl # without OpenGL libraries |
2a97c2d8 | 5 | %bcond_without xft # without Xft support |
2a0616cb | 6 | # |
7fc6d680 | 7 | Summary: Fast Light Tool Kit |
4b6978bf ER |
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 | |
b60fb8ea | 10 | Name: fltk |
33e36aec JB |
11 | Version: 1.3.3 |
12 | Release: 1 | |
13 | License: LGPL v2 with amendments (see COPYING) | |
d81eced3 | 14 | Group: X11/Libraries |
3a0c718d | 15 | Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz |
33e36aec | 16 | # Source0-md5: 9ccdb0d19dc104b87179bd9fd10822e3 |
31d67676 | 17 | Patch0: %{name}-desktop.patch |
33e36aec | 18 | Patch1: %{name}-as-needed.patch |
ab1ed912 | 19 | Patch2: %{name}-link.patch |
f1004040 | 20 | Patch3: %{name}-libjpeg.patch |
33e36aec | 21 | Patch4: %{name}-export.patch |
b60fb8ea | 22 | URL: http://www.fltk.org/ |
63c2ba9a | 23 | %{?with_opengl:BuildRequires: OpenGL-GLU-devel} |
7cf84cd2 | 24 | BuildRequires: autoconf >= 2.50 |
3a0c718d | 25 | BuildRequires: doxygen |
9ef5757d | 26 | BuildRequires: groff |
f367f3af | 27 | BuildRequires: libjpeg-devel |
28 | BuildRequires: libpng-devel | |
e878e300 | 29 | BuildRequires: libstdc++-devel |
c50b5a59 | 30 | BuildRequires: rpmbuild(macros) >= 1.315 |
7cf84cd2 | 31 | BuildRequires: xorg-lib-libXext-devel |
2a97c2d8 | 32 | %{?with_xft:BuildRequires: xorg-lib-libXft-devel} |
9ef5757d | 33 | BuildRequires: xorg-lib-libXinerama-devel |
2a97c2d8 | 34 | BuildRequires: xorg-util-makedepend |
da10c525 | 35 | Obsoletes: libfltk1.1 |
40ead817 | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
b60fb8ea | 37 | |
2a97c2d8 PS |
38 | # don't propagate strip-flags to fltk-config. |
39 | %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* | |
40 | ||
b60fb8ea | 41 | %description |
d81eced3 | 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. | |
b60fb8ea | 47 | |
365a84da | 48 | %description -l pl.UTF-8 |
35d364df | 49 | Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym |
365a84da JR |
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) | |
da10c525 | 52 | Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill |
365a84da JR |
53 | Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę |
54 | deweloperów z różnych stron świata (centralne repozytorium znajduje | |
55 | się w USA). | |
da10c525 | 56 | |
365a84da JR |
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 | |
da10c525 | 60 | aplicativos para o X, OpenGL e Windows. |
d08d2885 | 61 | |
9cc982f0 | 62 | %package devel |
63 | Summary: FLTK development files | |
4b6978bf ER |
64 | Summary(pl.UTF-8): Narzędzia programistyczne dla FLTK |
65 | Summary(pt_BR.UTF-8): Arquivos de inclusão para o FLTK | |
d997f6b0 | 66 | Group: X11/Development/Libraries |
1ca19f4f | 67 | Requires: %{name} = %{version}-%{release} |
f367f3af | 68 | Requires: libjpeg-devel |
69 | Requires: libpng-devel | |
ca9f2784 | 70 | Requires: libstdc++-devel |
f367f3af | 71 | %{?with_xft:Requires: xorg-lib-libXft-devel} |
9ef5757d | 72 | Requires: xorg-lib-libXinerama-devel |
da10c525 | 73 | Obsoletes: libfltk1.1-devel |
b60fb8ea | 74 | |
9cc982f0 | 75 | %description devel |
76 | FLTK development files. | |
b60fb8ea | 77 | |
365a84da JR |
78 | %description devel -l pl.UTF-8 |
79 | Narzędzia programistyczne dla FLTK. | |
d997f6b0 | 80 | |
365a84da JR |
81 | %description devel -l pt_BR.UTF-8 |
82 | Arquivos de inclusão para o FLTK. | |
da10c525 | 83 | |
9cc982f0 | 84 | %package static |
9d5f643f | 85 | Summary: FLTK static library |
4b6978bf ER |
86 | Summary(pl.UTF-8): Biblioteka FLTK konsolidowana statycznie |
87 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para o FLTK | |
d997f6b0 | 88 | Group: X11/Development/Libraries |
1ca19f4f | 89 | Requires: %{name}-devel = %{version}-%{release} |
b60fb8ea | 90 | |
9cc982f0 | 91 | %description static |
92 | FLTK static library. | |
b60fb8ea | 93 | |
365a84da | 94 | %description static -l pl.UTF-8 |
a7506872 | 95 | Biblioteka FLTK konsolidowana statycznie. |
b60fb8ea | 96 | |
365a84da JR |
97 | %description static -l pt_BR.UTF-8 |
98 | Bibliotecas estáticas para o FLTK. | |
da10c525 | 99 | |
e878e300 JB |
100 | %package gl |
101 | Summary: FLTK GL library | |
4b6978bf | 102 | Summary(pl.UTF-8): Biblioteka FLTK GL |
e878e300 | 103 | Group: X11/Libraries |
1ca19f4f | 104 | Requires: %{name} = %{version}-%{release} |
e878e300 JB |
105 | Requires: OpenGL |
106 | ||
107 | %description gl | |
108 | FLTK GL library. | |
109 | ||
365a84da | 110 | %description gl -l pl.UTF-8 |
e878e300 JB |
111 | Biblioteka FLTK GL. |
112 | ||
113 | %package gl-devel | |
114 | Summary: Header files for FLTK GL library | |
4b6978bf | 115 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FLTK GL |
e878e300 | 116 | Group: X11/Development/Libraries |
1ca19f4f JB |
117 | Requires: %{name}-devel = %{version}-%{release} |
118 | Requires: %{name}-gl = %{version}-%{release} | |
e878e300 JB |
119 | |
120 | %description gl-devel | |
121 | Header files for FLTK GL library. | |
122 | ||
365a84da JR |
123 | %description gl-devel -l pl.UTF-8 |
124 | Pliki nagłówkowe biblioteki FLTK GL. | |
e878e300 JB |
125 | |
126 | %package gl-static | |
127 | Summary: FLTK GL static library | |
4b6978bf | 128 | Summary(pl.UTF-8): Statyczna biblioteka FLTK GL |
e878e300 | 129 | Group: X11/Development/Libraries |
1ca19f4f JB |
130 | Requires: %{name}-gl-devel = %{version}-%{release} |
131 | Requires: %{name}-static = %{version}-%{release} | |
e878e300 JB |
132 | |
133 | %description gl-static | |
134 | FLTK GL static library. | |
135 | ||
365a84da | 136 | %description gl-static -l pl.UTF-8 |
e878e300 JB |
137 | Statyczna biblioteka FLTK GL. |
138 | ||
2213f907 | 139 | %package games |
140 | Summary: FLTK Games | |
e1d0fca4 | 141 | Summary(pl.UTF-8): Gry FLTK |
2213f907 | 142 | Group: X11/Applications/Games |
143 | Requires: %{name} = %{version}-%{release} | |
144 | ||
145 | %description games | |
146 | FLTK games: Block Attack!, Checkers, or Sudoku on your computer. | |
147 | ||
097d503d | 148 | %description games -l pl.UTF-8 |
9ef5757d | 149 | Gry FLTK: Atak Klocków!, Warcaby, Sudoku. |
2213f907 | 150 | |
b60fb8ea | 151 | %prep |
3a0c718d | 152 | %setup -q |
2a97c2d8 PS |
153 | %patch0 -p1 |
154 | %patch1 -p1 | |
ab1ed912 | 155 | %patch2 -p1 |
f1004040 | 156 | %patch3 -p1 |
33e36aec | 157 | %patch4 -p1 |
9cc982f0 | 158 | |
b60fb8ea | 159 | %build |
8ac83007 JB |
160 | # gold doesn't understand -l:path/to/library.so |
161 | if [ -x /usr/bin/ld.bfd ]; then | |
162 | install -d ld-dir | |
163 | ln -sf /usr/bin/ld.bfd ld-dir/ld | |
164 | export PATH=$(pwd)/ld-dir:$PATH | |
165 | fi | |
e878e300 | 166 | %{__autoconf} |
ade5391e | 167 | %configure \ |
98bcdec6 | 168 | --enable-largefile \ |
9cc982f0 | 169 | --enable-shared \ |
98bcdec6 | 170 | --enable-threads \ |
171 | --enable-xinerama \ | |
2a0616cb | 172 | --with-x \ |
1c2d3b78 | 173 | --with-optim="%{rpmcxxflags}" \ |
63c2ba9a | 174 | %{!?with_opengl:--disable-gl} \ |
40ead817 | 175 | %{?with_xft:--enable-xft} |
d997f6b0 | 176 | |
6d2b733d | 177 | %{__make} |
3a0c718d MK |
178 | cd documentation |
179 | %{__make} html | |
b60fb8ea | 180 | |
b60fb8ea | 181 | %install |
182 | rm -rf $RPM_BUILD_ROOT | |
911d5d7f | 183 | |
ade5391e | 184 | %{__make} install \ |
2213f907 | 185 | install-desktop \ |
186 | DESTDIR=$RPM_BUILD_ROOT | |
d997f6b0 | 187 | |
2213f907 | 188 | # less generic games' names |
189 | for f in blocks checkers sudoku ; do | |
33e36aec JB |
190 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f} |
191 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6 | |
2213f907 | 192 | done |
b60fb8ea | 193 | |
33e36aec JB |
194 | # we package mans in groff format |
195 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat? | |
196 | ||
2a753e56 | 197 | # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install |
33e36aec | 198 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
a518c581 | 199 | ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} |
2a753e56 | 200 | |
b60fb8ea | 201 | %clean |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
51899b70 JB |
204 | %post -p /sbin/ldconfig |
205 | %postun -p /sbin/ldconfig | |
206 | ||
b60fb8ea | 207 | %files |
208 | %defattr(644,root,root,755) | |
ddfacda5 | 209 | # note: COPYING contains amendments to LGPL, so don't remove! |
ade5391e | 210 | %doc CHANGES COPYING CREDITS README |
e878e300 JB |
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.*.* | |
b60fb8ea | 214 | |
215 | %files devel | |
216 | %defattr(644,root,root,755) | |
3a0c718d | 217 | %doc documentation/html/*.{html,jpg,png} |
2a753e56 | 218 | %doc %{_datadir}/doc/%{name} |
ade5391e | 219 | %attr(755,root,root) %{_bindir}/fltk-config |
d997f6b0 | 220 | %attr(755,root,root) %{_bindir}/fluid |
ade5391e | 221 | %attr(755,root,root) %{_libdir}/libfltk.so |
e878e300 JB |
222 | %attr(755,root,root) %{_libdir}/libfltk_forms.so |
223 | %attr(755,root,root) %{_libdir}/libfltk_images.so | |
9cc982f0 | 224 | %{_includedir}/FL |
33e36aec | 225 | %exclude %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 | 226 | %exclude %{_includedir}/FL/gl* |
33e36aec | 227 | %{_iconsdir}/hicolor/*/apps/fluid.png |
c1c513bd JB |
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* | |
9cc982f0 | 234 | |
235 | %files static | |
236 | %defattr(644,root,root,755) | |
1ca19f4f JB |
237 | %{_libdir}/libfltk.a |
238 | %{_libdir}/libfltk_forms.a | |
239 | %{_libdir}/libfltk_images.a | |
e878e300 | 240 | |
63c2ba9a | 241 | %if %{with opengl} |
e878e300 JB |
242 | %files gl |
243 | %defattr(644,root,root,755) | |
244 | %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.* | |
245 | ||
246 | %files gl-devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/libfltk_gl.so | |
33e36aec | 249 | %{_includedir}/FL/Fl_Gl_Window.H |
e878e300 JB |
250 | %{_includedir}/FL/gl* |
251 | ||
252 | %files gl-static | |
253 | %defattr(644,root,root,755) | |
1ca19f4f | 254 | %{_libdir}/libfltk_gl.a |
e878e300 | 255 | %endif |
2213f907 | 256 | |
257 | %files games | |
0b686db1 | 258 | %defattr(644,root,root,755) |
2213f907 | 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* |