]> git.pld-linux.org Git - packages/fltk.git/blob - fltk.spec
- fix building with libjpeg 9
[packages/fltk.git] / fltk.spec
1 # TODO: enable cairo support?
2 #
3 # Conditional build:
4 %bcond_without  opengl  # without OpenGL libraries
5 %bcond_without  xft     # without Xft support
6 #
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
10 Name:           fltk
11 Version:        1.3.2
12 Release:        1
13 License:        LGPL with amendments (see COPYING)
14 Group:          X11/Libraries
15 Source0:        http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
16 # Source0-md5:  9f7e707d4fb7a5a76f0f9b73ff70623d
17 Patch0:         %{name}-desktop.patch
18 Patch1:         %{name}-1.3.0-as-needed.patch
19 Patch2:         %{name}-link.patch
20 Patch3:         %{name}-libjpeg.patch
21 URL:            http://www.fltk.org/
22 %{?with_opengl:BuildRequires:   OpenGL-GLU-devel}
23 BuildRequires:  autoconf >= 2.50
24 BuildRequires:  doxygen
25 BuildRequires:  groff
26 BuildRequires:  libjpeg-devel
27 BuildRequires:  libpng-devel
28 BuildRequires:  libstdc++-devel
29 BuildRequires:  rpmbuild(macros) >= 1.315
30 BuildRequires:  xorg-lib-libXext-devel
31 %{?with_xft:BuildRequires:      xorg-lib-libXft-devel}
32 BuildRequires:  xorg-lib-libXinerama-devel
33 BuildRequires:  xorg-util-makedepend
34 Obsoletes:      libfltk1.1
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
38
39 # don't propagate strip-flags to fltk-config.
40 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
41
42 %description
43 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
44 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
45 Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
46 by Mr. Bill Spitzak and is currently maintained by a small group of
47 developers across the world with a central repository in the US.
48
49 %description -l pl.UTF-8
50 Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
51 na licencji LGPL narzędziem do tworzenia graficznych interfejsów
52 użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
53 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
54 Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
55 deweloperów z różnych stron świata (centralne repozytorium znajduje
56 się w USA).
57
58 %description -l pt_BR.UTF-8
59 A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
60 ferramenta e interface gráfica feita em C++ para desenvolver
61 aplicativos para o X, OpenGL e Windows.
62
63 %package devel
64 Summary:        FLTK development files
65 Summary(pl.UTF-8):      Narzędzia programistyczne dla FLTK
66 Summary(pt_BR.UTF-8):   Arquivos de inclusão para o FLTK
67 Group:          X11/Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Requires:       libjpeg-devel
70 Requires:       libpng-devel
71 Requires:       libstdc++-devel
72 %{?with_xft:Requires:   xorg-lib-libXft-devel}
73 Requires:       xorg-lib-libXinerama-devel
74 Obsoletes:      libfltk1.1-devel
75
76 %description devel
77 FLTK development files.
78
79 %description devel -l pl.UTF-8
80 Narzędzia programistyczne dla FLTK.
81
82 %description devel -l pt_BR.UTF-8
83 Arquivos de inclusão para o FLTK.
84
85 %package static
86 Summary:        FLTK static library
87 Summary(pl.UTF-8):      Biblioteka FLTK konsolidowana statycznie
88 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para o FLTK
89 Group:          X11/Development/Libraries
90 Requires:       %{name}-devel = %{version}-%{release}
91
92 %description static
93 FLTK static library.
94
95 %description static -l pl.UTF-8
96 Biblioteka FLTK konsolidowana statycznie.
97
98 %description static -l pt_BR.UTF-8
99 Bibliotecas estáticas para o FLTK.
100
101 %package gl
102 Summary:        FLTK GL library
103 Summary(pl.UTF-8):      Biblioteka FLTK GL
104 Group:          X11/Libraries
105 Requires:       %{name} = %{version}-%{release}
106 Requires:       OpenGL
107
108 %description gl
109 FLTK GL library.
110
111 %description gl -l pl.UTF-8
112 Biblioteka FLTK GL.
113
114 %package gl-devel
115 Summary:        Header files for FLTK GL library
116 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FLTK GL
117 Group:          X11/Development/Libraries
118 Requires:       %{name}-devel = %{version}-%{release}
119 Requires:       %{name}-gl = %{version}-%{release}
120
121 %description gl-devel
122 Header files for FLTK GL library.
123
124 %description gl-devel -l pl.UTF-8
125 Pliki nagłówkowe biblioteki FLTK GL.
126
127 %package gl-static
128 Summary:        FLTK GL static library
129 Summary(pl.UTF-8):      Statyczna biblioteka FLTK GL
130 Group:          X11/Development/Libraries
131 Requires:       %{name}-gl-devel = %{version}-%{release}
132 Requires:       %{name}-static = %{version}-%{release}
133
134 %description gl-static
135 FLTK GL static library.
136
137 %description gl-static -l pl.UTF-8
138 Statyczna biblioteka FLTK GL.
139
140 %package games
141 Summary:        FLTK Games
142 Summary(pl.UTF-8):      Gry FLTK
143 Group:          X11/Applications/Games
144 Requires:       %{name} = %{version}-%{release}
145
146 %description games
147 FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
148
149 %description games -l pl.UTF-8
150 Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
151
152 %prep
153 %setup -q
154 %patch0 -p1
155 %patch1 -p1
156 %patch2 -p1
157 %patch3 -p1
158
159 %build
160 %{__autoconf}
161 %configure \
162         --enable-largefile \
163         --enable-shared \
164         --enable-threads \
165         --enable-xinerama \
166         --with-x \
167         --with-optim="%{rpmcxxflags}" \
168         %{!?with_opengl:--disable-gl} \
169         %{?with_xft:--enable-xft}
170
171 %{__make}
172 cd documentation
173 %{__make} html
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177
178 %{__make} install \
179         install-desktop \
180         DESTDIR=$RPM_BUILD_ROOT
181
182 # less generic games' names
183 for f in blocks checkers sudoku ; do
184 mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
185 mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
186 done
187
188 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
189 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
190 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %post   -p /sbin/ldconfig
196 %postun -p /sbin/ldconfig
197
198 %files
199 %defattr(644,root,root,755)
200 # note: COPYING contains amendments to LGPL, so don't remove!
201 %doc CHANGES COPYING CREDITS README
202 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
203 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
204 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
205
206 %files devel
207 %defattr(644,root,root,755)
208 %doc documentation/html/*.{html,jpg,png}
209 %doc %{_datadir}/doc/%{name}
210 %attr(755,root,root) %{_bindir}/fltk-config
211 %attr(755,root,root) %{_bindir}/fluid
212 %attr(755,root,root) %{_libdir}/libfltk.so
213 %attr(755,root,root) %{_libdir}/libfltk_forms.so
214 %attr(755,root,root) %{_libdir}/libfltk_images.so
215 %{_includedir}/FL
216 %exclude %{_includedir}/FL/Fl_Gl_Window.*
217 %exclude %{_includedir}/FL/gl*
218 %{_iconsdir}/*/*/*/fluid.png
219 %{_desktopdir}/fluid.desktop
220 # move to some KDE package?
221 #%{_datadir}/mimelnk/application/x-fluid.desktop
222 %{_mandir}/man1/fltk-config.1*
223 %{_mandir}/man1/fluid.1*
224 %{_mandir}/man3/fltk.3*
225
226 %files static
227 %defattr(644,root,root,755)
228 %{_libdir}/libfltk.a
229 %{_libdir}/libfltk_forms.a
230 %{_libdir}/libfltk_images.a
231
232 %if %{with opengl}
233 %files gl
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
236
237 %files gl-devel
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libfltk_gl.so
240 %{_includedir}/FL/Fl_Gl_Window.*
241 %{_includedir}/FL/gl*
242
243 %files gl-static
244 %defattr(644,root,root,755)
245 %{_libdir}/libfltk_gl.a
246 %endif
247
248 %files games
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/%{name}-blocks
251 %attr(755,root,root) %{_bindir}/%{name}-checkers
252 %attr(755,root,root) %{_bindir}/%{name}-sudoku
253 %{_iconsdir}/*/*/*/blocks.png
254 %{_iconsdir}/*/*/*/checkers.png
255 %{_iconsdir}/*/*/*/sudoku.png
256 %{_desktopdir}/blocks.desktop
257 %{_desktopdir}/checkers.desktop
258 %{_desktopdir}/sudoku.desktop
259 %{_mandir}/man6/%{name}-blocks.6*
260 %{_mandir}/man6/%{name}-checkers.6*
261 %{_mandir}/man6/%{name}-sudoku.6*
This page took 0.082305 seconds and 3 git commands to generate.