Blob Blame History Raw
%global commit 64084cd5fdc2a212bfed4ae914a8c4698a49cb39
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:		urdfdom
Version:	0.3.0
Release:	6%{?dist}
Summary:	U-Robot Description Format Document Object Model

Group:		Development/Libraries
License:	BSD
URL:		http://ros.org/wiki/urdf
Source0:	https://github.com/ros/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz

# Sonames, how do they work?
# https://github.com/ros/urdfdom/commit/892ab9b7d4bde5d84624c14fa7d82afe041948b9.patch
Patch0:         %{name}-0.3.0-soname.patch
# Install to correct libdir, not submitted upstream
Patch1:         %{name}-0.3.0-fedora.patch

BuildRequires:	boost-devel
BuildRequires:	cmake
BuildRequires:	urdfdom-headers-static
BuildRequires:	console-bridge-devel
BuildRequires:	tinyxml-devel

%description
The URDF (U-Robot Description Format) library
provides core data structures and a simple XML parser
for populating the class data structures from an URDF file

%package        devel
Summary:	Development files for %{name}
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:       urdfdom-headers-devel

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

%prep
%setup -qn %{name}-%{commit}
%patch0 -p1 -b .soname
%patch1 -p0 -b .fedora
# Disable automatic installation of python bindings
sed -i 's/add_subdirectory(urdf_parser_py)//' CMakeLists.txt

%build
%cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_LIBDIR=%{_lib }
make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_bindir}/urdf_mem_test

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc LICENSE
%{_bindir}/*
%{_libdir}/*.so.*
%{_datadir}/%{name}

%files devel
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/urdf_parser

%changelog
* Wed Jan 28 2015 Petr Machata <pmachata@redhat.com> - 0.3.0-6
- Rebuild for boost 1.57.0

* Sat Aug 23 2014 Rich Mattes <richmattes@gmail.com> - 0.3.0-5
- Rebuild for console-bridge

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 0.3.0-2
- rebuild for boost 1.55.0

* Wed Apr 16 2014 Rich Mattes <richmattes@gmail.com> - 0.3.0-1
- Update to release 0.3.0

* Sun Feb 09 2014 Rich Mattes <richmattes@gmail.com> - 0.2.9-2
- Rebuild for console-bridge 0.2.5

* Sat Oct 19 2013 Rich Mattes <richmattes@gmail.com> - 0.2.9-1
- Update to release 0.2.9
- Remove upstreamed patches

* Wed Aug 21 2013 Rich Mattes <richmattes@gmail.com> - 0.2.8-2
- Backport upstream SONAME patch
- Add ldconfig post and postun

* Mon Aug 19 2013 Rich Mattes <richmattes@gmail.com> - 0.2.8-1
- Update to release 0.2.8
- Change upstream to github

* Tue Mar 12 2013 Rich Mattes <richmattes@gmail.com> - 0.2.7-1
- Update to release 0.2.7

* Tue Oct 16 2012 Rich Mattes <richmattes@gmail.com> - 0.2.3-1
- Initial package