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