Dave Plater
4e01faa90b
Reviewed ok OBS-URL: https://build.opensuse.org/request/show/59403 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libcaca?expand=0&rev=6
422 lines
11 KiB
RPMSpec
422 lines
11 KiB
RPMSpec
#
|
|
# spec file for package libcaca (Version 0.99.abeta17)
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
%define withjava 0
|
|
%define withpython 0
|
|
|
|
Name: libcaca
|
|
BuildRequires: doxygen freetype2-devel imlib2-devel ncurses-devel pkgconfig
|
|
BuildRequires: slang-devel xorg-x11 xorg-x11-devel fdupes
|
|
#texlive-latex
|
|
BuildRequires: freeglut-devel xorg-x11-libs ftgl-devel
|
|
BuildRequires: gcc-c++ mono-devel ruby-devel python-devel java-devel
|
|
%{py_requires}
|
|
Version: 0.99.beta17
|
|
Release: 0
|
|
License: WTFPL
|
|
Summary: Library for Colour ASCII Art, text mode graphics
|
|
Group: Development/Languages/C and C++
|
|
Url: http://sam.zoy.org/projects/libcaca/
|
|
Source0: http://caca.zoy.org/files/libcaca/%{name}-%{version}.tar.bz2
|
|
Patch1: libcaca-0.99-texbuild.patch
|
|
Patch2: libcaca-X11_test.patch
|
|
Patch4: libcaca-ruby_am_cflags.patch
|
|
Patch5: libcaca-ruby_vendor_install.patch
|
|
Patch7: libcaca-0.99.beta16-missing-GLU.patch
|
|
Patch9: caca-no-build-date.patch
|
|
# Patches from git for python bindings
|
|
#Patch10: libcaca-python-makefile.patch
|
|
#Patch11: libcaca-python-canvas.patch
|
|
#Patch12: libcaca-python-import.patch
|
|
#Patch13: libcaca-python-fixdirt.patch
|
|
#Patch14: libcaca-python-export.patch
|
|
#Patch15: libcaca-python-args.patch
|
|
#Patch16: libcaca-python-pointer.patch
|
|
#Patch17: libcaca-python-bad.patch
|
|
#Patch18: libcaca-python-events.patch
|
|
#Patch19: libcaca-python-configure.ac.patch
|
|
#Patch20: libcaca-python-Makefile.am.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%define rb_vendorarch %{_libdir}/ruby/vendor_ruby/%{rb_ver}/%{rb_arch}
|
|
%define rb_vendorlib %{_libdir}/ruby/vendor_ruby/%{rb_ver}
|
|
|
|
%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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%package -n libcaca0
|
|
License: WTFPL
|
|
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
|
|
%ifarch == x86_64
|
|
%define python_sitelib /usr/lib64/python2.6/site-packages
|
|
%else
|
|
%define python_sitelib /usr/lib/python2.6/site-packages
|
|
%endif
|
|
%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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%if "%(pkg-config --variable prefix x11 || echo /usr/X11R6)" == "/usr"
|
|
%define _xorg7libs %{_libdir}
|
|
%else
|
|
%define _xorg7libs /usr/X11R6/%{_lib}
|
|
%endif
|
|
|
|
%package devel
|
|
License: WTFPL
|
|
Summary: Library for Colour ASCII Art, text mode graphics
|
|
Group: Development/Languages/C and C++
|
|
#yes, nothing else is required to link other applications with "libcaca"
|
|
Requires: %{name} = %{version}
|
|
Requires: %{name}0-plugins = %{version}
|
|
%if 0%{?withjava} == 1
|
|
Requires: %{name}0-java = %{version}
|
|
%endif
|
|
|
|
%description devel
|
|
This package contains the header files and static libraries needed to
|
|
compile applications or shared objects that use libcaca.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%package csharp
|
|
License: WTFPL
|
|
Summary: C# support for libcaca
|
|
Group: Development/Languages/Mono
|
|
Requires: %{name} = %{version}
|
|
Requires: mono
|
|
|
|
%description csharp
|
|
This package contains all that is needed to use libcaca from C# code.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%if 0%{?withjava} == 1
|
|
%package -n libcaca0-java
|
|
License: WTFPL
|
|
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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
%endif
|
|
|
|
%if 0%{?withpython} == 1
|
|
%package python
|
|
License: WTFPL
|
|
Summary: Python support for libcaca
|
|
Group: Development/Languages/Python
|
|
Requires: %{name} = %{version} python-base = %{py_ver}
|
|
%if 0%{?suse_version} >= 1120
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description python
|
|
This package contains all that is needed to use libcaca from python.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
%endif
|
|
|
|
%package -n libcaca0-plugins
|
|
License: WTFPL
|
|
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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%package ruby
|
|
License: WTFPL
|
|
Summary: Ruby bindings for libcaca
|
|
Group: Development/Languages/Ruby
|
|
Requires: %{name} = %{version} ruby
|
|
|
|
%description ruby
|
|
All that is needed to use libcaca from ruby code.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%package -n caca-utils
|
|
License: WTFPL
|
|
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.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Sam Hocevar <sam@zoy.org>
|
|
Jean-Yves Lamoureux <jylam@lnxscene.org>
|
|
|
|
%prep
|
|
chmod 0644 %{S:0}
|
|
%setup -q -n libcaca-%{version}
|
|
%patch2
|
|
%patch4
|
|
%patch5
|
|
%patch7
|
|
%patch9
|
|
%patch1
|
|
cat <<EOF
|
|
++++++++++++++++++++++++++++++++++++'
|
|
|
|
Patches from git for python bindings
|
|
to be removed in next release.
|
|
|
|
++++++++++++++++++++++++++++++++++++'
|
|
EOF
|
|
#%%patch10 -p1
|
|
#mkdir -p python/caca
|
|
#touch python/caca/canvas.py
|
|
#touch python/caca/display.py
|
|
#%%patch11 -p1
|
|
#%%patch12 -p1
|
|
#%%patch13 -p1
|
|
#%%patch14 -p1
|
|
#%%patch15 -p1
|
|
#%%patch16 -p1
|
|
#%%patch17 -p1
|
|
#%%patch18 -p1
|
|
#%%patch19
|
|
#%%patch20
|
|
|
|
%build
|
|
find ./ -name Makefile.in -delete
|
|
rm configure
|
|
#export LIBTOOL=/usr/bin/libtool
|
|
export CFLAGS="$CFLAGS %{optflags} -I../caca/"
|
|
export CXXFLAGS="$CXXFLAGS %{optflags}"
|
|
./bootstrap
|
|
#autoreconf -fiv
|
|
%configure --with-pic \
|
|
--program-prefix="%{?_program_prefix}" \
|
|
--enable-slang \
|
|
--enable-ncurses \
|
|
--enable-x11 \
|
|
--x-libraries=%{_xorg7libs} \
|
|
--enable-imlib2 \
|
|
--enable-gl \
|
|
--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
|
|
%{__make} %{?jobs:-j%jobs}
|
|
|
|
%install
|
|
%makeinstall
|
|
%{__rm} -f %{buildroot}%{_libdir}/*.la
|
|
%{__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}/
|
|
%fdupes -s %{buildroot}%{_libdir}/mono
|
|
|
|
%post -n libcaca0 -p /sbin/ldconfig
|
|
|
|
%postun -n libcaca0 -p /sbin/ldconfig
|
|
|
|
%post -n libcaca0-plugins -p /sbin/ldconfig
|
|
|
|
%postun -n libcaca0-plugins -p /sbin/ldconfig
|
|
|
|
%if 0%{?withjava} == 1
|
|
%post -n libcaca0-java -p /sbin/ldconfig
|
|
|
|
%postun -n libcaca0-java -p /sbin/ldconfig
|
|
%endif
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files -n libcaca0
|
|
%defattr(-, root, root, 0755)
|
|
%doc AUTHORS ChangeLog COPYING NEWS NOTES README THANKS
|
|
%{_libdir}/*.so.*
|
|
|
|
%files devel
|
|
%defattr(-, root, root, 0755)
|
|
%dir %{_libdir}/caca
|
|
%{_libdir}/*.so
|
|
%{_libdir}/caca/libx11_plugin.so
|
|
%{_libdir}/caca/libgl_plugin.so
|
|
%{_bindir}/caca-config
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_includedir}/*
|
|
%{_mandir}/man1/caca-config.1*
|
|
%{_mandir}/man3/*
|
|
%{_datadir}/doc/libcucul-dev
|
|
%{_datadir}/doc/libcaca-dev
|
|
%if 0%{?withjava} == 1
|
|
%{_libdir}/jni/libcaca-java.so
|
|
%endif
|
|
|
|
%files csharp
|
|
%defattr(-, root, root, 0755)
|
|
%{_libdir}/mono
|
|
|
|
%files ruby
|
|
%defattr(-, root, root, 0755)
|
|
%{rb_vendorarch}/*
|
|
%{rb_vendorlib}/caca.rb
|
|
|
|
%if 0%{?withjava} == 1
|
|
%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
|
|
%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
|
|
|
|
|
|
%files -n caca-utils
|
|
%defattr(-, root, root, 0755)
|
|
%{_bindir}/cacademo
|
|
%{_bindir}/cacafire
|
|
%{_bindir}/cacaview
|
|
%{_bindir}/cacaplay
|
|
%{_bindir}/cacaserver
|
|
%{_bindir}/img2txt
|
|
%{_datadir}/libcaca
|
|
%{_mandir}/man1/cacademo.1*
|
|
%{_mandir}/man1/cacafire.1*
|
|
%{_mandir}/man1/cacaview.1*
|
|
%{_mandir}/man1/cacaplay.1*
|
|
%{_mandir}/man1/cacaserver.1*
|
|
%{_mandir}/man1/img2txt.1*
|
|
|
|
%changelog
|