diff options
| -rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 20 | ||||
| -rwxr-xr-x | host/cmake/debian/postinst.in | 22 | ||||
| -rwxr-xr-x | host/cmake/debian/postrm.in | 20 | ||||
| -rwxr-xr-x | host/cmake/debian/preinst.in | 20 | ||||
| -rwxr-xr-x | host/cmake/debian/prerm.in | 21 | ||||
| -rwxr-xr-x | host/cmake/redhat/post_install.in | 20 | ||||
| -rwxr-xr-x | host/cmake/redhat/post_uninstall.in | 18 | ||||
| -rwxr-xr-x | host/cmake/redhat/pre_install.in | 16 | ||||
| -rwxr-xr-x | host/cmake/redhat/pre_uninstall.in | 19 | 
9 files changed, 175 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 3c6ae14f2..27a43b56e 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -82,7 +82,7 @@ ENDIF()  ########################################################################  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Ettus Research - USRP Hardware Driver")  SET(CPACK_PACKAGE_VENDOR              "Ettus Research LLC") -SET(CPACK_PACKAGE_CONTACT             "support@ettus.com") +SET(CPACK_PACKAGE_CONTACT             "Ettus Research <support@ettus.com>")  SET(CPACK_PACKAGE_VERSION_MAJOR ${UHD_VERSION_MAJOR})  SET(CPACK_PACKAGE_VERSION_MINOR ${UHD_VERSION_MINOR})  SET(CPACK_PACKAGE_VERSION_PATCH ${UHD_VERSION_PATCH}) @@ -135,12 +135,30 @@ SET(CPACK_COMPONENTS_ALL libraries headers utilities examples tests manual doxyg  ########################################################################  SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libusb-1.0-0, libboost-dev")  SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python, python-tk") +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)  ########################################################################  # Setup CPack RPM  ########################################################################  SET(CPACK_RPM_PACKAGE_REQUIRES "boost-devel, libusb1") +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) +  ########################################################################  # Setup CPack NSIS  ######################################################################## diff --git a/host/cmake/debian/postinst.in b/host/cmake/debian/postinst.in new file mode 100755 index 000000000..c5a15fe17 --- /dev/null +++ b/host/cmake/debian/postinst.in @@ -0,0 +1,22 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +if [ "$1" = "configure" ]; then +    cp @CMAKE_INSTALL_PREFIX@/share/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/uhd-usrp.rules +    udevadm control --reload-rules +    ldconfig +fi diff --git a/host/cmake/debian/postrm.in b/host/cmake/debian/postrm.in new file mode 100755 index 000000000..e98d1dba4 --- /dev/null +++ b/host/cmake/debian/postrm.in @@ -0,0 +1,20 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +if [ "$1" = "remove" ]; then +    ldconfig +fi diff --git a/host/cmake/debian/preinst.in b/host/cmake/debian/preinst.in new file mode 100755 index 000000000..463d5ee38 --- /dev/null +++ b/host/cmake/debian/preinst.in @@ -0,0 +1,20 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +if [ "$1" = "install" ]; then +     +fi diff --git a/host/cmake/debian/prerm.in b/host/cmake/debian/prerm.in new file mode 100755 index 000000000..aeecb3099 --- /dev/null +++ b/host/cmake/debian/prerm.in @@ -0,0 +1,21 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +if [ "$1" = "remove" ]; then +    rm /etc/udev/rules.d/uhd-usrp.rules +    udevadm control --reload-rules +fi diff --git a/host/cmake/redhat/post_install.in b/host/cmake/redhat/post_install.in new file mode 100755 index 000000000..48194eb1c --- /dev/null +++ b/host/cmake/redhat/post_install.in @@ -0,0 +1,20 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +cp @CMAKE_INSTALL_PREFIX@/share/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/uhd-usrp.rules +udevadm control --reload-rules +ldconfig diff --git a/host/cmake/redhat/post_uninstall.in b/host/cmake/redhat/post_uninstall.in new file mode 100755 index 000000000..ba15f9d0e --- /dev/null +++ b/host/cmake/redhat/post_uninstall.in @@ -0,0 +1,18 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +ldconfig diff --git a/host/cmake/redhat/pre_install.in b/host/cmake/redhat/pre_install.in new file mode 100755 index 000000000..bf8810cc7 --- /dev/null +++ b/host/cmake/redhat/pre_install.in @@ -0,0 +1,16 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# diff --git a/host/cmake/redhat/pre_uninstall.in b/host/cmake/redhat/pre_uninstall.in new file mode 100755 index 000000000..7c191308c --- /dev/null +++ b/host/cmake/redhat/pre_uninstall.in @@ -0,0 +1,19 @@ +# +# Copyright 2011 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program.  If not, see <http://www.gnu.org/licenses/>. +# + +rm /etc/udev/rules.d/uhd-usrp.rules +udevadm control --reload-rules  | 
