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