import gpsd_3.7 recipe, taken from oe-meta.git, modified
* no longer depen on python * no longer depend on dbus * disable lots of compile options we don't need
This commit is contained in:
parent
e518a3224a
commit
766aabc563
|
@ -0,0 +1,3 @@
|
||||||
|
PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python"
|
||||||
|
EXTRANATIVEPATH += "python-native"
|
||||||
|
DEPENDS += " python-native "
|
|
@ -0,0 +1,19 @@
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
autoconf/automake set docdir automatically, use their value ensuring
|
||||||
|
doc files are placed into $datadir/doc, not $prefix/doc.
|
||||||
|
|
||||||
|
RP 5/7/2011
|
||||||
|
|
||||||
|
Index: chrpath-0.13/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- chrpath-0.13.orig/Makefile.am 2011-07-05 23:40:14.769920254 +0100
|
||||||
|
+++ chrpath-0.13/Makefile.am 2011-07-05 23:40:19.819920635 +0100
|
||||||
|
@@ -1,7 +1,5 @@
|
||||||
|
SUBDIRS = testsuite deb
|
||||||
|
|
||||||
|
-docdir = $(prefix)/doc/$(PACKAGE)-$(VERSION)
|
||||||
|
-
|
||||||
|
doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README
|
||||||
|
|
||||||
|
bin_PROGRAMS = chrpath
|
|
@ -0,0 +1,26 @@
|
||||||
|
SUMMARY = "Tool to edit rpath in ELF binaries"
|
||||||
|
DESCRIPTION = "chrpath allows you to change the rpath (where the \
|
||||||
|
application looks for libraries) in an application. It does not \
|
||||||
|
(yet) allow you to add an rpath if there isn't one already."
|
||||||
|
HOMEPAGE = "http://alioth.debian.org/projects/chrpath/"
|
||||||
|
BUGTRACKER = "http://alioth.debian.org/tracker/?atid=412807&group_id=31052"
|
||||||
|
LICENSE = "GPLv2"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
|
||||||
|
PR = "r0"
|
||||||
|
|
||||||
|
SRC_URI = "http://alioth.debian.org/frs/download.php/3648/chrpath-${PV}.tar.gz \
|
||||||
|
file://standarddoc.patch"
|
||||||
|
|
||||||
|
SRC_URI[md5sum] = "ea6b212b23393bf58b0ef9bcf6491b86"
|
||||||
|
SRC_URI[sha256sum] = "a1bc9abc42d2b97efc3a0ced7c5dbed37d5debff600386193750315fa5823eaa"
|
||||||
|
|
||||||
|
inherit autotools
|
||||||
|
|
||||||
|
# We don't have a staged chrpath-native for ensuring our binary is
|
||||||
|
# relocatable, so use the one we've just built
|
||||||
|
CHRPATH_BIN_class-native = "${S}/chrpath"
|
||||||
|
|
||||||
|
PROVIDES_append_class-native = " chrpath-replacement-native"
|
||||||
|
NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native nativesdk"
|
|
@ -0,0 +1,49 @@
|
||||||
|
From ca1a781afbd68697ef2f573557f1f93ec7ab8d3c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Date: Sun, 29 Apr 2012 00:05:59 +0200
|
||||||
|
Subject: [PATCH] SConstruct: disable html and man docs building because
|
||||||
|
xmlto-native from OE is broken
|
||||||
|
|
||||||
|
It will try to load dtd and fail:
|
||||||
|
| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1
|
||||||
|
| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3)
|
||||||
|
| xmlto: Fix document syntax or use --skip-validation option
|
||||||
|
| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
|
||||||
|
| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
|
||||||
|
| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
|
||||||
|
| ^
|
||||||
|
| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
|
||||||
|
| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
|
||||||
|
| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
|
||||||
|
| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate
|
||||||
|
| mv: cannot stat `gpsctl.1': No such file or directory
|
||||||
|
| scons: *** [gpsctl.1] Error 1
|
||||||
|
| scons: building terminated because of errors.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
---
|
||||||
|
SConstruct | 4 ++--
|
||||||
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 9c0f751..8236abb 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -560,12 +560,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in@*/const char *src, size_t size);
|
||||||
|
|
||||||
|
|
||||||
|
manbuilder = mangenerator = htmlbuilder = None
|
||||||
|
-if config.CheckXsltproc():
|
||||||
|
+if False and config.CheckXsltproc():
|
||||||
|
mangenerator = 'xsltproc'
|
||||||
|
build = "xsltproc --nonet %s $SOURCE >$TARGET"
|
||||||
|
htmlbuilder = build % docbook_html_uri
|
||||||
|
manbuilder = build % docbook_man_uri
|
||||||
|
-elif WhereIs("xmlto"):
|
||||||
|
+elif False and WhereIs("xmlto"):
|
||||||
|
mangenerator = 'xmlto'
|
||||||
|
htmlbuilder = "xmlto html-nochunks $SOURCE; mv `basename $TARGET` $TARGET"
|
||||||
|
manbuilder = "xmlto man $SOURCE; mv `basename $TARGET` $TARGET"
|
||||||
|
--
|
||||||
|
1.7.8.6
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
From dd3ca38b27cce93f7e932abaa27b41371234fa90 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Date: Tue, 24 Apr 2012 18:45:14 +0200
|
||||||
|
Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
|
||||||
|
from python_lib_dir
|
||||||
|
|
||||||
|
* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
|
||||||
|
and with PYTHONPATH from OE it's pointing to native python dir
|
||||||
|
|
||||||
|
$ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
|
||||||
|
$ python
|
||||||
|
Python 2.7.2 (default, Apr 18 2012, 09:19:59)
|
||||||
|
[GCC 4.6.2] on linux2
|
||||||
|
Type "help", "copyright", "credits" or "license" for more information.
|
||||||
|
>>> from distutils import sysconfig
|
||||||
|
>>> sysconfig.get_config_vars('INCLUDEPY')
|
||||||
|
['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
|
||||||
|
>>>
|
||||||
|
$ unset PYTHONPATH
|
||||||
|
$ python
|
||||||
|
Python 2.7.2 (default, Apr 18 2012, 09:19:59)
|
||||||
|
[GCC 4.6.2] on linux2
|
||||||
|
Type "help", "copyright", "credits" or "license" for more information.
|
||||||
|
>>> from distutils import sysconfig
|
||||||
|
>>> sysconfig.get_config_vars('INCLUDEPY')
|
||||||
|
['/python2.7']
|
||||||
|
>>> import sysconfig
|
||||||
|
>>> sysconfig.get_config_vars('INCLUDEPY')
|
||||||
|
['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
|
||||||
|
* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
|
||||||
|
returns path to target sysroot
|
||||||
|
|
||||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
---
|
||||||
|
SConstruct | 9 +++++++++
|
||||||
|
1 files changed, 9 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 3c919fc..8478181 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -932,6 +932,12 @@ else:
|
||||||
|
if vars[i] is None:
|
||||||
|
vars[i] = []
|
||||||
|
(cc, cxx, opt, basecflags, ccshared, ldshared, so_ext, includepy, ldflags) = vars
|
||||||
|
+
|
||||||
|
+ if env['sysroot']:
|
||||||
|
+ print "Prefixing includepy '%s' with sysroot prefix" % includepy
|
||||||
|
+ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy))
|
||||||
|
+ print "'%s'" % includepy
|
||||||
|
+
|
||||||
|
# in case CC/CXX was set to the scan-build wrapper,
|
||||||
|
# ensure that we build the python modules with scan-build, too
|
||||||
|
if env['CC'] is None or env['CC'].find('scan-build') < 0:
|
||||||
|
@@ -1165,11 +1171,14 @@ if not env['python']:
|
||||||
|
python_install = []
|
||||||
|
else:
|
||||||
|
python_lib_dir = sysconfig.get_python_lib(plat_specific=1)
|
||||||
|
+ python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
|
||||||
|
python_module_dir = python_lib_dir + os.sep + 'gps'
|
||||||
|
python_extensions_install = python_env.Install( DESTDIR + python_module_dir,
|
||||||
|
python_built_extensions)
|
||||||
|
if not env['debug'] and not env['profiling'] and env['strip']:
|
||||||
|
python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
|
||||||
|
+ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
|
||||||
|
+ % (python_lib_dir, ))
|
||||||
|
|
||||||
|
python_modules_install = python_env.Install( DESTDIR + python_module_dir,
|
||||||
|
python_modules)
|
||||||
|
--
|
||||||
|
1.7.8.5
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
From f5f262be8ae54bd0c0f52802f2007ec89163756f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Date: Tue, 24 Apr 2012 11:52:35 +0200
|
||||||
|
Subject: [PATCH 1/2] SConstruct: respect sysroot also in SPLINTOPTS
|
||||||
|
|
||||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
|
||||||
|
---
|
||||||
|
SConstruct | 5 ++++-
|
||||||
|
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index a25e88a..a1bddb9 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -1277,7 +1277,10 @@ def Utility(target, source, action):
|
||||||
|
|
||||||
|
# Report splint warnings
|
||||||
|
# Note: test_bits.c is unsplintable because of the PRI64 macros.
|
||||||
|
-splintopts = "-I/usr/include/libusb-1.0 +quiet"
|
||||||
|
+if not env['sysroot']:
|
||||||
|
+ splintopts = "-I/usr/include/libusb-1.0 +quiet"
|
||||||
|
+else:
|
||||||
|
+ splintopts = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot']
|
||||||
|
# splint does not know about multi-arch, work around that
|
||||||
|
ma_status, ma = _getstatusoutput('dpkg-architecture -qDEB_HOST_MULTIARCH')
|
||||||
|
if ma_status == 0:
|
||||||
|
--
|
||||||
|
1.7.5.4
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
From 7d736bbd517c12d19d7b85a5b0db84732b2f86da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Date: Tue, 24 Apr 2012 16:24:35 +0200
|
||||||
|
Subject: [PATCH 2/2] SConstruct: remove rpath
|
||||||
|
|
||||||
|
* even with correct prefix (without DESTDIR) included it's redundant
|
||||||
|
WARNING: QA Issue: libgps:
|
||||||
|
/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
|
||||||
|
contains probably-redundant RPATH /usr/lib
|
||||||
|
* and with prefix from scons.bbclass it's invalid
|
||||||
|
WARNING: QA Issue: package libgps contains bad RPATH
|
||||||
|
/OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/image/usr/lib
|
||||||
|
in file
|
||||||
|
/OE/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd/gpsd-3.5-r0/packages-split/libgps/usr/lib/libgps.so.20.0
|
||||||
|
|
||||||
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
||||||
|
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
|
||||||
|
---
|
||||||
|
SConstruct | 7 +++++--
|
||||||
|
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index a1bddb9..3e7c607 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -1205,8 +1205,11 @@ if qt_env:
|
||||||
|
|
||||||
|
# We don't use installdir here in order to avoid having DESTDIR affect the rpath
|
||||||
|
if env["shared"] and env["chrpath"]:
|
||||||
|
- env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
|
||||||
|
- % (installdir('libdir', False), ))
|
||||||
|
+ if not env['sysroot']:
|
||||||
|
+ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
|
||||||
|
+ % (installdir('libdir', False), ))
|
||||||
|
+ else:
|
||||||
|
+ env.AddPostAction(binaryinstall, '$CHRPATH -d "$TARGET"')
|
||||||
|
|
||||||
|
if not env['debug'] and not env['profiling'] and env['strip']:
|
||||||
|
env.AddPostAction(binaryinstall, '$STRIP $TARGET')
|
||||||
|
--
|
||||||
|
1.7.5.4
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
DESCRIPTION = "Machine specific gpsd config"
|
||||||
|
LICENSE = "BSD"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD;md5=3775480a712fc46a69647678acb234cb"
|
||||||
|
|
||||||
|
# empty by default
|
||||||
|
# BSP layers can add stuff like meta-openmoko example:
|
||||||
|
#
|
|
@ -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"
|
|
@ -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 <bzed@debian.org>
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
|
||||||
|
:
|
|
@ -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=""
|
||||||
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
|
||||||
|
SECTION = "console/network"
|
||||||
|
LICENSE = "BSD"
|
||||||
|
LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
|
||||||
|
DEPENDS = "ncurses"
|
||||||
|
#DEPENDS = "ncurses libusb1 python"
|
||||||
|
PROVIDES = "virtual/gpsd"
|
||||||
|
|
||||||
|
EXTRANATIVEPATH += "chrpath-native"
|
||||||
|
|
||||||
|
PR = "r3.4"
|
||||||
|
|
||||||
|
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
|
||||||
|
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
|
||||||
|
file://0004-SConstruct-remove-rpath.patch \
|
||||||
|
file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
|
||||||
|
file://gpsd-default \
|
||||||
|
file://gpsd \
|
||||||
|
file://60-gpsd.rules \
|
||||||
|
"
|
||||||
|
#file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \
|
||||||
|
SRC_URI[md5sum] = "52d9785eaf1a51298bb8900dbde88f98"
|
||||||
|
SRC_URI[sha256sum] = "7800c478ee9d7ca7a502b0f892828561b1fbf7bc69d9d38c447c82c3628302ac"
|
||||||
|
|
||||||
|
#inherit scons update-rc.d python-dir pythonnative
|
||||||
|
inherit scons update-rc.d
|
||||||
|
|
||||||
|
INITSCRIPT_NAME = "gpsd"
|
||||||
|
INITSCRIPT_PARAMS = "defaults 35"
|
||||||
|
|
||||||
|
SYSTEMD_OESCONS ??= "false"
|
||||||
|
|
||||||
|
export STAGING_INCDIR
|
||||||
|
export STAGING_LIBDIR
|
||||||
|
|
||||||
|
EXTRA_OESCONS = " \
|
||||||
|
sysroot=${STAGING_DIR_TARGET} \
|
||||||
|
libQgpsmm='false' \
|
||||||
|
debug='true' \
|
||||||
|
strip='false' \
|
||||||
|
ashtec='false' \
|
||||||
|
bluez='false' \
|
||||||
|
dbus_export='false' \
|
||||||
|
cheapfloats='false' \
|
||||||
|
earthmate='false' \
|
||||||
|
evermore='false' \
|
||||||
|
fury='false' \
|
||||||
|
fv18='false' \
|
||||||
|
garmin='false' \
|
||||||
|
garmintxt='false' \
|
||||||
|
geostar='false' \
|
||||||
|
itrax='false' \
|
||||||
|
libQgpsmm='false' \
|
||||||
|
mtk3301='false' \
|
||||||
|
navcom='false' \
|
||||||
|
oncore='false' \
|
||||||
|
python='false' \
|
||||||
|
sirf='false' \
|
||||||
|
tnt='false' \
|
||||||
|
trip='false' \
|
||||||
|
tripmate='false' \
|
||||||
|
usb='false' \
|
||||||
|
systemd='${SYSTEMD_OESCONS}' \
|
||||||
|
"
|
||||||
|
# python='false' \
|
||||||
|
# this cannot be used, because then chrpath is not found and only static lib is built
|
||||||
|
# target=${HOST_SYS}
|
||||||
|
|
||||||
|
do_compile_prepend() {
|
||||||
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
|
||||||
|
export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
|
||||||
|
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
|
||||||
|
|
||||||
|
export BUILD_SYS="${BUILD_SYS}"
|
||||||
|
export HOST_SYS="${HOST_SYS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
|
||||||
|
export PKG_CONFIG="PKG_CONFIG_SYSROOT_DIR=\"${PKG_CONFIG_SYSROOT_DIR}\" pkg-config"
|
||||||
|
export STAGING_PREFIX="${STAGING_DIR_HOST}/${prefix}"
|
||||||
|
|
||||||
|
export BUILD_SYS="${BUILD_SYS}"
|
||||||
|
export HOST_SYS="${HOST_SYS}"
|
||||||
|
|
||||||
|
export DESTDIR="${D}"
|
||||||
|
# prefix is used for RPATH and DESTDIR/prefix for instalation
|
||||||
|
${STAGING_BINDIR_NATIVE}/scons prefix=${prefix} install ${EXTRA_OESCONS}|| \
|
||||||
|
bbfatal "scons install execution failed."
|
||||||
|
}
|
||||||
|
|
||||||
|
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/
|
||||||
|
|
||||||
|
#support for python
|
||||||
|
#install -d ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
|
||||||
|
#install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
PACKAGES =+ "libgps libgpsd gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"
|
||||||
|
|
||||||
|
FILES_gpsd-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc"
|
||||||
|
|
||||||
|
#FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "gpsd-gpsctl"
|
||||||
|
RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf"
|
||||||
|
|
||||||
|
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"
|
Loading…
Reference in New Issue