2007-01-16 00:21:31 +01:00
|
|
|
#
|
2011-04-12 23:29:32 +02:00
|
|
|
# spec file for package libcaca
|
2007-01-16 00:21:31 +01:00
|
|
|
#
|
2015-03-13 07:57:03 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:21:31 +01:00
|
|
|
#
|
2008-12-05 15:40:57 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-11-16 09:36:33 +01:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%define withjava 0
|
2012-05-14 12:15:56 +02:00
|
|
|
%define withpython 1
|
2013-03-20 09:50:35 +01:00
|
|
|
%bcond_without mono
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
Name: libcaca
|
2012-05-14 12:15:56 +02:00
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: imlib2-devel
|
2011-11-16 09:36:33 +01:00
|
|
|
BuildRequires: libtool
|
2012-05-14 12:15:56 +02:00
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: slang-devel
|
2014-10-03 19:08:23 +02:00
|
|
|
BuildRequires: zlib-devel
|
2011-01-29 21:32:53 +01:00
|
|
|
#texlive-latex
|
2012-05-14 12:15:56 +02:00
|
|
|
BuildRequires: freeglut-devel
|
|
|
|
BuildRequires: ftgl-devel
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: java-devel
|
2013-03-20 09:50:35 +01:00
|
|
|
%if %{with mono}
|
2012-05-14 12:15:56 +02:00
|
|
|
BuildRequires: mono-devel
|
2013-03-20 09:50:35 +01:00
|
|
|
%endif
|
2014-10-03 19:08:23 +02:00
|
|
|
BuildRequires: pkgconfig
|
2012-05-14 12:15:56 +02:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: ruby-devel
|
2014-10-03 19:08:23 +02:00
|
|
|
BuildRequires: pkgconfig(gl)
|
|
|
|
BuildRequires: pkgconfig(glu)
|
|
|
|
BuildRequires: pkgconfig(x11)
|
2015-02-17 10:46:46 +01:00
|
|
|
Version: 0.99.beta19
|
2012-05-14 12:15:56 +02:00
|
|
|
Release: 0
|
2007-01-16 00:21:31 +01:00
|
|
|
Summary: Library for Colour ASCII Art, text mode graphics
|
2014-02-22 18:13:36 +01:00
|
|
|
License: WTFPL
|
2007-01-16 00:21:31 +01:00
|
|
|
Group: Development/Languages/C and C++
|
2008-06-26 15:55:14 +02:00
|
|
|
Url: http://sam.zoy.org/projects/libcaca/
|
2011-11-16 09:36:33 +01:00
|
|
|
Source0: http://caca.zoy.org/files/libcaca/%{name}-%{version}.tar.gz
|
2014-10-03 19:27:10 +02:00
|
|
|
Source1: baselibs.conf
|
2011-01-29 21:32:53 +01:00
|
|
|
Patch1: libcaca-0.99-texbuild.patch
|
2008-06-26 15:55:14 +02:00
|
|
|
Patch2: libcaca-X11_test.patch
|
|
|
|
Patch4: libcaca-ruby_am_cflags.patch
|
|
|
|
Patch5: libcaca-ruby_vendor_install.patch
|
2009-03-17 20:13:24 +01:00
|
|
|
Patch7: libcaca-0.99.beta16-missing-GLU.patch
|
2010-09-03 14:19:56 +02:00
|
|
|
Patch9: caca-no-build-date.patch
|
2007-01-16 00:21:31 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-06-26 15:55:14 +02:00
|
|
|
%define rb_vendorarch %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}
|
|
|
|
%define rb_vendorlib %{_libdir}/ruby/vendor_ruby/%{rb_ver}
|
2007-01-16 00:21:31 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
libcaca is the Colour AsCii Art library. It provides high level
|
|
|
|
functions for colour text drawing, simple primitives for line, polygon
|
|
|
|
and ellipse drawing, as well as powerful image to text conversion
|
|
|
|
routines.
|
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%package -n libcaca0
|
|
|
|
Summary: Library for Colour ASCII Art, text mode graphics
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Provides: libcaca = %{version}
|
|
|
|
Obsoletes: libcaca < %{version}
|
|
|
|
%if 0%{?suse_version} <= 1110
|
2012-05-14 12:15:56 +02:00
|
|
|
%define python_sitelib %_libdir/python2.6/site-packages
|
2011-01-29 21:32:53 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n libcaca0
|
|
|
|
libcaca is the Colour AsCii Art library. It provides high level
|
|
|
|
functions for colour text drawing, simple primitives for line, polygon
|
|
|
|
and ellipse drawing, as well as powerful image to text conversion
|
|
|
|
routines.
|
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
%if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr"
|
|
|
|
%define _xorg7libs %{_libdir}
|
|
|
|
%else
|
|
|
|
%define _xorg7libs /usr/X11R6/%{_lib}
|
|
|
|
%endif
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%package devel
|
2007-01-16 00:21:31 +01:00
|
|
|
Summary: Library for Colour ASCII Art, text mode graphics
|
|
|
|
Group: Development/Languages/C and C++
|
2009-03-17 20:13:24 +01:00
|
|
|
#yes, nothing else is required to link other applications with "libcaca"
|
2008-06-26 15:55:14 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-01-29 21:32:53 +01:00
|
|
|
Requires: %{name}0-plugins = %{version}
|
|
|
|
%if 0%{?withjava} == 1
|
|
|
|
Requires: %{name}0-java = %{version}
|
|
|
|
%endif
|
2007-01-16 00:21:31 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the header files and static libraries needed to
|
|
|
|
compile applications or shared objects that use libcaca.
|
|
|
|
|
2013-03-20 09:50:35 +01:00
|
|
|
%if %{with mono}
|
2008-06-26 15:55:14 +02:00
|
|
|
%package csharp
|
|
|
|
Summary: C# support for libcaca
|
|
|
|
Group: Development/Languages/Mono
|
2011-01-29 21:32:53 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: mono
|
2008-06-26 15:55:14 +02:00
|
|
|
|
|
|
|
%description csharp
|
|
|
|
This package contains all that is needed to use libcaca from C# code.
|
2013-03-20 09:50:35 +01:00
|
|
|
%endif
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%if 0%{?withjava} == 1
|
2011-04-12 23:29:32 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%package -n libcaca0-java
|
|
|
|
Summary: Java support for libcaca
|
|
|
|
Group: Development/Languages/Java
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: java
|
|
|
|
|
|
|
|
%description -n libcaca0-java
|
|
|
|
This package contains all that is needed to use libcaca from java.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?withpython} == 1
|
2011-04-12 23:29:32 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%package python
|
|
|
|
Summary: Python support for libcaca
|
|
|
|
Group: Development/Languages/Python
|
2012-05-14 12:15:56 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: python-base = %{py_ver}
|
2011-01-29 21:32:53 +01:00
|
|
|
%if 0%{?suse_version} >= 1120
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description python
|
|
|
|
This package contains all that is needed to use libcaca from python.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%package -n libcaca0-plugins
|
|
|
|
Summary: Plugins for libcaca
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description -n libcaca0-plugins
|
|
|
|
This package contains gl and x11 plugins for caca.
|
|
|
|
|
2008-06-26 15:55:14 +02:00
|
|
|
%package ruby
|
|
|
|
Summary: Ruby bindings for libcaca
|
|
|
|
Group: Development/Languages/Ruby
|
2012-05-14 12:15:56 +02:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: ruby
|
2008-06-26 15:55:14 +02:00
|
|
|
|
|
|
|
%description ruby
|
|
|
|
All that is needed to use libcaca from ruby code.
|
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
%package -n caca-utils
|
|
|
|
Summary: Colour ASCII Art Text mode graphics utilities based on libcaca
|
|
|
|
Group: Amusements/Toys/Graphics
|
|
|
|
|
|
|
|
%description -n caca-utils
|
|
|
|
This package contains utilities and demonstration programs for libcaca,
|
|
|
|
the Colour AsCii Art library.
|
|
|
|
|
|
|
|
cacaview is a simple image viewer for the terminal. It opens most image
|
|
|
|
formats such as JPEG, PNG, GIF etc. and renders them on the terminal
|
|
|
|
using ASCII art. The user can zoom and scroll the image, set the
|
|
|
|
dithering method or enable anti-aliasing.
|
|
|
|
|
|
|
|
cacaball is a tiny graphic program that renders animated ASCII
|
|
|
|
metaballs on the screen, cacafire is a port of AALib's aafire and
|
|
|
|
displays burning ASCII art flames, and cacademo is a simple application
|
|
|
|
that shows the libcaca rendering features such as line and ellipses
|
|
|
|
drawing, triangle filling and sprite blitting.
|
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
%prep
|
2011-01-29 21:32:53 +01:00
|
|
|
chmod 0644 %{S:0}
|
|
|
|
%setup -q -n libcaca-%{version}
|
2007-01-16 00:21:31 +01:00
|
|
|
%patch2
|
2008-06-26 15:55:14 +02:00
|
|
|
%patch4
|
2011-01-29 21:32:53 +01:00
|
|
|
%patch5
|
2009-03-17 20:13:24 +01:00
|
|
|
%patch7
|
2010-09-03 14:19:56 +02:00
|
|
|
%patch9
|
2011-01-29 21:32:53 +01:00
|
|
|
%patch1
|
2013-05-30 07:34:18 +02:00
|
|
|
RUBY="ruby-`echo %{rb_ver} | sed 's|\.[^\.]*$||'`"
|
|
|
|
find . -type f -exec sed -i "s|ruby-1.9|$RUBY|" \{\} \;
|
2007-01-16 00:21:31 +01:00
|
|
|
|
|
|
|
%build
|
2012-05-29 12:53:57 +02:00
|
|
|
autoreconf -fi
|
2011-01-29 21:32:53 +01:00
|
|
|
export CFLAGS="$CFLAGS %{optflags} -I../caca/"
|
|
|
|
export CXXFLAGS="$CXXFLAGS %{optflags}"
|
2009-01-29 23:31:00 +01:00
|
|
|
%configure --with-pic \
|
2007-01-16 00:21:31 +01:00
|
|
|
--program-prefix="%{?_program_prefix}" \
|
|
|
|
--enable-slang \
|
|
|
|
--enable-ncurses \
|
|
|
|
--enable-x11 \
|
|
|
|
--x-libraries=%{_xorg7libs} \
|
2008-06-26 15:55:14 +02:00
|
|
|
--enable-imlib2 \
|
|
|
|
--enable-gl \
|
2011-01-29 21:32:53 +01:00
|
|
|
--enable-csharp \
|
|
|
|
--enable-doc \
|
|
|
|
--enable-shared=yes \
|
|
|
|
--enable-static=no \
|
|
|
|
--enable-conio=no \
|
|
|
|
--enable-plugins \
|
|
|
|
%if 0%{?withjava} == 1
|
|
|
|
--enable-java
|
|
|
|
%else
|
|
|
|
--enable-java=no
|
|
|
|
%endif
|
2012-05-29 12:53:57 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:21:31 +01:00
|
|
|
|
|
|
|
%install
|
2008-06-26 15:55:14 +02:00
|
|
|
%makeinstall
|
2009-01-29 23:31:00 +01:00
|
|
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
2011-01-29 21:32:53 +01:00
|
|
|
%{__rm} -f %{buildroot}%{_libdir}/caca/*.la
|
|
|
|
%if 0%{?withjava} == 1
|
|
|
|
%{__rm} -f %{buildroot}%{_libdir}/jni/libcaca-java.la
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}%{python_sitelib}/caca/
|
|
|
|
%fdupes -s %{buildroot}%{_mandir}/
|
2013-03-20 09:50:35 +01:00
|
|
|
%if %{with mono}
|
2011-01-29 21:32:53 +01:00
|
|
|
%fdupes -s %{buildroot}%{_libdir}/mono
|
2013-03-20 09:50:35 +01:00
|
|
|
%endif
|
2011-01-29 21:32:53 +01:00
|
|
|
|
|
|
|
%post -n libcaca0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libcaca0 -p /sbin/ldconfig
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%post -n libcaca0-plugins -p /sbin/ldconfig
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%postun -n libcaca0-plugins -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%if 0%{?withjava} == 1
|
2011-04-12 23:29:32 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%post -n libcaca0-java -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libcaca0-java -p /sbin/ldconfig
|
|
|
|
%endif
|
2007-01-16 00:21:31 +01:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%files -n libcaca0
|
2007-01-16 00:21:31 +01:00
|
|
|
%defattr(-, root, root, 0755)
|
2009-03-17 20:13:24 +01:00
|
|
|
%doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_libdir}/*.so.*
|
2007-01-16 00:21:31 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-, root, root, 0755)
|
2011-01-29 21:32:53 +01:00
|
|
|
%dir %{_libdir}/caca
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_libdir}/*.so
|
2011-01-29 21:32:53 +01:00
|
|
|
%{_libdir}/caca/libx11_plugin.so
|
|
|
|
%{_libdir}/caca/libgl_plugin.so
|
2007-01-16 00:21:31 +01:00
|
|
|
%{_bindir}/caca-config
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2007-01-16 00:21:31 +01:00
|
|
|
%{_includedir}/*
|
|
|
|
%{_mandir}/man1/caca-config.1*
|
2011-01-29 21:32:53 +01:00
|
|
|
%{_mandir}/man3/*
|
2009-03-17 20:13:24 +01:00
|
|
|
%{_datadir}/doc/libcaca-dev
|
2011-01-29 21:32:53 +01:00
|
|
|
%if 0%{?withjava} == 1
|
|
|
|
%{_libdir}/jni/libcaca-java.so
|
|
|
|
%endif
|
2008-06-26 15:55:14 +02:00
|
|
|
|
2013-03-20 09:50:35 +01:00
|
|
|
%if %{with mono}
|
2008-06-26 15:55:14 +02:00
|
|
|
%files csharp
|
|
|
|
%defattr(-, root, root, 0755)
|
2011-01-29 21:32:53 +01:00
|
|
|
%{_libdir}/mono
|
2013-03-20 09:50:35 +01:00
|
|
|
%endif
|
2008-06-26 15:55:14 +02:00
|
|
|
|
|
|
|
%files ruby
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%{rb_vendorarch}/*
|
|
|
|
%{rb_vendorlib}/caca.rb
|
2007-01-16 00:21:31 +01:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%if 0%{?withjava} == 1
|
2011-04-12 23:29:32 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%files -n libcaca0-java
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%{_libdir}/jni/libcaca-java.so.0
|
|
|
|
%{_libdir}/jni/libcaca-java.so.0.0.0
|
|
|
|
%{_datadir}/java/libjava.jar
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?withpython} == 1
|
2011-04-12 23:29:32 +02:00
|
|
|
|
2011-01-29 21:32:53 +01:00
|
|
|
%files python
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%dir %{python_sitelib}/caca
|
|
|
|
%{python_sitelib}/caca/__init__.py
|
|
|
|
%{python_sitelib}/caca/__init__.pyc
|
|
|
|
%{python_sitelib}/caca/__init__.pyo
|
|
|
|
%{python_sitelib}/caca/canvas.py
|
|
|
|
%{python_sitelib}/caca/canvas.pyc
|
|
|
|
%{python_sitelib}/caca/canvas.pyo
|
|
|
|
%{python_sitelib}/caca/common.py
|
|
|
|
%{python_sitelib}/caca/common.pyc
|
|
|
|
%{python_sitelib}/caca/common.pyo
|
|
|
|
%{python_sitelib}/caca/display.py
|
|
|
|
%{python_sitelib}/caca/display.pyc
|
|
|
|
%{python_sitelib}/caca/display.pyo
|
|
|
|
%{python_sitelib}/caca/dither.py
|
|
|
|
%{python_sitelib}/caca/dither.pyc
|
|
|
|
%{python_sitelib}/caca/dither.pyo
|
|
|
|
%{python_sitelib}/caca/font.py
|
|
|
|
%{python_sitelib}/caca/font.pyc
|
|
|
|
%{python_sitelib}/caca/font.pyo
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n libcaca0-plugins
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%dir %{_libdir}/caca
|
|
|
|
%{_libdir}/caca/libgl_plugin.so.0
|
|
|
|
%{_libdir}/caca/libgl_plugin.so.0.0.0
|
|
|
|
%{_libdir}/caca/libx11_plugin.so.0
|
|
|
|
%{_libdir}/caca/libx11_plugin.so.0.0.0
|
|
|
|
|
2007-01-16 00:21:31 +01:00
|
|
|
%files -n caca-utils
|
|
|
|
%defattr(-, root, root, 0755)
|
|
|
|
%{_bindir}/cacademo
|
|
|
|
%{_bindir}/cacafire
|
|
|
|
%{_bindir}/cacaview
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_bindir}/cacaplay
|
2012-05-14 12:15:56 +02:00
|
|
|
%{_bindir}/cacaclock
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_bindir}/cacaserver
|
|
|
|
%{_bindir}/img2txt
|
2007-01-16 00:21:31 +01:00
|
|
|
%{_datadir}/libcaca
|
|
|
|
%{_mandir}/man1/cacademo.1*
|
|
|
|
%{_mandir}/man1/cacafire.1*
|
|
|
|
%{_mandir}/man1/cacaview.1*
|
2008-06-26 15:55:14 +02:00
|
|
|
%{_mandir}/man1/cacaplay.1*
|
|
|
|
%{_mandir}/man1/cacaserver.1*
|
|
|
|
%{_mandir}/man1/img2txt.1*
|
2007-01-16 00:21:31 +01:00
|
|
|
|
2007-03-30 12:01:38 +02:00
|
|
|
%changelog
|