]>
Commit | Line | Data |
---|---|---|
5b30b2f5 | 1 | # |
2 | # Conditional build: | |
6ebb25ec JB |
3 | %bcond_without dotnet # C#/Mono binding |
4 | %bcond_without java # Java binding | |
5b30b2f5 | 5 | # |
6 | %ifnarch %{ix86} %{x8664} alpha arm hppa ia64 mips ppc s390 s390x sparc sparcv9 | |
7 | %undefine with_dotnet | |
8 | %endif | |
9 | %ifarch i386 | |
10 | %undefine with_dotnet | |
11 | %endif | |
12 | ||
610ae530 | 13 | %{?with_dotnet:%include /usr/lib/rpm/macros.mono} |
7c11a1cc | 14 | Summary: Graphics library that outputs text instead of pixels |
7a9c9c6a | 15 | Summary(pl.UTF-8): Biblioteka graficzna wyświetlająca tekst zamiast pikseli |
7c11a1cc | 16 | Name: libcaca |
7f15b6b0 | 17 | Version: 0.99 |
6ebb25ec JB |
18 | %define subver beta18 |
19 | Release: 0.%{subver}.1 | |
20 | License: WTFPL v2 | |
7c11a1cc | 21 | Group: Libraries |
0e65a6df | 22 | Source0: http://libcaca.zoy.org/files/libcaca/%{name}-%{version}.%{subver}.tar.gz |
6ebb25ec | 23 | # Source0-md5: 93d35dbdb0527d4c94df3e9a02e865cc |
d1a20e7c | 24 | Patch0: install.patch |
26cf1af7 | 25 | Patch1: %{name}-ruby1.9.patch |
c4712b27 | 26 | Patch2: %{name}-format.patch |
5e3ad4c1 | 27 | Patch3: %{name}-monodir.patch |
dd2da18c | 28 | URL: http://libcaca.zoy.org/ |
7f15b6b0 | 29 | BuildRequires: OpenGL-devel |
193b2ceb JB |
30 | BuildRequires: autoconf >= 2.50 |
31 | BuildRequires: automake | |
1ab8ffdb | 32 | BuildRequires: doxygen |
7f15b6b0 | 33 | BuildRequires: freeglut-devel >= 2.0.0 |
6ebb25ec JB |
34 | # not used |
35 | #BuildRequires: ftgl-devel >= 2.1.3 | |
f307cfb4 | 36 | BuildRequires: imlib2-devel |
6ebb25ec | 37 | %{?with_java:BuildRequires: jdk} |
7f15b6b0 | 38 | BuildRequires: libstdc++-devel |
6ebb25ec | 39 | BuildRequires: libtool >= 2:1.5 |
5b30b2f5 | 40 | %{?with_dotnet:BuildRequires: mono-csharp} |
6ebb25ec | 41 | BuildRequires: python-devel >= 2.2 |
2dbbea20 | 42 | BuildRequires: pkgconfig |
568d4d5b | 43 | BuildRequires: rpmbuild(macros) >= 1.533 |
338c9252 JB |
44 | BuildRequires: rpmbuild(monoautodeps) |
45 | BuildRequires: ruby-devel | |
568d4d5b | 46 | BuildRequires: sed >= 4.0 |
caeb018d | 47 | BuildRequires: slang-devel >= 2.0.0 |
7efddf05 JB |
48 | BuildRequires: texlive-fonts-jknappen |
49 | BuildRequires: texlive-format-pdflatex | |
50 | BuildRequires: texlive-makeindex | |
51 | BuildRequires: texlive-latex-ams | |
7f15b6b0 | 52 | BuildRequires: xorg-lib-libX11-devel |
6ebb25ec | 53 | BuildRequires: zlib-devel |
7c11a1cc | 54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
193b2ceb JB |
56 | %define specflags -fomit-frame-pointer |
57 | ||
7c11a1cc | 58 | %description |
59 | The libcaca library is a graphics library that outputs text instead of | |
60 | pixels, so that it can work on older video cards or text terminals. It | |
61 | is not unlike the famous AAlib library. | |
62 | ||
63 | The differences with AAlib are the following: | |
7c11a1cc | 64 | - 16 available colours for character output (256 colour pairs) |
65 | - dithering of colour images | |
66 | - basic sprite primitives | |
67 | ||
68 | But libcaca also has the following limitations: | |
7c11a1cc | 69 | - no support for brightness, contrast, gamma |
70 | - unefficient character-choosing algorithms | |
71 | - no raw keyboard support | |
72 | ||
cd7f5427 | 73 | %description -l pl.UTF-8 |
2dbbea20 | 74 | Biblioteka libcaca to biblioteka graficzna wyświetlająca tekst zamiast |
75 | pikseli, dzięki czemu może działać na starszych kartach graficznych | |
76 | oraz terminalach tekstowych. Pod tym względem jest podobna do słynnej | |
77 | biblioteki AAlib. | |
193b2ceb | 78 | |
cd7f5427 JR |
79 | Różnice w stosunku do AAlib są następujące: |
80 | - 16 dostępnych kolorów dla znaków (256 par kolorów) | |
81 | - dithering kolorowych obrazów | |
82 | - proste kształty duszków (sprites) | |
193b2ceb | 83 | |
cd7f5427 JR |
84 | Ale libcaca ma także następujące ograniczenia: |
85 | - brak obsługi jasności, kontrastu, korekcji gamma | |
86 | - mało wydajne algorytmy wyboru znaków | |
87 | - brak obsługi klawiatury w trybie surowym | |
193b2ceb | 88 | |
7f15b6b0 | 89 | %package plugin-GL |
90 | Summary: GL plugin for libcaca library | |
91 | Summary(pl.UTF-8): Wtyczka GL dla biblioteki libcaca | |
92 | Group: Libraries | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | Requires: freeglut >= 2.0.0 | |
95 | ||
96 | %description plugin-GL | |
97 | GL plugin for libcaca library. | |
98 | ||
99 | %description plugin-GL -l pl.UTF-8 | |
100 | Wtyczka GL dla biblioteki libcaca. | |
101 | ||
102 | %package plugin-X11 | |
103 | Summary: X11 plugin for libcaca library | |
104 | Summary(pl.UTF-8): Wtyczka X11 dla biblioteki libcaca | |
105 | Group: Libraries | |
106 | Requires: %{name} = %{version}-%{release} | |
107 | ||
108 | %description plugin-X11 | |
109 | X11 plugin for libcaca library. | |
110 | ||
111 | %description plugin-X11 -l pl.UTF-8 | |
112 | Wtyczka X11 dla biblioteki libcaca. | |
113 | ||
114 | %package img | |
115 | Summary: libcaca-based image viewer and converter | |
116 | Summary(pl.UTF-8): Przeglądarka i konwerter obrazków oparte na libcaca | |
117 | Group: Applications/Graphics | |
7f15b6b0 | 118 | |
119 | %description img | |
120 | libcaca-based image viewer and converter. They use imlib2 to load | |
121 | images. | |
122 | ||
123 | %description img -l pl.UTF-8 | |
124 | Przeglądarka i konwerter obrazków oparte na libcaca. Do wczytywania | |
125 | obrazków używają biblioteki imlib2. | |
126 | ||
193b2ceb JB |
127 | %package devel |
128 | Summary: Header files for libcaca library | |
7a9c9c6a | 129 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcaca |
193b2ceb | 130 | Group: Development/Libraries |
7f15b6b0 | 131 | Requires: %{name} = %{version}-%{release} |
132 | Requires: slang-devel >= 2.0.0 | |
193b2ceb JB |
133 | |
134 | %description devel | |
135 | Header files for libcaca library. | |
136 | ||
cd7f5427 JR |
137 | %description devel -l pl.UTF-8 |
138 | Pliki nagłówkowe biblioteki libcaca. | |
193b2ceb JB |
139 | |
140 | %package static | |
141 | Summary: Static libcaca library | |
7a9c9c6a | 142 | Summary(pl.UTF-8): Statyczna biblioteka libcaca |
193b2ceb JB |
143 | Group: Development/Libraries |
144 | Requires: %{name}-devel = %{version}-%{release} | |
145 | ||
146 | %description static | |
147 | Static libcaca library. | |
148 | ||
cd7f5427 | 149 | %description static -l pl.UTF-8 |
193b2ceb JB |
150 | Statyczna biblioteka libcaca. |
151 | ||
7f15b6b0 | 152 | %package c++ |
153 | Summary: C++ bindings for libcaca | |
154 | Summary(pl.UTF-8): Wiązania C++ do libcaca | |
155 | Group: Libraries | |
156 | Requires: %{name} = %{version}-%{release} | |
157 | ||
158 | %description c++ | |
159 | C++ bindings for libcaca. | |
160 | ||
161 | %description c++ -l pl.UTF-8 | |
162 | Wiązania C++ do libcaca. | |
163 | ||
164 | %package c++-devel | |
165 | Summary: C++ bindings for libcaca - header files | |
166 | Summary(pl.UTF-8): Wiązania C++ do libcaca - pliki nagłówkowe | |
167 | Group: Development/Libraries | |
168 | Requires: %{name}-c++ = %{version}-%{release} | |
169 | Requires: %{name}-devel = %{version}-%{release} | |
170 | Requires: libstdc++-devel | |
171 | ||
172 | %description c++-devel | |
173 | C++ bindings for libcaca - header files. | |
174 | ||
175 | %description c++-devel -l pl.UTF-8 | |
176 | Wiązania C++ do libcaca - pliki nagłówkowe. | |
177 | ||
178 | %package c++-static | |
179 | Summary: C++ bindings for libcaca - static libraries | |
180 | Summary(pl.UTF-8): Wiązania C++ do libcaca - biblioteki statyczne | |
181 | Group: Development/Libraries | |
182 | Requires: %{name}-c++-devel = %{version}-%{release} | |
183 | ||
184 | %description c++-static | |
185 | C++ bindings for libcaca - static libraries. | |
186 | ||
187 | %description c++-static -l pl.UTF-8 | |
188 | Wiązania C++ do libcaca - biblioteki statyczne. | |
189 | ||
338c9252 JB |
190 | %package -n dotnet-caca-sharp |
191 | Summary: C# bindings for libcaca | |
192 | Summary(pl.UTF-8): Wiązania C# do libcaca | |
193 | Group: Libraries | |
194 | Requires: %{name} = %{version}-%{release} | |
195 | Requires: mono | |
196 | ||
197 | %description -n dotnet-caca-sharp | |
198 | C# bindings for libcaca. | |
199 | ||
200 | %description -n dotnet-caca-sharp -l pl.UTF-8 | |
201 | Wiązania C# do libcaca. | |
202 | ||
6ebb25ec JB |
203 | %package -n java-caca |
204 | Summary: Java bindings for libcaca | |
205 | Summary(pl.UTF-8): Wiązania Javy do libcaca | |
206 | Group: Libraries/Java | |
207 | Requires: %{name} = %{version}-%{release} | |
208 | Requires: jre | |
209 | ||
210 | %description -n java-caca | |
211 | Java bindings for libcaca. | |
212 | ||
213 | %description -n java-caca -l pl.UTF-8 | |
214 | Wiązania Javy do libcaca. | |
215 | ||
216 | %package -n python-caca | |
217 | Summary: Python bindings for libcaca | |
218 | Summary(pl.UTF-8): Wiązania Pythona do libcaca | |
219 | Group: Development/Languages/Python | |
220 | Requires: %{name} = %{version}-%{release} | |
221 | # ctypes | |
222 | Requires: python-modules | |
223 | ||
224 | %description -n python-caca | |
225 | Python bindings for libcaca. | |
226 | ||
227 | %description -n python-caca -l pl.UTF-8 | |
228 | Wiązania Pythona do libcaca. | |
229 | ||
338c9252 JB |
230 | %package -n ruby-caca |
231 | Summary: Ruby bindings for libcaca | |
232 | Summary(pl.UTF-8): Wiązania języka Ruby do libcaca | |
233 | Group: Development/Languages | |
234 | Requires: %{name} = %{version}-%{release} | |
235 | %{?ruby_ver_requires_eq} | |
236 | ||
237 | %description -n ruby-caca | |
238 | Ruby bindings for libcaca. | |
239 | ||
240 | %description -n ruby-caca -l pl.UTF-8 | |
241 | Wiązania języka Ruby do libcaca. | |
242 | ||
7c11a1cc | 243 | %prep |
338c9252 | 244 | %setup -q -n %{name}-%{version}.%{subver} |
568d4d5b | 245 | %undos */Makefile.am |
d1a20e7c | 246 | %patch0 -p1 |
26cf1af7 | 247 | %patch1 -p1 |
c4712b27 | 248 | %patch2 -p1 |
5e3ad4c1 | 249 | %patch3 -p1 |
7c11a1cc | 250 | |
251 | %build | |
193b2ceb JB |
252 | %{__libtoolize} |
253 | %{__aclocal} | |
254 | %{__autoconf} | |
255 | %{__autoheader} | |
256 | %{__automake} | |
a851fa3f TP |
257 | # NOTE: ncurses driver builds, but there's no color when linked against |
258 | # ABI 6. While caca defaults to ncurses this must be disabled until fixed. | |
7c11a1cc | 259 | %configure \ |
f307cfb4 | 260 | --disable-ncurses \ |
6ebb25ec | 261 | --enable-csharp%{!?with_dotnet:=no} \ |
ea16e9f3 | 262 | --enable-cxx \ |
7f15b6b0 | 263 | --enable-gl \ |
6ebb25ec | 264 | --enable-java%{!?with_java:=no} \ |
7f15b6b0 | 265 | --enable-plugins \ |
266 | --enable-slang \ | |
267 | --enable-x11 | |
7c11a1cc | 268 | |
5b30b2f5 | 269 | |
7f15b6b0 | 270 | # ObjC file not used, use plain CC to link library to avoid C++/ObjC deps |
2b038147 | 271 | %{__make} %{?with_java:-j1} \ |
eafd6e83 | 272 | CLASSPATH=$(pwd)/java \ |
6ebb25ec JB |
273 | OBJC="%{__cc}" \ |
274 | jnidir=%{_libdir} | |
7c11a1cc | 275 | |
276 | %install | |
277 | rm -rf $RPM_BUILD_ROOT | |
7f15b6b0 | 278 | |
193b2ceb | 279 | %{__make} install \ |
6ebb25ec JB |
280 | DESTDIR=$RPM_BUILD_ROOT \ |
281 | jnidir=%{_libdir} | |
7c11a1cc | 282 | |
07c2c308 | 283 | # replace symlink by groff include |
6ebb25ec | 284 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/cacademo.1 |
7f15b6b0 | 285 | echo '.so cacafire.1' > $RPM_BUILD_ROOT%{_mandir}/man1/cacademo.1 |
286 | ||
6ebb25ec JB |
287 | # loadable modules |
288 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/caca/*.{a,la} | |
289 | %{__rm} $RPM_BUILD_ROOT%{ruby_sitearchdir}/*.la | |
290 | %if %{with java} | |
291 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcaca-java.la | |
292 | %endif | |
7f15b6b0 | 293 | # man3 pages have too common base names to be included |
6ebb25ec JB |
294 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man3/*.3caca |
295 | # packaged as %doc in -devel | |
296 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/lib{caca,cucul}-dev | |
07c2c308 | 297 | |
d1a20e7c | 298 | cd $RPM_BUILD_ROOT%{_libdir} |
6ebb25ec | 299 | for i in libcaca.so.*.*.* libcaca++.so.*.*.*; do |
d1a20e7c SS |
300 | ln -sf $i $(echo $i |sed 's/caca/cucul/') |
301 | done | |
302 | ln -sf libcaca.a $RPM_BUILD_ROOT%{_libdir}/libcucul.a | |
303 | ln -sf libcaca.la $RPM_BUILD_ROOT%{_libdir}/libcucul.la | |
304 | ln -sf libcaca.so $RPM_BUILD_ROOT%{_libdir}/libcucul.so | |
305 | ln -sf libcaca.so.0 $RPM_BUILD_ROOT%{_libdir}/libcucul.so.0 | |
306 | ln -sf libcaca++.a $RPM_BUILD_ROOT%{_libdir}/libcucul++.a | |
307 | ln -sf libcaca++.la $RPM_BUILD_ROOT%{_libdir}/libcucul++.la | |
308 | ln -sf libcaca++.so $RPM_BUILD_ROOT%{_libdir}/libcucul++.so | |
309 | ln -sf libcaca++.so.0 $RPM_BUILD_ROOT%{_libdir}/libcucul++.so.0 | |
d1a20e7c SS |
310 | ln -sf caca++.h $RPM_BUILD_ROOT%{_includedir}/cucul++.h |
311 | ln -sf caca_types.h $RPM_BUILD_ROOT%{_includedir}/cucul_types.h | |
6ebb25ec JB |
312 | |
313 | %py_postclean | |
d1a20e7c | 314 | |
7c11a1cc | 315 | %clean |
316 | rm -rf $RPM_BUILD_ROOT | |
317 | ||
7f15b6b0 | 318 | %post -p /sbin/ldconfig |
319 | %postun -p /sbin/ldconfig | |
320 | ||
321 | %post c++ -p /sbin/ldconfig | |
322 | %postun c++ -p /sbin/ldconfig | |
193b2ceb | 323 | |
6ebb25ec JB |
324 | %post -n java-caca -p /sbin/ldconfig |
325 | %postun -n java-caca -p /sbin/ldconfig | |
326 | ||
7c11a1cc | 327 | %files |
328 | %defattr(644,root,root,755) | |
1842e37c | 329 | %doc AUTHORS COPYING ChangeLog NEWS NOTES README THANKS |
6ebb25ec | 330 | %attr(755,root,root) %{_bindir}/cacaclock |
193b2ceb JB |
331 | %attr(755,root,root) %{_bindir}/cacademo |
332 | %attr(755,root,root) %{_bindir}/cacafire | |
7f15b6b0 | 333 | %attr(755,root,root) %{_bindir}/cacaplay |
334 | %attr(755,root,root) %{_bindir}/cacaserver | |
335 | %attr(755,root,root) %{_libdir}/libcaca.so.*.*.* | |
338c9252 | 336 | %attr(755,root,root) %ghost %{_libdir}/libcaca.so.0 |
7f15b6b0 | 337 | %attr(755,root,root) %{_libdir}/libcucul.so.*.*.* |
338c9252 | 338 | %attr(755,root,root) %ghost %{_libdir}/libcucul.so.0 |
7f15b6b0 | 339 | %dir %{_libdir}/caca |
7c11a1cc | 340 | %{_datadir}/%{name} |
193b2ceb JB |
341 | %{_mandir}/man1/cacademo.1* |
342 | %{_mandir}/man1/cacafire.1* | |
7f15b6b0 | 343 | %{_mandir}/man1/cacaplay.1* |
344 | %{_mandir}/man1/cacaserver.1* | |
345 | ||
346 | %files plugin-GL | |
347 | %defattr(644,root,root,755) | |
348 | %attr(755,root,root) %{_libdir}/caca/libgl_plugin.so* | |
349 | ||
350 | %files plugin-X11 | |
351 | %defattr(644,root,root,755) | |
352 | %attr(755,root,root) %{_libdir}/caca/libx11_plugin.so* | |
353 | ||
354 | %files img | |
355 | %defattr(644,root,root,755) | |
356 | %attr(755,root,root) %{_bindir}/cacaview | |
338c9252 | 357 | %attr(755,root,root) %{_bindir}/img2txt |
193b2ceb | 358 | %{_mandir}/man1/cacaview.1* |
338c9252 | 359 | %{_mandir}/man1/img2txt.1* |
193b2ceb JB |
360 | |
361 | %files devel | |
362 | %defattr(644,root,root,755) | |
363 | %doc doc/html/* | |
364 | %attr(755,root,root) %{_bindir}/caca-config | |
7f15b6b0 | 365 | %attr(755,root,root) %{_libdir}/libcaca.so |
366 | %attr(755,root,root) %{_libdir}/libcucul.so | |
367 | %{_libdir}/libcaca.la | |
368 | %{_libdir}/libcucul.la | |
369 | %{_includedir}/caca.h | |
370 | %{_includedir}/caca0.h | |
6ebb25ec | 371 | %{_includedir}/caca_conio.h |
d1a20e7c | 372 | %{_includedir}/caca_types.h |
7f15b6b0 | 373 | %{_includedir}/cucul.h |
1842e37c | 374 | %{_includedir}/cucul_types.h |
7f15b6b0 | 375 | %{_pkgconfigdir}/caca.pc |
376 | %{_pkgconfigdir}/cucul.pc | |
1ab8ffdb | 377 | %{_mandir}/man1/caca-config.1* |
193b2ceb JB |
378 | # man3 pages have too common base names to be included |
379 | ||
7f15b6b0 | 380 | %files static |
381 | %defattr(644,root,root,755) | |
382 | %{_libdir}/libcaca.a | |
383 | %{_libdir}/libcucul.a | |
384 | ||
385 | %files c++ | |
386 | %defattr(644,root,root,755) | |
387 | %attr(755,root,root) %{_libdir}/libcaca++.so.*.*.* | |
338c9252 | 388 | %attr(755,root,root) %ghost %{_libdir}/libcaca++.so.0 |
7f15b6b0 | 389 | %attr(755,root,root) %{_libdir}/libcucul++.so.*.*.* |
338c9252 | 390 | %attr(755,root,root) %ghost %{_libdir}/libcucul++.so.0 |
7f15b6b0 | 391 | |
392 | %files c++-devel | |
393 | %defattr(644,root,root,755) | |
394 | %attr(755,root,root) %{_libdir}/libcaca++.so | |
395 | %attr(755,root,root) %{_libdir}/libcucul++.so | |
396 | %{_libdir}/libcaca++.la | |
397 | %{_libdir}/libcucul++.la | |
398 | %{_includedir}/caca++.h | |
399 | %{_includedir}/cucul++.h | |
1842e37c JB |
400 | %{_pkgconfigdir}/caca++.pc |
401 | %{_pkgconfigdir}/cucul++.pc | |
7f15b6b0 | 402 | |
403 | %files c++-static | |
404 | %defattr(644,root,root,755) | |
405 | %{_libdir}/libcaca++.a | |
406 | %{_libdir}/libcucul++.a | |
338c9252 | 407 | |
5b30b2f5 | 408 | %if %{with dotnet} |
338c9252 JB |
409 | %files -n dotnet-caca-sharp |
410 | %defattr(644,root,root,755) | |
6ebb25ec JB |
411 | %{_prefix}/lib/mono/caca-sharp-0.0 |
412 | %{_prefix}/lib/mono/gac/caca-sharp | |
413 | %{_javadir}/libjava.jar | |
414 | %endif | |
415 | ||
416 | %if %{with dotnet} | |
417 | %files -n java-caca | |
418 | %defattr(644,root,root,755) | |
419 | %attr(755,root,root) %{_libdir}/libcaca-java.so.*.*.* | |
420 | %attr(755,root,root) %ghost %{_libdir}/libcaca-java.so.0 | |
421 | %attr(755,root,root) %{_libdir}/libcaca-java.so | |
5b30b2f5 | 422 | %endif |
338c9252 | 423 | |
6ebb25ec JB |
424 | %files -n python-caca |
425 | %defattr(644,root,root,755) | |
426 | %dir %{py_sitescriptdir}/caca | |
427 | %{py_sitescriptdir}/caca/*.py[co] | |
428 | ||
338c9252 JB |
429 | %files -n ruby-caca |
430 | %defattr(644,root,root,755) | |
431 | %{ruby_sitelibdir}/caca.rb | |
432 | %attr(755,root,root) %{ruby_sitearchdir}/caca.so |