diff --git a/.gitignore b/.gitignore index e69de29..0b364f0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/urdfdom-headers-0.2.2.tar.bz2 diff --git a/generate-tarball-urdfdom-headers.sh b/generate-tarball-urdfdom-headers.sh new file mode 100644 index 0000000..201bdbf --- /dev/null +++ b/generate-tarball-urdfdom-headers.sh @@ -0,0 +1,3 @@ +hg clone https://bitbucket.org/osrf/urdfdom_headers +cd urdfdom_headers +hg archive --rev 0.2.2 ../urdfdom-headers-0.2.2.tar.bz2 diff --git a/sources b/sources index e69de29..443d164 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +eb8c00f5d2edc89a3e8f31577e781f73 urdfdom-headers-0.2.2.tar.bz2 diff --git a/urdf-0.2.0-fedora.patch b/urdf-0.2.0-fedora.patch new file mode 100644 index 0000000..69f4dac --- /dev/null +++ b/urdf-0.2.0-fedora.patch @@ -0,0 +1,65 @@ +diff -up ./CMakeLists.txt.fedora ./CMakeLists.txt +--- ./CMakeLists.txt.fedora 2012-09-26 00:19:53.398940797 -0400 ++++ ./CMakeLists.txt 2012-09-26 00:21:15.531071470 -0400 +@@ -6,6 +6,7 @@ set (URDF_MINOR_VERSION 2) + set (URDF_PATCH_VERSION 0) + + set (URDF_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}.${URDF_PATCH_VERSION}) ++set (URDF_INCLUDE_DIR "include/urdf" CACHE PATH "Installation directory for URDF headers") + + message (STATUS "${PROJECT_NAME} version ${URDF_VERSION}") + +@@ -30,7 +31,7 @@ if (NOT MSVC) + set(PACKAGE_DESC "Unified Robot Description Format") + set(pkg_conf_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig/urdfdom_headers.pc") + configure_file("${pkg_conf_file}.in" "${pkg_conf_file}" @ONLY) +- install(FILES ${pkg_conf_file} DESTINATION lib/pkgconfig/ COMPONENT pkgconfig) ++ install(FILES ${pkg_conf_file} DESTINATION share/pkgconfig/ COMPONENT pkgconfig) + endif() + + message(STATUS "Configuration successful. Type make install to install urdfdom_headers.") +diff -up ./cmake/pkgconfig/urdfdom_headers.pc.in.fedora ./cmake/pkgconfig/urdfdom_headers.pc.in +--- ./cmake/pkgconfig/urdfdom_headers.pc.in.fedora 2012-09-26 00:24:42.905977395 -0400 ++++ ./cmake/pkgconfig/urdfdom_headers.pc.in 2012-09-26 00:25:01.338680207 -0400 +@@ -1,7 +1,7 @@ + # This file was generated by CMake for @PROJECT_NAME@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} +-includedir=${prefix}/include ++includedir=${prefix}/@URDF_INCLUDE_DIR@ + + Name: @PACKAGE_NAME@ + Description: @PACKAGE_DESC@ +diff -up ./cmake/urdfdom_headers-config.cmake.in.fedora ./cmake/urdfdom_headers-config.cmake.in +--- ./cmake/urdfdom_headers-config.cmake.in.fedora 2012-09-26 00:23:27.451100554 -0400 ++++ ./cmake/urdfdom_headers-config.cmake.in 2012-09-26 00:24:18.500046875 -0400 +@@ -3,4 +3,4 @@ if (@PACKAGE_NAME@_CONFIG_INCLUDED) + endif() + set(@PACKAGE_NAME@_CONFIG_INCLUDED TRUE) + +-set(@PACKAGE_NAME@_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include) ++set(@PACKAGE_NAME@_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/@URDF_INCLUDE_DIR@) +diff -up ./urdf_exception/CMakeLists.txt.fedora ./urdf_exception/CMakeLists.txt +--- ./urdf_exception/CMakeLists.txt.fedora 2012-09-26 00:21:25.896466605 -0400 ++++ ./urdf_exception/CMakeLists.txt 2012-09-26 00:22:02.333855630 -0400 +@@ -1 +1 @@ +-INSTALL(DIRECTORY include/urdf_exception DESTINATION include) ++INSTALL(DIRECTORY include/urdf_exception DESTINATION ${URDF_INCLUDE_DIR}) +diff -up ./urdf_model/CMakeLists.txt.fedora ./urdf_model/CMakeLists.txt +--- ./urdf_model/CMakeLists.txt.fedora 2012-09-26 00:22:15.254348160 -0400 ++++ ./urdf_model/CMakeLists.txt 2012-09-26 00:22:26.303769387 -0400 +@@ -1 +1 @@ +-INSTALL(DIRECTORY include/urdf_model DESTINATION include) ++INSTALL(DIRECTORY include/urdf_model DESTINATION ${URDF_INCLUDE_DIR}) +diff -up ./urdf_model_state/CMakeLists.txt.fedora ./urdf_model_state/CMakeLists.txt +--- ./urdf_model_state/CMakeLists.txt.fedora 2012-09-26 00:22:34.669088296 -0400 ++++ ./urdf_model_state/CMakeLists.txt 2012-09-26 00:22:44.447461056 -0400 +@@ -1 +1 @@ +-INSTALL(DIRECTORY include/urdf_model_state DESTINATION include) ++INSTALL(DIRECTORY include/urdf_model_state DESTINATION ${URDF_INCLUDE_DIR}) +diff -up ./urdf_sensor/CMakeLists.txt.fedora ./urdf_sensor/CMakeLists.txt +--- ./urdf_sensor/CMakeLists.txt.fedora 2012-09-26 00:22:55.698890022 -0400 ++++ ./urdf_sensor/CMakeLists.txt 2012-09-26 00:23:07.539341425 -0400 +@@ -1 +1 @@ +-INSTALL(DIRECTORY include/urdf_sensor DESTINATION include) ++INSTALL(DIRECTORY include/urdf_sensor DESTINATION ${URDF_INCLUDE_DIR}) diff --git a/urdfdom-headers.spec b/urdfdom-headers.spec new file mode 100644 index 0000000..c86f6b5 --- /dev/null +++ b/urdfdom-headers.spec @@ -0,0 +1,73 @@ +%global realname urdfdom_headers + +Name: urdfdom-headers +Version: 0.2.2 +Release: 2%{?dist} +Summary: The URDF (U-Robot Description Format) headers + +Group: Development/Libraries +License: BSD +URL: http://ros.org/wiki/urdf +# Use the script generate-tarball-urdfdom-headers to check out source and +# create export the correct branch +Source0: %{name}-%{version}.tar.bz2 +Source1: generate-tarball-%{name}.sh +# This patch moves the pkgconfig file to /usr/share and moves the headers +# to the "urdf" subdirectory of /usr/include +# Not submitted upstream. +Patch0: urdf-0.2.0-fedora.patch +BuildArch: noarch +BuildRequires: cmake + +%description +%{summary} + +%package devel +Summary: The URDF (U-Robot Description Format) headers +Requires: pkgconfig +BuildArch: noarch +Provides: %{name}-static = %{version}-%{release} + +%description devel +The URDF (U-Robot Description Format) headers provides core data structure +headers for URDF. + +For now, the details of the URDF specifications reside on +http://ros.org/wiki/urdf + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p0 -b .fedora + +%build +mkdir build; pushd build +%cmake .. +popd +make -C build %{?_smp_mflags} + + +%install +make -C build install DESTDIR=%{buildroot} + +# LICENSE file is not correct, don't include it +%files devel +%doc README.txt +%{_includedir}/urdf +%{_includedir}/urdf_world +%{_datadir}/pkgconfig/*.pc +%{_datadir}/%{realname} + +%changelog +* Tue Apr 09 2013 Rich Mattes - 0.2.2-2 +- Added -static virtual provides to -devel subpackage +- Moved package description to -devel subpackage + +* Tue Mar 12 2013 Rich Mattes - 0.2.2-1 +- Update to release 0.2.2 +- Don't install incorrect LICENSE file + +* Tue Oct 16 2012 Rich Mattes - 0.2.1-1 +- Update to release 0.2.1 + +* Wed Sep 26 2012 Rich Mattes - 0.2.0-1 +- Initial package