LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File spacebots-util.spec of Package spacebots-util (Project home:inescid:robots)

Name: spacebots-util
Version: 0.0.201302181602
Release: 1

Summary: Basic utilities for the spacebots package family
License: GPL-3.0
Group: Development/Libraries/C and C++
Url: http://robots.l2f.inesc-id.pt/

Source: %{name}-%{version}.tar.bz2
Prefix: %_prefix
BuildRoot: %{_tmppath}/%{name}-%{version}-build

%description
Basic utilities for the spacebots package family: this currently
includes message coding and buffer conversion to- and from OpenCV
matrices.

%package -n libspacebots_util0
License:        GPL-3.0
Group:          Development/Libraries/C and C++
Summary:        Runtime support for spacebots-util
BuildRequires:  freeimage-devel opencv-devel
BuildRequires:  gcc-c++ >= 4.7

%description -n libspacebots_util0
Basic utilities for the spacebots package family: this currently
includes message coding and buffer conversion to- and from OpenCV 
matrices.

%package devel
License:        GPL-3.0
Group:          Development/Libraries/C and C++
Summary:        Development files for spacebots-util
BuildRequires:  freeimage-devel opencv-devel
BuildRequires:  gcc-c++ >= 4.7
Requires:	gcc-c++ >= 4.7 freeimage-devel opencv-devel libspacebots_util0

%description devel
Basic utilities for the spacebots package family: this currently
includes message coding and buffer conversion to- and from OpenCV 
matrices.


%prep
%setup -n %{name}-%{version}

%build
make

%install
mkdir -p $RPM_BUILD_ROOT%{_libdir}
cp libspacebots_util.a  $RPM_BUILD_ROOT%{_libdir}/libspacebots_util.a
cp libspacebots_util.so $RPM_BUILD_ROOT%{_libdir}/libspacebots_util.so.0.0
(cd $RPM_BUILD_ROOT%{_libdir}; ln -s libspacebots_util.so.0.0 libspacebots_util.so.0)
(cd $RPM_BUILD_ROOT%{_libdir}; ln -s libspacebots_util.so.0.0 libspacebots_util.so)
mkdir -p $RPM_BUILD_ROOT%{_includedir}/spacebots/util
cp buf2mat.h $RPM_BUILD_ROOT%{_includedir}/spacebots/util
cp spacebots_base64.h $RPM_BUILD_ROOT%{_includedir}/spacebots/util

# files
cd $RPM_BUILD_ROOT
find .%{_includedir}/spacebots -print | sed 's,^\.,\%attr(-\,root\,root) ,'  > $RPM_BUILD_DIR/files-devel.list
echo .%{_libdir}/libspacebots_util.a   | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/files-devel.list
echo .%{_libdir}/libspacebots_util.so  | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/files-devel.list
echo .%{_libdir}/libspacebots_util.so.0.0 | sed 's,^\.,\%attr(-\,root\,root) ,'  > $RPM_BUILD_DIR/files.list
echo .%{_libdir}/libspacebots_util.so.0   | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/files.list

%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
rm $RPM_BUILD_DIR/files.list
rm $RPM_BUILD_DIR/files-devel.list

%post   -n libspacebots_util0 -p /sbin/ldconfig

%postun -n libspacebots_util0 -p /sbin/ldconfig

%files -n libspacebots_util0 -f ../files.list
%defattr(-,root,root)

%files devel -f ../files-devel.list
%defattr(-,root,root)

%changelog
* Mon Feb 18 2013 David Martins de Matos <david@inesc-id.pt> - 0.0.201302181602
- opensuse 12.2 with gcc 4.7.2