Skip to content

Commit

Permalink
download sourcode under build and install directory to <devel>/lib an…
Browse files Browse the repository at this point in the history
…d <src>/share
  • Loading branch information
k-okada committed Feb 19, 2014
1 parent ce7007d commit 8971903
Show file tree
Hide file tree
Showing 14 changed files with 134 additions and 309 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ before_script: # Use this to prepare your build for testing e.g. copy database c
script: # All commands must exit with code 0 on success. Anything else is considered failure.
- find . \! -path "*/.*" -type f | xargs egrep -i "(hoge|fuga)" ; if [ $? == 0 ]; then exit 1; fi
- catkin_make
# - catkin_make test
- catkin_make test
- catkin_make install
- source install/setup.bash
- catkin_make test



4 changes: 3 additions & 1 deletion rtctree/Makefile.rtctree
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
INSTALL_DIR = ${CURDIR}
INSTALL_SCRIPTS_DIR = ${CURDIR}
INSTALL_DATA_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
Expand All @@ -10,7 +12,7 @@ UNPACK_CMD = unzip
include ${MK_DIR}/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)
(cd $(SOURCE_DIR) && python setup.py build && python setup.py install --prefix $(INSTALL_DIR) --install-scripts $(INSTALL_SCRIPTS_DIR) --install-data $(INSTALL_DATA_DIR) --install-layout=deb --record installed_files.txt)
touch installed

clean:
Expand Down
110 changes: 21 additions & 89 deletions rtctree/catkin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,28 @@ project(rtctree)
find_package(catkin REQUIRED mk)

# Build rtctree
execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.rtctree MK_DIR=${mk_PREFIX}/share/mk 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)

# <devel>/lib/<package>/bin
# <devel>/lib/python2.7/dist-packages
# <src>/<package>/share
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed)
execute_process(
COMMAND cmake -E chdir ${CMAKE_CURRENT_BINARY_DIR}
make -f ${PROJECT_SOURCE_DIR}/Makefile.rtctree installed
INSTALL_DIR=${CATKIN_DEVEL_PREFIX}
INSTALL_SCRIPTS_DIR=${CATKIN_DEVEL_PREFIX}/lib/${PROJECT_NAME}
INSTALL_DATA_DIR=${PROJECT_SOURCE_DIR}
MK_DIR=${mk_PREFIX}/share/mk
MD5SUM_FILE=${PROJECT_SOURCE_DIR}/rtctree-3.0.0.zip.md5sum
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "Build of rtctree failed")
endif(_make_failed)
endif()

## 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_python_setup()

###################################
## catkin specific configuration ##
Expand All @@ -62,68 +46,16 @@ catkin_package(
# 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}
# )
install(
DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}/
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION})

#############
## Testing ##
Expand Down
2 changes: 1 addition & 1 deletion rtctree/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<rosdep name="python-omniorb" />

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

</package>
Expand Down
4 changes: 3 additions & 1 deletion rtshell/Makefile.rtshell
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
INSTALL_DIR = ${CURDIR}
INSTALL_SCRIPTS_DIR = ${CURDIR}
INSTALL_DATA_DIR = ${CURDIR}
SOURCE_DIR = build/rtshell-3.0.0
TARBALL = build/rtshell-3.0.0.zip
TARBALL_URL = https://github.com/gbiggs/rtshell/archive/3.0.0.zip
Expand All @@ -10,7 +12,7 @@ UNPACK_CMD = unzip
include $(MK_DIR)/download_unpack_build.mk

installed: $(SOURCE_DIR)/unpacked
(cd $(SOURCE_DIR) && yes | python setup.py build && yes | python setup.py install --prefix $(INSTALL_DIR) --record installed_files.txt)
(cd $(SOURCE_DIR) && yes | python setup.py build && yes | python setup.py install --prefix $(INSTALL_DIR) --install-scripts $(INSTALL_SCRIPTS_DIR) --install-data $(INSTALL_DATA_DIR) --install-layout=deb --record installed_files.txt)
touch installed

clean:
Expand Down
127 changes: 36 additions & 91 deletions rtshell/catkin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,28 @@ project(rtshell)
find_package(catkin REQUIRED mk rostest)

# Build rtshell
execute_process(COMMAND cmake -E chdir ${PROJECT_SOURCE_DIR} make -f Makefile.rtshell MK_DIR=${mk_PREFIX}/share/mk 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)

# <devel>/lib/<package>/bin
# <devel>/lib/python2.7/dist-packages
# <src>/<package>/share
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/installed)
execute_process(
COMMAND cmake -E chdir ${CMAKE_CURRENT_BINARY_DIR}
make -f ${PROJECT_SOURCE_DIR}/Makefile.rtshell installed
INSTALL_DIR=${CATKIN_DEVEL_PREFIX}
INSTALL_SCRIPTS_DIR=${CATKIN_DEVEL_PREFIX}/lib/${PROJECT_NAME}
INSTALL_DATA_DIR=${PROJECT_SOURCE_DIR}
MK_DIR=${mk_PREFIX}/share/mk
MD5SUM_FILE=${PROJECT_SOURCE_DIR}/rtshell-3.0.0.zip.md5sum
RESULT_VARIABLE _make_failed)
if (_make_failed)
message(FATAL_ERROR "Build of rtshell failed")
endif(_make_failed)
endif()

## 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_python_setup()

###################################
## catkin specific configuration ##
Expand All @@ -62,71 +46,33 @@ catkin_package(
# 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 share
install(
DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_PYTHON_DESTINATION}/
DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION})
install(
DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
USE_SOURCE_PERMISSIONS)
install(
DIRECTORY test share
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
PATTERN ".svn" EXCLUDE
)
USE_SOURCE_PERMISSIONS)
install(
DIRECTORY test share
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)

install(CODE
"execute_process(COMMAND echo \"sed -i s@${PROJECT_SOURCE_DIR}@${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}@g \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/share/rtshell/shell_support\")
execute_process(COMMAND sed -i s@${PROJECT_SOURCE_DIR}@${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}@g \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/share/${PROJECT_NAME}/shell_support)
")

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
execute_process(COMMAND sed -i s@${PROJECT_SOURCE_DIR}@${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}@g \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/share/${PROJECT_NAME}/shell_support)
")

#############
## Testing ##
Expand All @@ -141,6 +87,5 @@ install(CODE
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)

install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} USE_SOURCE_PERMISSIONS)
add_rostest(test/run_rtshell.test)
add_rostest(test/test_rtshell.test)

2 changes: 1 addition & 1 deletion rtshell/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<rosdep name="mk" />

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

</package>
Expand Down
3 changes: 0 additions & 3 deletions rtshell/test/run_rtshell.test

This file was deleted.

30 changes: 0 additions & 30 deletions rtshell/test/run_rtshell_test.py

This file was deleted.

Loading

0 comments on commit 8971903

Please sign in to comment.