]>
Commit | Line | Data |
---|---|---|
5b30b2f5 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without dotnet # don't build mono plugin | |
4 | # | |
5 | %ifnarch %{ix86} %{x8664} alpha arm hppa ia64 mips ppc s390 s390x sparc sparcv9 | |
6 | %undefine with_dotnet | |
7 | %endif | |
8 | %ifarch i386 | |
9 | %undefine with_dotnet | |
10 | %endif | |
11 | ||
610ae530 | 12 | %{?with_dotnet:%include /usr/lib/rpm/macros.mono} |
7c11a1cc | 13 | Summary: Graphics library that outputs text instead of pixels |
7a9c9c6a | 14 | Summary(pl.UTF-8): Biblioteka graficzna wyświetlająca tekst zamiast pikseli |
7c11a1cc | 15 | Name: libcaca |
7f15b6b0 | 16 | Version: 0.99 |
338c9252 JB |
17 | %define subver beta13 |
18 | Release: 0.%{subver}.1 | |
7f15b6b0 | 19 | License: WTFPL |
7c11a1cc | 20 | Group: Libraries |
338c9252 JB |
21 | Source0: http://libcaca.zoy.org/files/%{name}-%{version}.%{subver}.tar.gz |
22 | # Source0-md5: 39e27737a51d0cf309675d948b1bde4e | |
dd2da18c | 23 | URL: http://libcaca.zoy.org/ |
7f15b6b0 | 24 | BuildRequires: OpenGL-devel |
193b2ceb JB |
25 | BuildRequires: autoconf >= 2.50 |
26 | BuildRequires: automake | |
1ab8ffdb | 27 | BuildRequires: doxygen |
7f15b6b0 | 28 | BuildRequires: freeglut-devel >= 2.0.0 |
f307cfb4 | 29 | BuildRequires: imlib2-devel |
7f15b6b0 | 30 | BuildRequires: libstdc++-devel |
193b2ceb | 31 | BuildRequires: libtool |
5b30b2f5 | 32 | %{?with_dotnet:BuildRequires: mono-csharp} |
338c9252 JB |
33 | BuildRequires: rpmbuild(macros) >= 1.272 |
34 | BuildRequires: rpmbuild(monoautodeps) | |
35 | BuildRequires: ruby-devel | |
caeb018d | 36 | BuildRequires: slang-devel >= 2.0.0 |
1ab8ffdb | 37 | # shouldn't these be in doxygen requirements? |
38 | BuildRequires: tetex-fonts-jknappen | |
39 | BuildRequires: tetex-makeindex | |
0ec9276e | 40 | BuildRequires: tetex-metafont |
7f15b6b0 | 41 | BuildRequires: xorg-lib-libX11-devel |
7c11a1cc | 42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
193b2ceb JB |
44 | %define specflags -fomit-frame-pointer |
45 | ||
7c11a1cc | 46 | %description |
47 | The libcaca library is a graphics library that outputs text instead of | |
48 | pixels, so that it can work on older video cards or text terminals. It | |
49 | is not unlike the famous AAlib library. | |
50 | ||
51 | The differences with AAlib are the following: | |
7c11a1cc | 52 | - 16 available colours for character output (256 colour pairs) |
53 | - dithering of colour images | |
54 | - basic sprite primitives | |
55 | ||
56 | But libcaca also has the following limitations: | |
7c11a1cc | 57 | - no support for brightness, contrast, gamma |
58 | - unefficient character-choosing algorithms | |
59 | - no raw keyboard support | |
60 | ||
cd7f5427 | 61 | %description -l pl.UTF-8 |
7f15b6b0 | 62 | Biblioteka libcaca to biblioteka graficzna wyświetlająca tekst |
63 | zamiast pikseli, dzięki czemu może działać na starszych kartach | |
64 | graficznych oraz terminalach tekstowych. Pod tym względem jest | |
65 | podobna do słynnej biblioteki AAlib. | |
193b2ceb | 66 | |
cd7f5427 JR |
67 | Różnice w stosunku do AAlib są następujące: |
68 | - 16 dostępnych kolorów dla znaków (256 par kolorów) | |
69 | - dithering kolorowych obrazów | |
70 | - proste kształty duszków (sprites) | |
193b2ceb | 71 | |
cd7f5427 JR |
72 | Ale libcaca ma także następujące ograniczenia: |
73 | - brak obsługi jasności, kontrastu, korekcji gamma | |
74 | - mało wydajne algorytmy wyboru znaków | |
75 | - brak obsługi klawiatury w trybie surowym | |
193b2ceb | 76 | |
7f15b6b0 | 77 | %package plugin-GL |
78 | Summary: GL plugin for libcaca library | |
79 | Summary(pl.UTF-8): Wtyczka GL dla biblioteki libcaca | |
80 | Group: Libraries | |
81 | Requires: %{name} = %{version}-%{release} | |
82 | Requires: freeglut >= 2.0.0 | |
83 | ||
84 | %description plugin-GL | |
85 | GL plugin for libcaca library. | |
86 | ||
87 | %description plugin-GL -l pl.UTF-8 | |
88 | Wtyczka GL dla biblioteki libcaca. | |
89 | ||
90 | %package plugin-X11 | |
91 | Summary: X11 plugin for libcaca library | |
92 | Summary(pl.UTF-8): Wtyczka X11 dla biblioteki libcaca | |
93 | Group: Libraries | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | ||
96 | %description plugin-X11 | |
97 | X11 plugin for libcaca library. | |
98 | ||
99 | %description plugin-X11 -l pl.UTF-8 | |
100 | Wtyczka X11 dla biblioteki libcaca. | |
101 | ||
102 | %package img | |
103 | Summary: libcaca-based image viewer and converter | |
104 | Summary(pl.UTF-8): Przeglądarka i konwerter obrazków oparte na libcaca | |
105 | Group: Applications/Graphics | |
106 | Requires: %{name} = %{version}-%{release} | |
107 | ||
108 | %description img | |
109 | libcaca-based image viewer and converter. They use imlib2 to load | |
110 | images. | |
111 | ||
112 | %description img -l pl.UTF-8 | |
113 | Przeglądarka i konwerter obrazków oparte na libcaca. Do wczytywania | |
114 | obrazków używają biblioteki imlib2. | |
115 | ||
193b2ceb JB |
116 | %package devel |
117 | Summary: Header files for libcaca library | |
7a9c9c6a | 118 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcaca |
193b2ceb | 119 | Group: Development/Libraries |
7f15b6b0 | 120 | Requires: %{name} = %{version}-%{release} |
121 | Requires: slang-devel >= 2.0.0 | |
193b2ceb JB |
122 | |
123 | %description devel | |
124 | Header files for libcaca library. | |
125 | ||
cd7f5427 JR |
126 | %description devel -l pl.UTF-8 |
127 | Pliki nagłówkowe biblioteki libcaca. | |
193b2ceb JB |
128 | |
129 | %package static | |
130 | Summary: Static libcaca library | |
7a9c9c6a | 131 | Summary(pl.UTF-8): Statyczna biblioteka libcaca |
193b2ceb JB |
132 | Group: Development/Libraries |
133 | Requires: %{name}-devel = %{version}-%{release} | |
134 | ||
135 | %description static | |
136 | Static libcaca library. | |
137 | ||
cd7f5427 | 138 | %description static -l pl.UTF-8 |
193b2ceb JB |
139 | Statyczna biblioteka libcaca. |
140 | ||
7f15b6b0 | 141 | %package c++ |
142 | Summary: C++ bindings for libcaca | |
143 | Summary(pl.UTF-8): Wiązania C++ do libcaca | |
144 | Group: Libraries | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | ||
147 | %description c++ | |
148 | C++ bindings for libcaca. | |
149 | ||
150 | %description c++ -l pl.UTF-8 | |
151 | Wiązania C++ do libcaca. | |
152 | ||
153 | %package c++-devel | |
154 | Summary: C++ bindings for libcaca - header files | |
155 | Summary(pl.UTF-8): Wiązania C++ do libcaca - pliki nagłówkowe | |
156 | Group: Development/Libraries | |
157 | Requires: %{name}-c++ = %{version}-%{release} | |
158 | Requires: %{name}-devel = %{version}-%{release} | |
159 | Requires: libstdc++-devel | |
160 | ||
161 | %description c++-devel | |
162 | C++ bindings for libcaca - header files. | |
163 | ||
164 | %description c++-devel -l pl.UTF-8 | |
165 | Wiązania C++ do libcaca - pliki nagłówkowe. | |
166 | ||
167 | %package c++-static | |
168 | Summary: C++ bindings for libcaca - static libraries | |
169 | Summary(pl.UTF-8): Wiązania C++ do libcaca - biblioteki statyczne | |
170 | Group: Development/Libraries | |
171 | Requires: %{name}-c++-devel = %{version}-%{release} | |
172 | ||
173 | %description c++-static | |
174 | C++ bindings for libcaca - static libraries. | |
175 | ||
176 | %description c++-static -l pl.UTF-8 | |
177 | Wiązania C++ do libcaca - biblioteki statyczne. | |
178 | ||
338c9252 JB |
179 | %package -n dotnet-caca-sharp |
180 | Summary: C# bindings for libcaca | |
181 | Summary(pl.UTF-8): Wiązania C# do libcaca | |
182 | Group: Libraries | |
183 | Requires: %{name} = %{version}-%{release} | |
184 | Requires: mono | |
185 | ||
186 | %description -n dotnet-caca-sharp | |
187 | C# bindings for libcaca. | |
188 | ||
189 | %description -n dotnet-caca-sharp -l pl.UTF-8 | |
190 | Wiązania C# do libcaca. | |
191 | ||
192 | %package -n ruby-caca | |
193 | Summary: Ruby bindings for libcaca | |
194 | Summary(pl.UTF-8): Wiązania języka Ruby do libcaca | |
195 | Group: Development/Languages | |
196 | Requires: %{name} = %{version}-%{release} | |
197 | %{?ruby_ver_requires_eq} | |
198 | ||
199 | %description -n ruby-caca | |
200 | Ruby bindings for libcaca. | |
201 | ||
202 | %description -n ruby-caca -l pl.UTF-8 | |
203 | Wiązania języka Ruby do libcaca. | |
204 | ||
7c11a1cc | 205 | %prep |
338c9252 | 206 | %setup -q -n %{name}-%{version}.%{subver} |
7c11a1cc | 207 | |
208 | %build | |
193b2ceb JB |
209 | %{__libtoolize} |
210 | %{__aclocal} | |
211 | %{__autoconf} | |
212 | %{__autoheader} | |
213 | %{__automake} | |
7c11a1cc | 214 | %configure \ |
f307cfb4 | 215 | --disable-ncurses \ |
ea16e9f3 | 216 | --%{!?with_dotnet:dis}%{?with_dotnet:en}able-csharp \ |
217 | --enable-cxx \ | |
7f15b6b0 | 218 | --enable-gl \ |
219 | --enable-plugins \ | |
220 | --enable-slang \ | |
221 | --enable-x11 | |
7c11a1cc | 222 | |
5b30b2f5 | 223 | |
7f15b6b0 | 224 | # ObjC file not used, use plain CC to link library to avoid C++/ObjC deps |
225 | %{__make} \ | |
226 | OBJC="%{__cc}" | |
7c11a1cc | 227 | |
228 | %install | |
229 | rm -rf $RPM_BUILD_ROOT | |
7f15b6b0 | 230 | |
193b2ceb JB |
231 | %{__make} install \ |
232 | DESTDIR=$RPM_BUILD_ROOT | |
7c11a1cc | 233 | |
07c2c308 | 234 | # replace symlink by groff include |
7f15b6b0 | 235 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/cacademo.1 |
236 | echo '.so cacafire.1' > $RPM_BUILD_ROOT%{_mandir}/man1/cacademo.1 | |
237 | ||
238 | rm -f $RPM_BUILD_ROOT%{_libdir}/caca/*.{a,la} | |
338c9252 | 239 | rm -f $RPM_BUILD_ROOT%{ruby_sitearchdir}/*.{a,la} |
7f15b6b0 | 240 | # man3 pages have too common base names to be included |
241 | rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*.3caca | |
242 | rm -rf $RPM_BUILD_ROOT%{_docdir}/libcucul-dev | |
07c2c308 | 243 | |
7c11a1cc | 244 | %clean |
245 | rm -rf $RPM_BUILD_ROOT | |
246 | ||
7f15b6b0 | 247 | %post -p /sbin/ldconfig |
248 | %postun -p /sbin/ldconfig | |
249 | ||
250 | %post c++ -p /sbin/ldconfig | |
251 | %postun c++ -p /sbin/ldconfig | |
193b2ceb | 252 | |
7c11a1cc | 253 | %files |
254 | %defattr(644,root,root,755) | |
7f15b6b0 | 255 | %doc AUTHORS COPYING ChangeLog NEWS NOTES README THANKS TODO |
193b2ceb JB |
256 | %attr(755,root,root) %{_bindir}/cacademo |
257 | %attr(755,root,root) %{_bindir}/cacafire | |
7f15b6b0 | 258 | %attr(755,root,root) %{_bindir}/cacaplay |
259 | %attr(755,root,root) %{_bindir}/cacaserver | |
260 | %attr(755,root,root) %{_libdir}/libcaca.so.*.*.* | |
338c9252 | 261 | %attr(755,root,root) %ghost %{_libdir}/libcaca.so.0 |
7f15b6b0 | 262 | %attr(755,root,root) %{_libdir}/libcucul.so.*.*.* |
338c9252 | 263 | %attr(755,root,root) %ghost %{_libdir}/libcucul.so.0 |
7f15b6b0 | 264 | %dir %{_libdir}/caca |
7c11a1cc | 265 | %{_datadir}/%{name} |
193b2ceb JB |
266 | %{_mandir}/man1/cacademo.1* |
267 | %{_mandir}/man1/cacafire.1* | |
7f15b6b0 | 268 | %{_mandir}/man1/cacaplay.1* |
269 | %{_mandir}/man1/cacaserver.1* | |
270 | ||
271 | %files plugin-GL | |
272 | %defattr(644,root,root,755) | |
273 | %attr(755,root,root) %{_libdir}/caca/libgl_plugin.so* | |
274 | ||
275 | %files plugin-X11 | |
276 | %defattr(644,root,root,755) | |
277 | %attr(755,root,root) %{_libdir}/caca/libx11_plugin.so* | |
278 | ||
279 | %files img | |
280 | %defattr(644,root,root,755) | |
281 | %attr(755,root,root) %{_bindir}/cacaview | |
338c9252 | 282 | %attr(755,root,root) %{_bindir}/img2txt |
193b2ceb | 283 | %{_mandir}/man1/cacaview.1* |
338c9252 | 284 | %{_mandir}/man1/img2txt.1* |
193b2ceb JB |
285 | |
286 | %files devel | |
287 | %defattr(644,root,root,755) | |
288 | %doc doc/html/* | |
289 | %attr(755,root,root) %{_bindir}/caca-config | |
7f15b6b0 | 290 | %attr(755,root,root) %{_libdir}/libcaca.so |
291 | %attr(755,root,root) %{_libdir}/libcucul.so | |
292 | %{_libdir}/libcaca.la | |
293 | %{_libdir}/libcucul.la | |
294 | %{_includedir}/caca.h | |
295 | %{_includedir}/caca0.h | |
296 | %{_includedir}/cucul.h | |
297 | %{_pkgconfigdir}/caca.pc | |
298 | %{_pkgconfigdir}/cucul.pc | |
1ab8ffdb | 299 | %{_mandir}/man1/caca-config.1* |
193b2ceb JB |
300 | # man3 pages have too common base names to be included |
301 | ||
7f15b6b0 | 302 | %files static |
303 | %defattr(644,root,root,755) | |
304 | %{_libdir}/libcaca.a | |
305 | %{_libdir}/libcucul.a | |
306 | ||
307 | %files c++ | |
308 | %defattr(644,root,root,755) | |
309 | %attr(755,root,root) %{_libdir}/libcaca++.so.*.*.* | |
338c9252 | 310 | %attr(755,root,root) %ghost %{_libdir}/libcaca++.so.0 |
7f15b6b0 | 311 | %attr(755,root,root) %{_libdir}/libcucul++.so.*.*.* |
338c9252 | 312 | %attr(755,root,root) %ghost %{_libdir}/libcucul++.so.0 |
7f15b6b0 | 313 | |
314 | %files c++-devel | |
315 | %defattr(644,root,root,755) | |
316 | %attr(755,root,root) %{_libdir}/libcaca++.so | |
317 | %attr(755,root,root) %{_libdir}/libcucul++.so | |
318 | %{_libdir}/libcaca++.la | |
319 | %{_libdir}/libcucul++.la | |
320 | %{_includedir}/caca++.h | |
321 | %{_includedir}/cucul++.h | |
322 | ||
323 | %files c++-static | |
324 | %defattr(644,root,root,755) | |
325 | %{_libdir}/libcaca++.a | |
326 | %{_libdir}/libcucul++.a | |
338c9252 | 327 | |
5b30b2f5 | 328 | %if %{with dotnet} |
338c9252 JB |
329 | %files -n dotnet-caca-sharp |
330 | %defattr(644,root,root,755) | |
331 | %{_libdir}/caca-sharp | |
332 | %{_libdir}/cucul-sharp | |
5b30b2f5 | 333 | %endif |
338c9252 JB |
334 | |
335 | %files -n ruby-caca | |
336 | %defattr(644,root,root,755) | |
337 | %{ruby_sitelibdir}/caca.rb | |
338 | %attr(755,root,root) %{ruby_sitearchdir}/caca.so | |
339 | %attr(755,root,root) %{ruby_sitearchdir}/cucul.so |