%define plt_prefix @RPM_ROOT@/@RPM_PLATFORM@@RPM_PREFIX@
%define bee_prefix @RPM_ROOT@/bee

Summary: PicoGUI Applications
Name: @PACKAGE@
Version: @VERSION@
Release: sd.1
Copyright: GPL
Group: PicoGUI/Applications
Packager: Olivier Bornet <Olivier.Bornet@smartdata.ch>
Source: @PACKAGE@-@VERSION@.tar.gz
Vendor: SMARTDATA

Buildroot: %{_tmppath}/@PACKAGE@

%description
The PicoGUI Applications

%package @RPM_PLATFORM@
Summary: executable and headers
Group: PicoGUI/Applications
Requires: @PACKAGE@-mdl = @VERSION@

%package mdl
Summary: bee module
Group: PicoGUI/Applications
Requires: bee >= 1.0.4

%description @RPM_PLATFORM@
The PicoGUI Applications

%description mdl
The PicoGUI Applications

%prep
%setup -n @PACKAGE@-@VERSION@

%build
@RPM_CONFIGURE@
make

%install
make install prefix=$RPM_BUILD_ROOT%{plt_prefix}

install -D -m 0644 PicoGUIApps.mdl $RPM_BUILD_ROOT%{bee_prefix}/PicoGUIApps.mdl

%files @RPM_PLATFORM@
%{plt_prefix}/bin/*
%{plt_prefix}/lib/*
%{plt_prefix}/include/*
%{plt_prefix}/share/pgboard/*

%files mdl
%{bee_prefix}/*

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

