Commit 1882c024 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Update debian scripts

parent 336ad921
......@@ -84,7 +84,7 @@ IF (UNIX)
# Uncomment to add the necessary mantainer scripts
# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/preinst;${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm;${CMAKE_SOURCE_DIR}/scripts/debian/postrm")
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/preinst;${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm;${CMAKE_SOURCE_DIR}/scripts/debian/postrm")
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/preinst;${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm;${CMAKE_SOURCE_DIR}/scripts/debian/postrm;${CMAKE_SOURCE_DIR}/scripts/load_pcspkr;${CMAKE_SOURCE_DIR}/scripts/undo_load_pcspkr.sh")
# Uncomment to add dependencies comma separated
# SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-<package_name>-dev (>= 1.0~${DISTRIB})")
......
......@@ -2,7 +2,7 @@
set -e
case "$1" in
configure)
echo "Running postinst script"
#echo "Running postinst script"
# TEST
# echo "pkg name $DPKG_MAINTSCRIPT_PACKAGE"
......@@ -10,13 +10,13 @@ case "$1" in
# dpkg -L $DPKG_MAINTSCRIPT_PACKAGE
# TEST
/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A600eB1Y
/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A600eByq
/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A900WSG1
#/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A600eB1Y
#/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A600eByq
#/usr/share/iri/battery_monitor/scripts/unbind_ftdi_udev.sh -s A900WSG1
# SERIAL DABO: A600eB1Y
# SERIAL TIBI: A600eByq
# SERIAL TEO: A900WSG1
/usr/share/iri/battery_monitor/scripts/load_pcspkr.sh
/var/lib/dpkg/info/iri-battery-monitor-dev.load_pcspkr
;;
abort-upgrade)
......
......@@ -2,21 +2,21 @@
set -e
case "$1" in
remove)
echo "Running prerm script"
#echo "Running prerm script"
# TEST
# echo "pkg name $DPKG_MAINTSCRIPT_PACKAGE"
# echo "pkg files: dpkg -L <pkg_name>"
# dpkg -L $DPKG_MAINTSCRIPT_PACKAGE
# TEST
/usr/share/iri/battery_monitor/scripts/undo_unbind_ftdi_udev.sh -s A600eB1Y
/usr/share/iri/battery_monitor/scripts/undo_unbind_ftdi_udev.sh -s A600eByq
/usr/share/iri/battery_monitor/scripts/undo_unbind_ftdi_udev.sh -s A900WSG1
#/usr/share/iri/undo_unbind_ftdi_udev.sh -s A600eB1Y
#/usr/share/iri/undo_unbind_ftdi_udev.sh -s A600eByq
#/usr/share/iri/undo_unbind_ftdi_udev.sh -s A900WSG1
# SERIAL DABO: A600eB1Y
# SERIAL TIBI: A600eByq
# SERIAL TEO: A900WSG1
echo "battery_monitor postrm script: You may want to remove pcspkr from /etc/modules. You can do it by running ./scripts/undo_load_pcspkr.sh"
#/usr/share/iri/battery_monitor/scripts/undo_load_pcspkr.sh
echo "You may want to remove pcspkr from /etc/modules, which was added when this package was installed."
#/var/lib/dpkg/info/iri-battery-monitor-dev.load_pcspkr
;;
upgrade)
......
......@@ -10,7 +10,7 @@ echo "--- unbind_ftdi_udev.sh ---"
VENDOR="0403"
PRODUCT="6001"
SERIAL="A600eB1Y"
FILE="99-ftdi.rules"
FILE="99-ftdi-unbind-by-serial.rules"
# SERIAL DABO: A600eB1Y
# SERIAL TIBI: A600eByq
......@@ -21,7 +21,7 @@ usage() {
echo " -v specify vendor id. Default 0403"
echo " -p specify product id. Default 6001"
echo " -s specify serial number. Default A600eB1Y"
echo " -f specify udev file. Default 99-ftdi.rules"
echo " -f specify udev file. Default 99-ftdi-unbind-by-serial.rules"
exit 1
}
......@@ -38,6 +38,7 @@ done
shift $((OPTIND-1))
FILE=/etc/udev/rules.d/$FILE
FILE=/etc/udev/rules.d/$FILE
echo " Add udev rule so VENDOR:PRODUCT:SERIAL=${VENDOR}:${PRODUCT}:${SERIAL} devices do not load ftdi_sio driver."
......
......@@ -29,10 +29,8 @@ INSTALL(TARGETS battery_monitor
INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME})
INSTALL(FILES ../Findbattery_monitor.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
INSTALL(FILES ../scripts/unbind_ftdi_udev.sh
../scripts/load_pcspkr.sh
../scripts/undo_unbind_ftdi_udev.sh
../scripts/undo_load_pcspkr.sh
DESTINATION share/iri/${PROJECT_NAME}/scripts
DESTINATION share/iri
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)
ADD_SUBDIRECTORY(examples)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment