diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/GrPackage.cmake | 71 | ||||
-rw-r--r-- | cmake/Packaging/Fedora-15.cmake | 10 | ||||
-rw-r--r-- | cmake/Packaging/Fedora-16.cmake | 10 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-10.04.cmake | 10 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-10.10.cmake | 10 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-11.04.cmake | 11 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-11.10.cmake | 10 | ||||
-rwxr-xr-x | cmake/debian/postinst.in | 6 | ||||
-rwxr-xr-x | cmake/debian/postrm.in | 5 | ||||
-rwxr-xr-x | cmake/debian/preinst.in | 5 | ||||
-rwxr-xr-x | cmake/debian/prerm.in | 5 | ||||
-rwxr-xr-x | cmake/redhat/post_install.in | 4 | ||||
-rwxr-xr-x | cmake/redhat/post_uninstall.in | 3 | ||||
-rwxr-xr-x | cmake/redhat/pre_install.in | 1 | ||||
-rwxr-xr-x | cmake/redhat/pre_uninstall.in | 3 |
15 files changed, 147 insertions, 17 deletions
diff --git a/cmake/Modules/GrPackage.cmake b/cmake/Modules/GrPackage.cmake index d398d7265..8761a9290 100644 --- a/cmake/Modules/GrPackage.cmake +++ b/cmake/Modules/GrPackage.cmake @@ -54,6 +54,15 @@ endfunction(CPACK_SET) # CPACK_FINALIZE - include cpack and the unset all the cpack variables ######################################################################## function(CPACK_FINALIZE) + + #set the package depends for monolithic package + foreach(comp ${CPACK_COMPONENTS_ALL}) + string(TOUPPER "PACKAGE_DEPENDS_${comp}" package_depends_var) + list(APPEND PACKAGE_DEPENDS_ALL ${${package_depends_var}}) + endforeach(comp) + string(REPLACE ";" ", " CPACK_DEBIAN_PACKAGE_DEPENDS "${PACKAGE_DEPENDS_ALL}") + string(REPLACE ";" ", " CPACK_RPM_PACKAGE_REQUIRES "${PACKAGE_DEPENDS_ALL}") + include(CPack) #finalize the cpack settings configured throughout the build system foreach(var ${_cpack_vars}) unset(${var} CACHE) @@ -91,13 +100,39 @@ endfunction(CPACK_COMPONENT) ######################################################################## # Setup CPack ######################################################################## -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GNU Radio") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GNU Radio - The GNU Software Radio") set(CPACK_PACKAGE_VENDOR "Free Software Foundation, Inc.") -set(CPACK_PACKAGE_CONTACT "Discuss-gnuradio@gnu.org") +set(CPACK_PACKAGE_CONTACT "Discuss GNURadio <discuss-gnuradio@gnu.org>") set(CPACK_PACKAGE_VERSION ${VERSION}) set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/README) set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README) set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README) + +find_program(LSB_RELEASE_EXECUTABLE lsb_release) + +if((DEBIAN OR REDHAT) AND LSB_RELEASE_EXECUTABLE) + + #extract system information by executing the commands + execute_process( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id + OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release + OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + #set a more sensible package name for this system + SET(CPACK_PACKAGE_FILE_NAME "gnuradio-${CPACK_PACKAGE_VERSION}-${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}") + + #now try to include the component based dependencies + set(package_deps_file "${CMAKE_SOURCE_DIR}/cmake/Packaging/${LSB_ID}-${LSB_RELEASE}.cmake") + if (EXISTS ${package_deps_file}) + include(${package_deps_file}) + endif() + +endif() + if(${CPACK_GENERATOR} STREQUAL NSIS) set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}") endif() @@ -105,25 +140,27 @@ endif() ######################################################################## # DEB package specific ######################################################################## -set(CPACK_DEBIAN_PACKAGE_DEPENDS - "libboost-all-dev" - "libfftw3-3" - "python" - "python-numpy" - "libqt4-core" - "libqwt5-qt4" - "python-qt4" - "python-gtk2" - "python-lxml" - "python-Cheetah" -) -string(REPLACE ";" ", " CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}") -set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_SOURCE_DIR}/debian/postinst ${CMAKE_SOURCE_DIR}/debian/prerm) +foreach(filename preinst postinst prerm postrm) + list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/debian/${filename}) + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/debian/${filename}.in + ${CMAKE_BINARY_DIR}/debian/${filename} + @ONLY) +endforeach(filename) ######################################################################## # RPM package specific ######################################################################## -set(CPACK_RPM_PACKAGE_REQUIRES "boost-devel") #TODO other packages +foreach(filename post_install post_uninstall pre_install pre_uninstall) + string(TOUPPER ${filename} filename_upper) + list(APPEND CPACK_RPM_${filename_upper}_SCRIPT_FILE ${CMAKE_BINARY_DIR}/redhat/${filename}) + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/redhat) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/redhat/${filename}.in + ${CMAKE_BINARY_DIR}/redhat/${filename} + @ONLY) +endforeach(filename) ######################################################################## # NSIS package specific diff --git a/cmake/Packaging/Fedora-15.cmake b/cmake/Packaging/Fedora-15.cmake new file mode 100644 index 000000000..1ec017a7a --- /dev/null +++ b/cmake/Packaging/Fedora-15.cmake @@ -0,0 +1,10 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "boost-python" "glibc") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs" "gsl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt4") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") +SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python" "numpy") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Fedora-16.cmake b/cmake/Packaging/Fedora-16.cmake new file mode 100644 index 000000000..278d68990 --- /dev/null +++ b/cmake/Packaging/Fedora-16.cmake @@ -0,0 +1,10 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "boost-python" "glibc") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs" "gsl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") +SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Ubuntu-10.04.cmake b/cmake/Packaging/Ubuntu-10.04.cmake new file mode 100644 index 000000000..a7a60f6b8 --- /dev/null +++ b/cmake/Packaging/Ubuntu-10.04.cmake @@ -0,0 +1,10 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3" "libgsl0ldbl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python" "python-numpy") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-10.10.cmake b/cmake/Packaging/Ubuntu-10.10.cmake new file mode 100644 index 000000000..a7a60f6b8 --- /dev/null +++ b/cmake/Packaging/Ubuntu-10.10.cmake @@ -0,0 +1,10 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3" "libgsl0ldbl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python" "python-numpy") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-11.04.cmake b/cmake/Packaging/Ubuntu-11.04.cmake new file mode 100644 index 000000000..71882b2e1 --- /dev/null +++ b/cmake/Packaging/Ubuntu-11.04.cmake @@ -0,0 +1,11 @@ +#set the debian package dependencies (parsed by our deb component maker) +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3" "libgsl0ldbl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt5-qt4") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-11.10.cmake b/cmake/Packaging/Ubuntu-11.10.cmake new file mode 100644 index 000000000..dcb7b3178 --- /dev/null +++ b/cmake/Packaging/Ubuntu-11.10.cmake @@ -0,0 +1,10 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3" "libgsl0ldbl") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/debian/postinst.in b/cmake/debian/postinst.in new file mode 100755 index 000000000..7fef2accf --- /dev/null +++ b/cmake/debian/postinst.in @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + @CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop install + ldconfig +fi diff --git a/cmake/debian/postrm.in b/cmake/debian/postrm.in new file mode 100755 index 000000000..b780602a7 --- /dev/null +++ b/cmake/debian/postrm.in @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ "$1" = "remove" ]; then + ldconfig +fi diff --git a/cmake/debian/preinst.in b/cmake/debian/preinst.in new file mode 100755 index 000000000..c60d46568 --- /dev/null +++ b/cmake/debian/preinst.in @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ "$1" = "install" ]; then + ls +fi diff --git a/cmake/debian/prerm.in b/cmake/debian/prerm.in new file mode 100755 index 000000000..d09887850 --- /dev/null +++ b/cmake/debian/prerm.in @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ "$1" = "remove" ]; then + @CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop uninstall +fi diff --git a/cmake/redhat/post_install.in b/cmake/redhat/post_install.in new file mode 100755 index 000000000..e7245f032 --- /dev/null +++ b/cmake/redhat/post_install.in @@ -0,0 +1,4 @@ +#!/bin/sh + +@CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop install +ldconfig diff --git a/cmake/redhat/post_uninstall.in b/cmake/redhat/post_uninstall.in new file mode 100755 index 000000000..2d1871b1d --- /dev/null +++ b/cmake/redhat/post_uninstall.in @@ -0,0 +1,3 @@ +#!/bin/sh + +ldconfig diff --git a/cmake/redhat/pre_install.in b/cmake/redhat/pre_install.in new file mode 100755 index 000000000..1a2485251 --- /dev/null +++ b/cmake/redhat/pre_install.in @@ -0,0 +1 @@ +#!/bin/sh diff --git a/cmake/redhat/pre_uninstall.in b/cmake/redhat/pre_uninstall.in new file mode 100755 index 000000000..c5e085e89 --- /dev/null +++ b/cmake/redhat/pre_uninstall.in @@ -0,0 +1,3 @@ +#!/bin/sh + +@CMAKE_INSTALL_PREFIX@/libexec/gnuradio/grc_setup_freedesktop uninstall |