]> git.pld-linux.org Git - packages/fltk.git/blob - fltk.spec
5b03e306d78548fefee0257fd1cdafc11372392c
[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:        3
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 # 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
166 %{__autoconf}
167 %configure \
168         --enable-largefile \
169         --enable-shared \
170         --enable-threads \
171         --enable-xinerama \
172         --with-x \
173         --with-optim="%{rpmcxxflags}" \
174         %{!?with_opengl:--disable-gl} \
175         %{?with_xft:--enable-xft}
176
177 %{__make}
178 cd documentation
179 %{__make} html
180
181 %install
182 rm -rf $RPM_BUILD_ROOT
183
184 %{__make} install \
185         install-desktop \
186         DESTDIR=$RPM_BUILD_ROOT
187
188 # less generic games' names
189 for f in blocks checkers sudoku ; do
190 mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
191 mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
192 done
193
194 # add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
195 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
196 ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
197
198 %clean
199 rm -rf $RPM_BUILD_ROOT
200
201 %post   -p /sbin/ldconfig
202 %postun -p /sbin/ldconfig
203
204 %files
205 %defattr(644,root,root,755)
206 # note: COPYING contains amendments to LGPL, so don't remove!
207 %doc CHANGES COPYING CREDITS README
208 %attr(755,root,root) %{_libdir}/libfltk.so.*.*
209 %attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
210 %attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
211
212 %files devel
213 %defattr(644,root,root,755)
214 %doc documentation/html/*.{html,jpg,png}
215 %doc %{_datadir}/doc/%{name}
216 %attr(755,root,root) %{_bindir}/fltk-config
217 %attr(755,root,root) %{_bindir}/fluid
218 %attr(755,root,root) %{_libdir}/libfltk.so
219 %attr(755,root,root) %{_libdir}/libfltk_forms.so
220 %attr(755,root,root) %{_libdir}/libfltk_images.so
221 %{_includedir}/FL
222 %exclude %{_includedir}/FL/Fl_Gl_Window.*
223 %exclude %{_includedir}/FL/gl*
224 %{_iconsdir}/*/*/*/fluid.png
225 %{_desktopdir}/fluid.desktop
226 # move to some KDE package?
227 #%{_datadir}/mimelnk/application/x-fluid.desktop
228 %{_mandir}/man1/fltk-config.1*
229 %{_mandir}/man1/fluid.1*
230 %{_mandir}/man3/fltk.3*
231
232 %files static
233 %defattr(644,root,root,755)
234 %{_libdir}/libfltk.a
235 %{_libdir}/libfltk_forms.a
236 %{_libdir}/libfltk_images.a
237
238 %if %{with opengl}
239 %files gl
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
242
243 %files gl-devel
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libfltk_gl.so
246 %{_includedir}/FL/Fl_Gl_Window.*
247 %{_includedir}/FL/gl*
248
249 %files gl-static
250 %defattr(644,root,root,755)
251 %{_libdir}/libfltk_gl.a
252 %endif
253
254 %files games
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/%{name}-blocks
257 %attr(755,root,root) %{_bindir}/%{name}-checkers
258 %attr(755,root,root) %{_bindir}/%{name}-sudoku
259 %{_iconsdir}/*/*/*/blocks.png
260 %{_iconsdir}/*/*/*/checkers.png
261 %{_iconsdir}/*/*/*/sudoku.png
262 %{_desktopdir}/blocks.desktop
263 %{_desktopdir}/checkers.desktop
264 %{_desktopdir}/sudoku.desktop
265 %{_mandir}/man6/%{name}-blocks.6*
266 %{_mandir}/man6/%{name}-checkers.6*
267 %{_mandir}/man6/%{name}-sudoku.6*
This page took 0.064116 seconds and 2 git commands to generate.