Skip to content

Commit

Permalink
rtshell_core) Adding back the entire metapkg that was accidentally re…
Browse files Browse the repository at this point in the history
…moved in r5099.
  • Loading branch information
[email protected] committed Aug 16, 2013
0 parents commit fb82a15
Show file tree
Hide file tree
Showing 32 changed files with 1,260 additions and 0 deletions.
41 changes: 41 additions & 0 deletions rtctree/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
if(NOT USE_ROSBUILD)
include(catkin.cmake)
return()
endif()
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

# Build rtctree
execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.rtctree installed
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "Build of failed")
endif(_make_failed)

#rosbuild_init()

#set the default path for built executables to the "bin" directory
#set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
2 changes: 2 additions & 0 deletions rtctree/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTRA_CMAKE_FLAGS = -DUSE_ROSBUILD:BOOL=1
include $(shell rospack find mk)/cmake.mk
21 changes: 21 additions & 0 deletions rtctree/Makefile.rtctree
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
INSTALL_DIR = ${CURDIR}
SOURCE_DIR = build/rtctree-3.0.0
TARBALL = build/rtctree-3.0.0.zip
TARBALL_URL = https://github.com/gbiggs/rtctree/archive/3.0.0.zip
MD5SUM_FILE = rtctree-3.0.0.zip.md5sum

UNPACK_CMD = unzip

include ${CURDIR}/download_unpack_build.mk

installed: $(SOURCE_DIR)/unpacked
(cd $(SOURCE_DIR) && python setup.py build && python setup.py install --prefix $(INSTALL_DIR) --record installed_files.txt)
touch installed

clean:
(cd $(SOURCE_DIR) && cat installed_files.txt | xargs rm -rvf )
rm -fr bin lib installed

wipe:
rm -fr build

139 changes: 139 additions & 0 deletions rtctree/catkin.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
cmake_minimum_required(VERSION 2.8.3)
project(rtctree)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED)

# Build rtctree
execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.rtctree installed
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "Build of failed")
endif(_make_failed)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
catkin_python_setup()

#######################################
## Declare ROS messages and services ##
#######################################

## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# std_msgs # Or other packages containing msgs
# )

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES openrtm_tools
# CATKIN_DEPENDS openrtm_aist openrtm_aist_python
# DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)

## Declare a cpp library
# add_library(openrtm_tools
# src/${PROJECT_NAME}/openrtm_tools.cpp
# )

## Declare a cpp executable
# add_executable(openrtm_tools_node src/openrtm_tools_node.cpp)

## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(openrtm_tools_node openrtm_tools_generate_messages_cpp)

## Specify libraries to link a library or executable target against
# target_link_libraries(openrtm_tools_node
# ${catkin_LIBRARIES}
# )

#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark executables and/or libraries for installation
# install(TARGETS openrtm_tools openrtm_tools_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )

#############
## Testing ##
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_openrtm_tools.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
89 changes: 89 additions & 0 deletions rtctree/download_checkmd5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/usr/bin/env python

# Software License Agreement (BSD License)
#
# Copyright (c) 2009, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.


NAME="download_checkmd5.py"

import urllib, hashlib, os, sys
from optparse import OptionParser

def main():
parser = OptionParser(usage="usage: %prog URI dest [md5sum]", prog=NAME)
options, args = parser.parse_args()
md5sum = None
if len(args) == 2:
uri, dest = args
elif len(args) == 3:
uri, dest, md5sum = args
else:
parser.error("wrong number of arguments")

# Create intermediate directories as necessary, #2970
d = os.path.dirname(dest)
if len(d) and not os.path.exists(d):
os.makedirs(d)

fresh = False
if not os.path.exists(dest):
sys.stdout.write('[rosbuild] Downloading %s to %s...'%(uri, dest))
sys.stdout.flush()
urllib.urlretrieve(uri, dest)
sys.stdout.write('Done\n')
fresh = True

if md5sum:
m = hashlib.md5(open(dest).read())
d = m.hexdigest()

print '[rosbuild] Checking md5sum on %s'%(dest)

if d != md5sum:
if not fresh:
print '[rosbuild] WARNING: md5sum mismatch (%s != %s); re-downloading file %s'%(d, md5sum, dest)
os.remove(dest)

# Try one more time
urllib.urlretrieve(uri, dest)
m = hashlib.md5(open(dest).read())
d = m.hexdigest()

if d != md5sum:
print '[rosbuild] ERROR: md5sum mismatch (%s != %s) on %s; aborting'%(d, md5sum, dest)
return 1

return 0


if __name__ == '__main__':
sys.exit(main())
58 changes: 58 additions & 0 deletions rtctree/download_unpack_build.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file can be used to automate downloading and unpacking of source
# distributions
#
# Before including this file, define the following make variables:
#
# TARBALL: name of source distribution to be downloaded
# TARBALL_URL: full URL (including the file itself) to download
# SOURCE_DIR: name of directory into which TARBALL will unpack
# UNPACK_CMD: command to use when unpacking (e.g., tar xzf)
# TARBALL_PATCH: patch files to apply to SOURCE_DIR
# INITIAL_DIR: set this if the tarball unpacks to a different dir than SOURCE_DIR,
# and you want the directory moved
#
# Optional variables:
# MD5SUM_FILE: name of md5sum file to check before unpacking
#
# Because this file declares targets, you almost certainly want to declare
# your own 'all' target before including this file. Otherwise, the first
# target declared here will become the default.

# This target is pretty much vestigial, and is only here to support the
# download target. The intended use it to depend on the unpacked file,
# below, which repeats the download and check logic.
$(TARBALL):
-mkdir -p build
ifneq ($(strip $(MD5SUM_FILE)),)
if [ ! -f $(MD5SUM_FILE) ]; then echo "Error: Couldn't find md5sum file $(MD5SUM_FILE)" && false; fi
./download_checkmd5.py $(TARBALL_URL) $(TARBALL) `awk {'print $$1'} $(MD5SUM_FILE)`
else
./download_checkmd5.py $(TARBALL_URL) $(TARBALL)
endif
touch -c $(TARBALL)

download: $(TARBALL)

$(SOURCE_DIR)/unpacked: $(TARBALL_PATCH)
-mkdir -p build
ifneq ($(strip $(MD5SUM_FILE)),)
if [ ! -f $(MD5SUM_FILE) ]; then echo "Error: Couldn't find md5sum file $(MD5SUM_FILE)" && false; fi
./download_checkmd5.py $(TARBALL_URL) $(TARBALL) `awk {'print $$1'} $(MD5SUM_FILE)`
else
./download_checkmd5.py $(TARBALL_URL) $(TARBALL)
endif
touch -c $(TARBALL)
rm -rf $(SOURCE_DIR) $(INITIAL_DIR)
ifneq ($(strip $(UNPACK_CMD)),)
cd build; $(UNPACK_CMD) ../$(TARBALL)
else
cd build; tar xzf ../$(TARBALL)
endif
ifneq ($(strip $(INITIAL_DIR)),)
mv $(INITIAL_DIR) $(SOURCE_DIR)
endif
ifneq ($(strip $(TARBALL_PATCH)),)
$(foreach patch,$(TARBALL_PATCH), patch -d $(SOURCE_DIR) -p0 < $(patch);)
endif
touch $(SOURCE_DIR)/unpacked

24 changes: 24 additions & 0 deletions rtctree/manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<package>
<description brief="rtctree">

The rtctree package

</description>

<author>Geoffrey Biggs, National Institute of Advanced Industrial Science and Technology</author>

<license>EPL</license>

<review status="unreviewed" notes=""/>

<url>https://github.com/gbiggs/rtctree</url>

<rosdep name="python-omniorb" />

<export>
<python path="${prefix}/lib/python2.7/site-packages" />
</export>

</package>


Loading

0 comments on commit fb82a15

Please sign in to comment.