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