]> git.pld-linux.org Git - packages/fltk.git/blob - fltk.spec
- release 2 to get rid of -R from fltk-config
[packages/fltk.git] / fltk.spec
1 #
2 # Conditional build:
3 %bcond_without  opengl  # without OpenGL libraries
4 %bcond_without  xft     # without Xft support
5 #
6 Summary:        Fast Light Tool Kit
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
9 Name:           fltk
10 Version:        1.3.3
11 Release:        2
12 License:        LGPL v2 with amendments (see COPYING)
13 Group:          X11/Libraries
14 Source0:        http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
15 # Source0-md5:  9ccdb0d19dc104b87179bd9fd10822e3
16 Patch0:         %{name}-desktop.patch
17 Patch1:         %{name}-as-needed.patch
18 Patch2:         %{name}-link.patch
19 Patch3:         %{name}-libjpeg.patch
20 Patch4:         %{name}-export.patch
21 URL:            http://www.fltk.org/
22 %{?with_opengl:BuildRequires:   OpenGL-GLU-devel}
23 %{?with_opengl:BuildRequires:   OpenGL-GLX-devel}
24 BuildRequires:  autoconf >= 2.50
25 BuildRequires:  cairo-devel
26 BuildRequires:  doxygen
27 %{?with_xft:BuildRequires:      fontconfig-devel}
28 BuildRequires:  groff
29 BuildRequires:  libjpeg-devel
30 BuildRequires:  libpng-devel
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  pkgconfig
33 BuildRequires:  rpmbuild(macros) >= 1.315
34 BuildRequires:  xorg-lib-libXcursor-devel
35 BuildRequires:  xorg-lib-libXext-devel
36 BuildRequires:  xorg-lib-libXfixes-devel
37 %{?with_xft:BuildRequires:      xorg-lib-libXft-devel}
38 BuildRequires:  xorg-lib-libXinerama-devel
39 BuildRequires:  xorg-util-makedepend
40 Obsoletes:      libfltk1.1
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 # don't propagate strip-flags to fltk-config.
44 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
45
46 %description
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.
52
53 %description -l pl.UTF-8
54 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
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)
57 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
58 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
59 deweloperów z różnych stron świata (centralne repozytorium znajduje
60 się w USA).
61
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
65 aplicativos para o X, OpenGL e Windows.
66
67 %package devel
68 Summary:        FLTK development files
69 Summary(pl.UTF-8):      Narzędzia programistyczne dla FLTK
70 Summary(pt_BR.UTF-8):   Arquivos de inclusão para o FLTK
71 Group:          X11/Development/Libraries
72 Requires:       %{name} = %{version}-%{release}
73 Requires:       libjpeg-devel
74 Requires:       libpng-devel
75 Requires:       libstdc++-devel
76 %{?with_xft:Requires:   xorg-lib-libXft-devel}
77 Requires:       xorg-lib-libXinerama-devel
78 Obsoletes:      libfltk1.1-devel
79
80 %description devel
81 FLTK development files.
82
83 %description devel -l pl.UTF-8
84 Narzędzia programistyczne dla FLTK.
85
86 %description devel -l pt_BR.UTF-8
87 Arquivos de inclusão para o FLTK.
88
89 %package static
90 Summary:        FLTK static library
91 Summary(pl.UTF-8):      Biblioteka FLTK konsolidowana statycznie
92 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para o FLTK
93 Group:          X11/Development/Libraries
94 Requires:       %{name}-devel = %{version}-%{release}
95
96 %description static
97 FLTK static library.
98
99 %description static -l pl.UTF-8
100 Biblioteka FLTK konsolidowana statycznie.
101
102 %description static -l pt_BR.UTF-8
103 Bibliotecas estáticas para o FLTK.
104
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
142 %package gl
143 Summary:        FLTK GL library
144 Summary(pl.UTF-8):      Biblioteka FLTK GL
145 Group:          X11/Libraries
146 Requires:       %{name} = %{version}-%{release}
147 Requires:       OpenGL
148
149 %description gl
150 FLTK GL library.
151
152 %description gl -l pl.UTF-8
153 Biblioteka FLTK GL.
154
155 %package gl-devel
156 Summary:        Header files for FLTK GL library
157 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FLTK GL
158 Group:          X11/Development/Libraries
159 Requires:       %{name}-devel = %{version}-%{release}
160 Requires:       %{name}-gl = %{version}-%{release}
161
162 %description gl-devel
163 Header files for FLTK GL library.
164
165 %description gl-devel -l pl.UTF-8
166 Pliki nagłówkowe biblioteki FLTK GL.
167
168 %package gl-static
169 Summary:        FLTK GL static library
170 Summary(pl.UTF-8):      Statyczna biblioteka FLTK GL
171 Group:          X11/Development/Libraries
172 Requires:       %{name}-gl-devel = %{version}-%{release}
173 Requires:       %{name}-static = %{version}-%{release}
174
175 %description gl-static
176 FLTK GL static library.
177
178 %description gl-static -l pl.UTF-8
179 Statyczna biblioteka FLTK GL.
180
181 %package games
182 Summary:        FLTK Games
183 Summary(pl.UTF-8):      Gry FLTK
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
190 %description games -l pl.UTF-8
191 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
192
193 %prep
194 %setup -q
195 %patch0 -p1
196 %patch1 -p1
197 %patch2 -p1
198 %patch3 -p1
199 %patch4 -p1
200
201 %build
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
208 %{__autoconf}
209 %configure \
210         --enable-cairo \
211         --enable-largefile \
212         --enable-shared \
213         --enable-threads \
214         --enable-xinerama \
215         --with-x \
216         --with-optim="%{rpmcxxflags}" \
217         %{!?with_opengl:--disable-gl} \
218         %{?with_xft:--enable-xft}
219
220 %{__make}
221 cd documentation
222 %{__make} html
223
224 %install
225 rm -rf $RPM_BUILD_ROOT
226
227 %{__make} install \
228         install-desktop \
229         DESTDIR=$RPM_BUILD_ROOT
230
231 # less generic games' names
232 for f in blocks checkers sudoku ; do
233 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
234 %{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
235 done
236
237 # we package mans in groff format
238 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat?
239
240 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
241 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
242 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
243
244 %clean
245 rm -rf $RPM_BUILD_ROOT
246
247 %post   -p /sbin/ldconfig
248 %postun -p /sbin/ldconfig
249
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
256 %files
257 %defattr(644,root,root,755)
258 # note: COPYING contains amendments to LGPL, so don't remove!
259 %doc CHANGES COPYING CREDITS README
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.*.*
263
264 %files devel
265 %defattr(644,root,root,755)
266 %doc documentation/html/*.{html,jpg,png}
267 %doc %{_datadir}/doc/%{name}
268 %attr(755,root,root) %{_bindir}/fltk-config
269 %attr(755,root,root) %{_bindir}/fluid
270 %attr(755,root,root) %{_libdir}/libfltk.so
271 %attr(755,root,root) %{_libdir}/libfltk_forms.so
272 %attr(755,root,root) %{_libdir}/libfltk_images.so
273 %{_includedir}/FL
274 %exclude %{_includedir}/FL/Fl_Cairo*.H
275 %exclude %{_includedir}/FL/Fl_Gl_Window.H
276 %exclude %{_includedir}/FL/gl*
277 %{_iconsdir}/hicolor/*/apps/fluid.png
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*
284
285 %files static
286 %defattr(644,root,root,755)
287 %{_libdir}/libfltk.a
288 %{_libdir}/libfltk_forms.a
289 %{_libdir}/libfltk_images.a
290
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
304 %if %{with opengl}
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
312 %{_includedir}/FL/Fl_Gl_Window.H
313 %{_includedir}/FL/gl*
314
315 %files gl-static
316 %defattr(644,root,root,755)
317 %{_libdir}/libfltk_gl.a
318 %endif
319
320 %files games
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_bindir}/%{name}-blocks
323 %attr(755,root,root) %{_bindir}/%{name}-checkers
324 %attr(755,root,root) %{_bindir}/%{name}-sudoku
325 %{_iconsdir}/hicolor/*/apps/blocks.png
326 %{_iconsdir}/hicolor/*/apps/checkers.png
327 %{_iconsdir}/hicolor/*/apps/sudoku.png
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*
This page took 0.085189 seconds and 3 git commands to generate.