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