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