From ba641e072cc99f385d2c69bac7fc5236b08fe5f6 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 9 Mar 2012 00:07:47 +0100 Subject: gpsd: update to 3.4 Signed-off-by: Denis 'GNUtoo' Carikli --- .../gpsd/gpsd-2.96/60-gpsd.rules | 47 ------- meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd | 136 --------------------- .../recipes-navigation/gpsd/gpsd-2.96/gpsd-default | 5 - .../recipes-navigation/gpsd/gpsd-2.96/gpsd.service | 9 -- .../recipes-navigation/gpsd/gpsd-2.96/gpsd.socket | 9 -- .../recipes-navigation/gpsd/gpsd-3.4/60-gpsd.rules | 47 +++++++ meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd | 136 +++++++++++++++++++++ .../recipes-navigation/gpsd/gpsd-3.4/gpsd-default | 5 + .../recipes-navigation/gpsd/gpsd-3.4/gpsd.service | 9 ++ .../recipes-navigation/gpsd/gpsd-3.4/gpsd.socket | 9 ++ meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb | 110 ----------------- meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb | 115 +++++++++++++++++ 12 files changed, 321 insertions(+), 316 deletions(-) delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-2.96/60-gpsd.rules delete mode 100755 meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd-default delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.4/60-gpsd.rules create mode 100755 meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd-default create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.service create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.socket delete mode 100644 meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/60-gpsd.rules b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/60-gpsd.rules deleted file mode 100644 index c01db068de..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/60-gpsd.rules +++ /dev/null @@ -1,47 +0,0 @@ -# udev rules for gpsd -# $Id$ -# -# GPSes don't have their own USB device class. They're serial-over-USB -# devices, so what you see is actually the ID of the serial-over-USB chip. -# Fortunately, just two of these account for over 80% of consumer-grade -# GPS sensors. The gpsd.hotplug.wrapper script will tell a running gpsd -# that it should look at the device that just went active, because it -# might be a GPS. -# -# The following setup works on Debian - something similar will apply on -# other distributions: -# -# /etc/udev/gpsd.rules -# /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules -# /lib/udev/gpsd.hotplug.wrapper -# /lib/udev/gpsd.hotplug -# -# Setting the link in /etc/udev/rules.d activates the rule and determines -# when to run it on boot (similar to init.d processing). - -SUBSYSTEM!="tty", GOTO="gpsd_rules_end" - -# Prolific Technology, Inc. PL2303 Serial Port -ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# ATEN International Co., Ltd UC-232A Serial Port [pl2303] -ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# FTDI 8U232AM -ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# Cypress M8/CY7C64013 (DeLorme uses these) -ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) -ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) -ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) -ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# u-blox AG, u-blox 5 (tested with Navilock NL-402U) -ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# FTDI FT232 -ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" -# u-blox 4 -SYSFS{idVendor}=="1546", SYSFS{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" - -ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper" - -LABEL="gpsd_rules_end" diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd deleted file mode 100755 index ba73dafb2c..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: gpsd -# Required-Start: $remote_fs $network -# Should-Start: bluetooth dbus udev -# Required-Stop: $remote_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: GPS (Global Positioning System) daemon start/stop script -# Description: Start/Stop script for the gpsd service daemon, -# which is able to monitor one or more GPS devices -# connected to a host computer, making all data on -# the location and movements of the sensors available -# to be queried on TCP port 2947. -### END INIT INFO - -# Author: Bernd Zeimetz -# -# Please remove the "Author" lines above and replace them -# with your own name if you copy and modify this script. - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="GPS (Global Positioning System) daemon" -NAME=gpsd -DAEMON=/usr/sbin/$NAME -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration, if present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then - GPSD_SOCKET=/var/run/gpsd.sock -fi - -if [ -n "$GPSD_SOCKET" ]; then - GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" -fi - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ - -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ - || return 2 -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - echo "Starting $DESC" "$NAME" - do_start - exit $? - ;; - stop) - echo "Stopping $DESC" "$NAME" - do_stop - exit $? - ;; - status) - ;; - reload|force-reload) - echo "Reloading $DESC" "$NAME" - do_reload - exit $? - ;; - restart) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - echo "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - exit $? - ;; - *) - # Failed to stop - exit 1 - ;; - esac - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd-default b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd-default deleted file mode 100644 index 0ceff03824..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd-default +++ /dev/null @@ -1,5 +0,0 @@ -# If you must specify a non-NMEA driver, uncomment and modify the next line -GPSD_SOCKET="/var/run/gpsd.sock" -GPSD_OPTIONS="" -GPS_DEVICES="" - diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service deleted file mode 100644 index 8deaf759a7..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=GPS (Global Positioning System) Daemon -Requires=gpsd.socket - -[Service] -ExecStart=/usr/sbin/gpsd -N - -[Install] -Also=gpsd.socket diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket b/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket deleted file mode 100644 index 13c17f2480..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd-2.96/gpsd.socket +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=GPS (Global Positioning System) Daemon Sockets - -[Socket] -ListenStream=/var/run/gpsd.sock -ListenStream=127.0.0.1:2947 - -[Install] -WantedBy=sockets.target diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.4/60-gpsd.rules b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/60-gpsd.rules new file mode 100644 index 0000000000..c01db068de --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/60-gpsd.rules @@ -0,0 +1,47 @@ +# udev rules for gpsd +# $Id$ +# +# GPSes don't have their own USB device class. They're serial-over-USB +# devices, so what you see is actually the ID of the serial-over-USB chip. +# Fortunately, just two of these account for over 80% of consumer-grade +# GPS sensors. The gpsd.hotplug.wrapper script will tell a running gpsd +# that it should look at the device that just went active, because it +# might be a GPS. +# +# The following setup works on Debian - something similar will apply on +# other distributions: +# +# /etc/udev/gpsd.rules +# /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules +# /lib/udev/gpsd.hotplug.wrapper +# /lib/udev/gpsd.hotplug +# +# Setting the link in /etc/udev/rules.d activates the rule and determines +# when to run it on boot (similar to init.d processing). + +SUBSYSTEM!="tty", GOTO="gpsd_rules_end" + +# Prolific Technology, Inc. PL2303 Serial Port +ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# ATEN International Co., Ltd UC-232A Serial Port [pl2303] +ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# FTDI 8U232AM +ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Cypress M8/CY7C64013 (DeLorme uses these) +ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) +ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) +ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) +ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# u-blox AG, u-blox 5 (tested with Navilock NL-402U) +ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# FTDI FT232 +ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" +# u-blox 4 +SYSFS{idVendor}=="1546", SYSFS{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" + +ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper" + +LABEL="gpsd_rules_end" diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd new file mode 100755 index 0000000000..ba73dafb2c --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd @@ -0,0 +1,136 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: gpsd +# Required-Start: $remote_fs $network +# Should-Start: bluetooth dbus udev +# Required-Stop: $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: GPS (Global Positioning System) daemon start/stop script +# Description: Start/Stop script for the gpsd service daemon, +# which is able to monitor one or more GPS devices +# connected to a host computer, making all data on +# the location and movements of the sensors available +# to be queried on TCP port 2947. +### END INIT INFO + +# Author: Bernd Zeimetz +# +# Please remove the "Author" lines above and replace them +# with your own name if you copy and modify this script. + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="GPS (Global Positioning System) daemon" +NAME=gpsd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration, if present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then + GPSD_SOCKET=/var/run/gpsd.sock +fi + +if [ -n "$GPSD_SOCKET" ]; then + GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" +fi + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ + -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + echo "Starting $DESC" "$NAME" + do_start + exit $? + ;; + stop) + echo "Stopping $DESC" "$NAME" + do_stop + exit $? + ;; + status) + ;; + reload|force-reload) + echo "Reloading $DESC" "$NAME" + do_reload + exit $? + ;; + restart) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + echo "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + exit $? + ;; + *) + # Failed to stop + exit 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd-default b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd-default new file mode 100644 index 0000000000..0ceff03824 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd-default @@ -0,0 +1,5 @@ +# If you must specify a non-NMEA driver, uncomment and modify the next line +GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_OPTIONS="" +GPS_DEVICES="" + diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.service b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.service new file mode 100644 index 0000000000..8deaf759a7 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.service @@ -0,0 +1,9 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon +Requires=gpsd.socket + +[Service] +ExecStart=/usr/sbin/gpsd -N + +[Install] +Also=gpsd.socket diff --git a/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.socket b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.socket new file mode 100644 index 0000000000..13c17f2480 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd-3.4/gpsd.socket @@ -0,0 +1,9 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon Sockets + +[Socket] +ListenStream=/var/run/gpsd.sock +ListenStream=127.0.0.1:2947 + +[Install] +WantedBy=sockets.target diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb b/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb deleted file mode 100644 index 7e2a96cb11..0000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd_2.96.bb +++ /dev/null @@ -1,110 +0,0 @@ -DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices" -SECTION = "console/network" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" -DEPENDS = "dbus-glib ncurses python libusb1" -PROVIDES = "virtual/gpsd" - -PR = "r3" - -EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \ - --x-libraries=${STAGING_LIBDIR} \ - --enable-dbus \ - --disable-libQgpsmm \ -" - -SRC_URI = "http://download.berlios.de/${PN}/${P}bis.tar.gz;name=gpsd \ - file://gpsd-default \ - file://gpsd \ - file://gpsd.socket \ - file://gpsd.service \ - file://60-gpsd.rules" -SRC_URI[gpsd.md5sum] = "52b00cab0fb34bbf1923ae35c7ced6c4" -SRC_URI[gpsd.sha256sum] = "c6d72565bc06b802c749e69808eb7c6ee165962dc17383971c9001b5e1763690" - -inherit autotools update-rc.d python-dir systemd - -INITSCRIPT_NAME = "gpsd" -INITSCRIPT_PARAMS = "defaults 35" - -SYSTEMD_PACKAGES = "${PN}-systemd" -SYSTEMD_SERVICE = "${PN}.socket" - - -LDFLAGS += "-L${STAGING_LIBDIR} -lm" -export STAGING_INCDIR -export STAGING_LIBDIR - -TARGET_CC_ARCH += "${LDFLAGS}" - -do_configure_prepend() { - # skip first - sed -i "s#for pylibpath in '/usr/lib'#for pylibpath in #g" ${S}/configure.ac - # disable xmlto, in case xsltproc doesn't work xmlto is used and fails - sed -i "s#AC_CHECK_PROG(WITH_XMLTO#AC_CHECK_PROG(WITH_XMLTO_DISABLED_IN_OE#g" ${S}/configure.ac -} - -do_compile_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" - find ${S} -name "*.so" -exec rm -f {} \; -} - -do_install_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" -} - -do_install_append() { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ - install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default - - #support for udev - install -d ${D}/${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d - install -d ${D}${base_libdir}/udev/ - install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ - install -d ${D}${base_libdir}/udev/ - install -m 0755 ${S}/gpsd.hotplug.wrapper ${D}${base_libdir}/udev/ -} - -pkg_postinst_${PN}-conf() { - update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 -} - -pkg_postrm_${PN}-conf() { - update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default -} - -PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" - -FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" - -RDEPENDS_${PN} = "gpsd-gpsctl" -RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" - -DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" -FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" -RDEPENDS_gpsd-udev += "udev gpsd-conf" - -DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" -FILES_libgpsd = "${libdir}/libgpsd.so.*" - -DESCRIPTION_libgps = "C service library used for communicating with gpsd" -FILES_libgps = "${libdir}/libgps.so.*" - -DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts" -FILES_gpsd-conf = "${sysconfdir}" - -DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes" -FILES_gpsd-gpsctl = "${bindir}/gpsctl" - -DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS" -FILES_gps-utils = "${bindir}/*" -RDEPENDS_gps-utils = "python-pygps" - -DESCRIPTION_python-pygps = "Python bindings to gpsd" -FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" -RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb new file mode 100644 index 0000000000..972871a321 --- /dev/null +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.4.bb @@ -0,0 +1,115 @@ +DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices" +SECTION = "console/network" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" +DEPENDS = "dbus dbus-glib ncurses python libusb1" +PROVIDES = "virtual/gpsd" + +PR = "r0" + +SRC_URI = "http://download.savannah.gnu.org/releases/gpsd/gpsd-${PV}.tar.gz;name=gpsd \ + file://gpsd-default \ + file://gpsd \ + file://gpsd.socket \ + file://gpsd.service \ + file://60-gpsd.rules" +SRC_URI[gpsd.md5sum] = "c01353459faa68834309109d4e868460" +SRC_URI[gpsd.sha256sum] = "79f7de9ead63c7f5d2c9a92e85b5f82e53323c4d451ef8e27ea265ac3ef9a70f" + +inherit scons update-rc.d python-dir systemd + +INITSCRIPT_NAME = "gpsd" +INITSCRIPT_PARAMS = "defaults 35" + +SYSTEMD_PACKAGES = "${PN}-systemd" +SYSTEMD_SERVICE = "${PN}.socket" + + +LDFLAGS += "-L${STAGING_LIBDIR} -lm" +export STAGING_INCDIR +export STAGING_LIBDIR + +CC += "${LDFLAGS}" + +EXTRA_OESCONS = " \ + libQgpsmm='false' \ + debug='true' \ + strip='false' \ + systemd='true' \ + pkgconfig='${PKG_CONFIG_DIR}' \ +" + +do_compile_prepend() { + export LIBPATH="${STAGING_LIBDIR}" + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + export BUILD_SYS="${BUILD_SYS}" + export HOST_SYS="${HOST_SYS}" +} + +do_install_prepend() { + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}" + + export BUILD_SYS="${BUILD_SYS}" + export HOST_SYS="${HOST_SYS}" +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default + + #support for udev + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d + install -d ${D}${base_libdir}/udev/ + install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ + install -d ${D}${base_libdir}/udev/ + + #support for python + install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + for f in ${S}/gps/* ;do + install $f ${D}/${PYTHON_SITEPACKAGES_DIR}/gps + done +} + +pkg_postinst_${PN}-conf() { + update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10 +} + +pkg_postrm_${PN}-conf() { + update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default +} + +PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils" + +FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" + +RDEPENDS_${PN} = "gpsd-gpsctl" +RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev" + +DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging" +FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" +RDEPENDS_gpsd-udev += "udev gpsd-conf" + +DESCRIPTION_libgpsd = "C service library used for communicating with gpsd" +FILES_libgpsd = "${libdir}/libgpsd.so.*" + +DESCRIPTION_libgps = "C service library used for communicating with gpsd" +FILES_libgps = "${libdir}/libgps.so.*" + +DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts" +FILES_gpsd-conf = "${sysconfdir}" + +DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes" +FILES_gpsd-gpsctl = "${bindir}/gpsctl" + +DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS" +FILES_gps-utils = "${bindir}/*" +RDEPENDS_gps-utils = "python-pygps" + +DESCRIPTION_python-pygps = "Python bindings to gpsd" +FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*" +RDEPENDS_python-pygps = "python-core python-curses gpsd python-json" -- cgit 1.2.3-korg