Blob Blame History Raw
Name:           fawkes
Version:        0.4
Release:        4%{?dist}
Summary:        Robot Software Framework

Group:          Applications/System
License:        GPLv2+ and GPLv2+ with exceptions
URL:            http://www.fawkesrobotics.org
Source0:        http://files.fawkesrobotics.org/releases/%{name}-%{version}.tar.bz2
Patch0:         fawkes-0.4-userconf.patch
Patch1:         fawkes-0.4-man-pages.patch
Patch2:         fawkes-0.4-docs.patch
Patch3:         fawkes-0.4-desktop-files.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gcc-c++
BuildRequires:  kernel-headers >= 2.6.17, sqlite-devel, openssl-devel >= 0.9.8
BuildRequires:  libxml++-devel >= 2.20, libdaemon-devel >= 0.10, avahi-devel
BuildRequires:  lua-devel >= 5.1, tolua++-devel
BuildRequires:  libdc1394-devel >= 2.0, libjpeg-devel >= 6b, libpng-devel >= 1.2, opencv-devel, SDL-devel
BuildRequires:  libkni3-devel >= 3.9
BuildRequires:  libmicrohttpd-devel >= 0.4
BuildRequires:  flite-devel
BuildRequires:  glibmm24-devel, gtkmm24-devel, cairomm, gconfmm26-devel, libglademm24-devel >= 2.6
BuildRequires:  doxygen, asciidoc
BuildRequires:  desktop-file-utils
BuildRequires:  urg-devel >= 0.8
%if ! 0%{?rhel} || 0%{?rhel} >= 6
BuildRequires:  graphviz-devel >= 2.22
BuildRequires:  file-devel
%else
BuildRequires:  file
%endif
%if ! 0%{?rhel}
BuildRequires:  xmlrpc-c-devel
BuildRequires:  player-devel >= 3.0
BuildRequires:  gearbox-devel >= 9.11
%endif

Requires:       %{name}-core %{name}-firevision %{name}-firevision-tools %{name}-lua
Requires:       %{name}-plugin-bbsync %{name}-plugin-bblogger
Requires:       %{name}-plugin-ttmainloop %{name}-plugin-webview
Requires:       %{name}-plugin-worldmodel %{name}-plugin-skiller %{name}-plugin-luaagent
Requires:       %{name}-plugin-flite
%if ! 0%{?rhel}
Requires:       %{name}-plugin-player
%endif

%description
Fawkes is a component-based software framework for robotic real-time
applications for various platforms and domains.

It was developed for cognitive robotics real-time applications like soccer
and service robotics and supports fast information exchange and efficient
combination and coordination of different components to suit the needs of
mobile robots operating in uncertain environments.

Install this meta package to get a useful Fawkes base system.

%package        core
Summary:        Fawkes base system
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    core
This package contains the Fawkes base libraries, interfaces and programs.
This package allows to run a basic Fawkes instance, but does not provide
much functionality. Install the requires plugins. The fawkes meta package
allows for installing a useful base set.

%package        devel
Summary:        Development files for Fawkes
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        devenv
Summary:        Development environment Fawkes
Group:          Development/Libraries
BuildArch:      noarch
Requires:       gcc-c++
Requires:       kernel-headers >= 2.6.17, sqlite-devel, openssl-devel >= 0.9.8
Requires:       libxml++-devel >= 2.20, libdaemon-devel >= 0.10, avahi-devel
Requires:       lua-devel >= 5.1, tolua++-devel
Requires:       libdc1394-devel >= 2.0, libjpeg-devel >= 6b, libpng-devel >= 1.2, opencv-devel, SDL-devel
Requires:       libkni3-devel >= 3.9
Requires:       libmicrohttpd-devel >= 0.4
Requires:       glibmm24-devel, gtkmm24-devel, cairomm, gconfmm26-devel, libglademm24-devel >= 2.6
Requires:       doxygen, asciidoc
Requires:       urg-devel >= 0.8
Requires:       readline-devel >= 5.1
# only on fedora and el6+
%if ! 0%{?rhel} || 0%{?rhel} >= 6
Requires:       file-devel
Requires:       graphviz-devel >= 2.22
Requires:       gearbox-devel >= 9.11
%else
# el5
Requires:       file
%endif
# not on el*
%if ! 0%{?rhel}
Requires:       xmlrpc-c-devel
Requires:       player-devel >= 3.0
%endif

%description    devenv
The %{name}-devenv packages causes the installation of all dependencies
to develop Fawkes in-tree (e.g. cloned from git repository).

%package        doc
Summary:        Fawkes API documentation
Group:          Documentation
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description    doc
This package contains the full API documentation for Fawkes.

%package        plugin-bbsync
Summary:        Fawkes plugin to synchronize multiple instances
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%package        firevision
Summary:        Computer vision sub-system
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    firevision
This package contains the Fawkes vision system named FireVision. It contains
the libraries and tools used to build image processing pipelines.

%package        firevision-tools
Summary:        Computer vision sub-system tools
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    firevision-tools
This package contains the console tools for FireVision.

%description    plugin-bbsync
This package contains a Fawkes plugin to synchronize multiple Fawkes
instances, for example running on multiple robots.

%package        plugin-bblogger
Summary:        Fawkes plugin to log data from blackboard
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-bblogger
This package contains a Fawkes plugin to log data written to the blackboard.

%package        plugin-ttmainloop
Summary:        Time tracking main loop
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-ttmainloop
This package contains a Fawkes plugin which replaces the default main loop
which one that operates similarly but outputs timing information at regular
intervals.

%package        plugin-katana
Summary:        Fawkes plugin to control the Katana robot arm
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-katana
This package contains a Fawkes plugin to access and control the Katana
robot arm.

%package        plugin-pantilt
Summary:        Fawkes plugin to control pan-tilt units
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-pantilt
This package contains a Fawkes plugin to access and control various
pan-tilt units, for example the DirectedPerception PTU, the Sony Evi-D
(and others based on the Visca protocol) and custom-made with Robotis
RX-28 servos.

%package        plugin-skiller
Summary:        Fawkes behavior engine plugin
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-lua = %{version}-%{release}
BuildRequires:  readline-devel >= 5.1

%description    plugin-skiller
This package contains a Fawkes plugin implementing a Lua-based behavior
engine for writing control programs for robots.

%package        plugin-luaagent
Summary:        Agent framework written in Lua
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-lua = %{version}-%{release}

%description    plugin-luaagent
This package contains a Fawkes plugin which provides an agent framework
to write agents in Lua.

%package        plugin-worldmodel
Summary:        World model to concentrate information
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-worldmodel
This package contains a Fawkes plugin which concentrates and fuses
information available on the blackboard to provide a consistent
model of the world.

%package        plugin-flite
Summary:        Fawkes Flite speech synthesis plugin
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-flite
This package contains a Fawkes plugin that integrates the flite speech
synthesis engine.

%package        plugin-joystick
Summary:        Fawkes plugin to access joysticks
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-joystick
This package contains a Fawkes plugin to access joysticks, e.g. for
remotely controlling robots.

%package        plugin-laser
Summary:        Fawkes plugin to access laser range finders
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-laser
This package contains a Fawkes plugin to access laser range finders
like the Hokuyo URG.

%package        plugin-laserht
Summary:        Line detection in laser data using Hough Transform
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}
Requires:       fawkes-plugin-laser

%description    plugin-laserht
This package contains a Fawkes plugin that detects lines in 2D laser data
using the Hough Transform.

%package        plugin-webview
Summary:        Fawkes plugin to provide a web interface
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-webview
This package contains a Fawkes plugin which provides a web interface to
view log messages, manage plugins and inspect blackboard data.

%if ! 0%{?rhel}
%package        plugin-player
Summary:        Integration of Player framework
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-player
This package contains a Fawkes plugin which integrates Fawkes with the
Player robot software framework.
%endif

%package        plugin-refboxcomm
Summary:        RoboCup referee box integration
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-refboxcomm
This package contains a Fawkes plugin which listens to messages from the
RoboCup Middle-Size League (MSL) referee box (refbox) or the Standard
Platform League (SPL) GameController.

%if ! 0%{?rhel}
%package        plugin-xmlrpc
Summary:        XML-RPC communication plugin
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    plugin-xmlrpc
This package contains a Fawkes plugin which enables communication with
Fawkes via XML-RPC. This is for demonstration purposes and has only limited
functionality.
%endif

%package        guis
Summary:        GUI applications to control Fawkes
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-firevision

%description    guis
This package contains a GUI application which are used to remotely control
Fawkes.


%package        lua
Summary:        Lua libraries and scripts for Fawkes
Group:          Applications/System
Requires:       %{name} = %{version}-%{release}

%description    lua
This package contains libraries to enable Lua usage from Fawkes as well as
common Lua modules.

%prep
%setup -q
%patch0 -p1 -b .userconf
%patch1 -p1 -b .man-pages
%patch2 -p1 -b .docs
%patch3 -p1 -b .desktop-files


%build
make uncolored-switch-buildtype-sysinstall
make uncolored-all uncolored-gui %{?_smp_mflags} CFLAGS_EXT="%{optflags}" PREFIX=%{_prefix}
# Ignore documentation errors until fresh doxygen release hits build machines.
# Doxygen 1.7.1 is totally buggy and reports hundreds of false positives.
make uncolored-apidoc || true

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}

# Use xargs instead of exec to abort the build on desktop-file-validate fail
find %{buildroot}%{_datadir}/applications -name '*.desktop' | xargs -L 1 desktop-file-validate

# For building packages prior to release
#mv {buildroot}/{_datadir}/doc/{name}-{version} {buildroot}/{_datadir}/doc/{name}-{version}

# We do not want that perl script installed
rm -f %{buildroot}/%{_datadir}/doc/%{name}-%{version}/installdox

ls src/interfaces/*.xml | sed -e "s|^src/interfaces/\([^.]\+\)\.xml|%{_libdir}/%{name}/interfaces/lib\1.so*|" > builtin-interfaces.files
ls src/interfaces/*.xml | sed -e "s|^src/interfaces/\([^.]\+\)\.xml|%{_libdir}/%{name}/lua/interfaces/\1.so|" > builtin-interfaces-lua.files

# Required to avoid .objs_* and .deps_* dirs in debuginfo package
make clean

%clean
rm -rf %{buildroot}


%post core -p /sbin/ldconfig
%postun core -p /sbin/ldconfig
%post lua -p /sbin/ldconfig
%postun lua -p /sbin/ldconfig
%post firevision -p /sbin/ldconfig
%postun firevision -p /sbin/ldconfig
%post guis -p /sbin/ldconfig
%postun guis -p /sbin/ldconfig

%files
%defattr(-,root,root,-)

%files core -f builtin-interfaces.files
%defattr(-,root,root,-)
%doc doc/README doc/LICENSE.*
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/default.sql
%{_bindir}/fawkes
%{_bindir}/ffconfig
%{_bindir}/ffinfo
%{_bindir}/fflogview
%{_bindir}/ffplugin
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
%dir %{_libdir}/%{name}/interfaces
#{_libdir}/{name}/interfaces/*.so*
%{_libdir}/libfawkesaspects.so.*
%{_libdir}/libfawkesblackboard.so.*
%{_libdir}/libfawkesconfig.so.*
%{_libdir}/libfawkescore.so.*
%{_libdir}/libfawkesgeometry.so.*
%{_libdir}/libfawkesinterface.so.*
%{_libdir}/libfawkesnetcomm.so.*
%{_libdir}/libfawkesplugin.so.*
%{_libdir}/libfawkesutils.so.*
%{_libdir}/libfawkeswebview.so.*
%{_libdir}/libfawkesworldinfo_utils.so.*
%{_mandir}/man8/fawkes.8*
%{_mandir}/man1/ffinfo.1*
%{_mandir}/man1/ffconfig.1*
%{_mandir}/man1/ffplugin.1*
%{_mandir}/man1/fflogview.1*

%files firevision
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/firevision
%{_libdir}/libfvcams.so.*
%{_libdir}/libfvclassifiers.so.*
%{_libdir}/libfvfilters.so.*
%{_libdir}/libfvmodels.so.*
%{_libdir}/libfvstereo.so.*
%{_libdir}/libfvutils.so.*
%{_libdir}/%{name}/plugins/fvbase.so
%{_libdir}/%{name}/plugins/fvfountain.so
%{_libdir}/%{name}/plugins/fvretriever.so

%files firevision-tools
%defattr(-,root,root,-)
%{_bindir}/fvbb2gettric
%{_bindir}/fvbb2info
%{_bindir}/fvbb2rectlut
%{_bindir}/fvcmpp
%{_bindir}/fvconverter
%{_bindir}/fvlistfwcams
#{_bindir}/fvlistsrcams
%{_bindir}/fvnet
%{_bindir}/fvshmem
%{_bindir}/fvstereodecoder

%files guis
%defattr(-,root,root,-)
%{_bindir}/ffbatterymon
%{_bindir}/ffconfiggui
%{_bindir}/ffnetloggui
%{_bindir}/ffplugingui
%{_bindir}/lasergui
%if ! 0%{?rhel} || 0%{?rhel} >= 6
%{_bindir}/skillgui
%{_bindir}/skillgui_batch_render
%endif
%{_bindir}/ffwiviewer
%{_bindir}/firestation
%{_bindir}/fvviewer
%{_bindir}/fvshowyuv
%{_bindir}/fvfuseviewer
%{_libdir}/libfvwidgets.so.*
%{_libdir}/libfawkesguiutils.so.*
%{_libdir}/libfawkesgeometrygtk.so.*
%{_datadir}/%{name}/guis
%{_datadir}/applications/*

%files lua -f builtin-interfaces-lua.files
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}/lua
%dir %{_libdir}/%{name}/lua/interfaces
%dir %{_datadir}/%{name}/lua
%{_libdir}/%{name}/lua/*.so
%{_libdir}/libfawkeslua.so.*
%{_datadir}/%{name}/lua/fawkes
%{_datadir}/%{name}/lua/predicates

%files plugin-katana
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/katana.so
%{_libdir}/%{name}/interfaces/libKatanaInterface.so*
%dir %{_libdir}/%{name}/lua/interfaces
%{_libdir}/%{name}/lua/interfaces/KatanaInterface.so

%files plugin-pantilt
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/pantilt.so
%{_libdir}/%{name}/interfaces/libPanTiltInterface.so*
%dir %{_libdir}/%{name}/lua/interfaces
%{_libdir}/%{name}/lua/interfaces/PanTiltInterface.so

%files plugin-skiller
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/skiller.so
%{_bindir}/skillet
%{_datadir}/%{name}/lua/skiller
%{_datadir}/%{name}/lua/skills
%{_libdir}/%{name}/interfaces/libSkillerDebugInterface.so*
%dir %{_libdir}/%{name}/lua/interfaces
%{_libdir}/%{name}/lua/interfaces/SkillerDebugInterface.so

%files plugin-luaagent
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/luaagent.so
%{_datadir}/%{name}/lua/luaagent

%files plugin-bbsync
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/bbsync.so

%files plugin-ttmainloop
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/ttmainloop.so

%files plugin-worldmodel
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/worldmodel.so

%files plugin-bblogger
%defattr(-,root,root,-)
%{_bindir}/ffbblog
%{_libdir}/%{name}/plugins/bblogger.so
%{_libdir}/%{name}/plugins/bblogreplay.so

%files plugin-flite
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/flite.so

%files plugin-joystick
%defattr(-,root,root,-)
%{_bindir}/ffjoystick
%{_libdir}/%{name}/plugins/joystick.so

%files plugin-laser
%defattr(-,root,root,-)
%{_bindir}/fflaser_deadspots
%{_libdir}/%{name}/plugins/laser.so

%files plugin-laserht
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/laserht.so

%files plugin-webview
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/webview.so
%{_datadir}/%{name}/webview

%if ! 0%{?rhel}
%files plugin-player
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/player.so
%endif

%files plugin-refboxcomm
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/refboxcomm.so
%{_bindir}/ffrefboxrep

%if ! 0%{?rhel}
%files plugin-xmlrpc
%defattr(-,root,root,-)
%{_libdir}/%{name}/plugins/xmlrpc.so
%endif

%files devel
%defattr(-,root,root,-)
%doc doc/DEPENDENCIES
%{_bindir}/ffifacegen
%{_includedir}/*
%{_libdir}/*.so
%{_datadir}/%{name}/buildsys
%{_mandir}/man1/ffifacegen.1*

%files devenv
%defattr(-,root,root,-)

%files doc
%defattr(-,root,root,-)
%{_datadir}/doc/%{name}-%{version}

%changelog
* Fri Nov 05 2010 Tim Niemueller <tim@niemueller.de> - 0.4-4
- EL 5/6 compatibility, omit stuff with unfulfilled dependencies

* Thu Nov 04 2010 Tim Niemueller <tim@niemueller.de> - 0.4-3
- consistent macro usage
- Make fawkes-core own /usr/share/fawkes
- Run desktop-file-validate on .desktop files
- Update man-page patch to latest version
- Add patch for timn/desktop-files branch fixing desktop files
- Use uncolored targets for better Koji readability
- Build all and gui targets in one to have only one tree traversal

* Fri Oct 30 2010 Tim Niemueller <tim@niemueller.de> - 0.4-2
- Added patch to support configs in user homedirs

* Sun Feb 07 2010 Tim Niemueller <tim@niemueller.de> - 0.4-1
- Initial package