1 ################################################################################
5 ################################################################################
8 GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd
10 GPSD_LICENSE_FILES = COPYING
11 GPSD_INSTALL_STAGING = YES
13 GPSD_DEPENDENCIES = host-scons host-pkgconf
15 GPSD_LDFLAGS = $(TARGET_LDFLAGS)
17 GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
22 sysroot=$(STAGING_DIR)\
26 ifeq ($(BR2_PACKAGE_NCURSES),y)
27 GPSD_DEPENDENCIES += ncurses
29 GPSD_SCONS_OPTS += ncurses=no
32 # Build libgpsmm if we've got C++
33 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
34 GPSD_LDFLAGS += -lstdc++
35 GPSD_SCONS_OPTS += libgpsmm=yes
37 GPSD_SCONS_OPTS += libgpsmm=no
40 # Enable or disable Qt binding
41 ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
42 GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
43 GPSD_DEPENDENCIES += qt
45 GPSD_SCONS_OPTS += qt=no
48 # If libusb is available build it before so the package can use it
49 ifeq ($(BR2_PACKAGE_LIBUSB),y)
50 GPSD_DEPENDENCIES += libusb
52 GPSD_SCONS_OPTS += usb=no
55 # If bluetooth is available build it before so the package can use it
56 ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
57 GPSD_DEPENDENCIES += bluez_utils
59 GPSD_SCONS_OPTS += bluez=no
62 ifeq ($(BR2_PACKAGE_DBUS_GLIB),y)
63 GPSD_SCONS_OPTS += dbus_export=yes
64 GPSD_DEPENDENCIES += dbus-glib
68 ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y)
69 GPSD_SCONS_OPTS += ashtech=no
71 ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y)
72 GPSD_SCONS_OPTS += aivdm=no
74 ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y)
75 GPSD_SCONS_OPTS += earthmate=no
77 ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y)
78 GPSD_SCONS_OPTS += evermore=no
80 ifneq ($(BR2_PACKAGE_GPSD_FURY),y)
81 GPSD_SCONS_OPTS += fury=no
83 ifneq ($(BR2_PACKAGE_GPSD_FV18),y)
84 GPSD_SCONS_OPTS += fv18=no
86 ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y)
87 GPSD_SCONS_OPTS += garmin=no
89 ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y)
90 GPSD_SCONS_OPTS += garmintxt=no
92 ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y)
93 GPSD_SCONS_OPTS += geostar=no
95 ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y)
96 GPSD_SCONS_OPTS += gpsclock=no
98 ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y)
99 GPSD_SCONS_OPTS += itrax=no
101 ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y)
102 GPSD_SCONS_OPTS += mtk3301=no
104 ifneq ($(BR2_PACKAGE_GPSD_NMEA),y)
105 GPSD_SCONS_OPTS += nmea=no
107 ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y)
108 GPSD_SCONS_OPTS += ntrip=no
110 ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y)
111 GPSD_SCONS_OPTS += navcom=no
113 ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y)
114 GPSD_SCONS_OPTS += nmea2000=no
116 ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y)
117 GPSD_SCONS_OPTS += oceanserver=no
119 ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y)
120 GPSD_SCONS_OPTS += oncore=no
122 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y)
123 GPSD_SCONS_OPTS += rtcm104v2=no
125 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y)
126 GPSD_SCONS_OPTS += rtcm104v3=no
128 ifneq ($(BR2_PACKAGE_GPSD_SIRF),y)
129 GPSD_SCONS_OPTS += sirf=no
131 ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y)
132 GPSD_SCONS_OPTS += superstar2=no
134 ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y)
135 GPSD_SCONS_OPTS += tsip=no
137 ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y)
138 GPSD_SCONS_OPTS += tripmate=no
140 ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y)
141 GPSD_SCONS_OPTS += tnt=no
143 ifneq ($(BR2_PACKAGE_GPSD_UBX),y)
144 GPSD_SCONS_OPTS += ublox=no
148 ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y)
149 GPSD_SCONS_OPTS += ntpshm=no
151 ifneq ($(BR2_PACKAGE_GPSD_PPS),y)
152 GPSD_SCONS_OPTS += pps=no
154 ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y)
155 GPSD_SCONS_OPTS += squelch=yes
157 ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y)
158 GPSD_SCONS_OPTS += reconfigure=no
160 ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y)
161 GPSD_SCONS_OPTS += controlsend=no
163 ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y)
164 GPSD_SCONS_OPTS += oldstyle=no
166 ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y)
167 GPSD_SCONS_OPTS += profiling=yes
169 ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y)
170 GPSD_SCONS_OPTS += clientdebug=no
172 ifeq ($(BR2_PACKAGE_GPSD_USER),y)
173 GPSD_SCONS_OPTS += gpsd_user=$(BR2_PACKAGE_GPSD_USER_VALUE)
175 ifeq ($(BR2_PACKAGE_GPSD_GROUP),y)
176 GPSD_SCONS_OPTS += gpsd_group=$(BR2_PACKAGE_GPSD_GROUP_VALUE)
178 ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED),y)
179 GPSD_SCONS_OPTS += fixed_port_speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE)
181 ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT),y)
182 GPSD_SCONS_OPTS += limited_max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE)
184 ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
185 GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
188 GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)"
190 define GPSD_BUILD_CMDS
197 define GPSD_INSTALL_TARGET_CMDS
200 DESTDIR=$(TARGET_DIR) \
206 define GPSD_INSTALL_INIT_SYSV
207 $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd
208 $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd
211 define GPSD_INSTALL_STAGING_CMDS
214 DESTDIR=$(STAGING_DIR) \
220 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
221 define GPSD_INSTALL_UDEV_RULES
224 DESTDIR=$(TARGET_DIR) \
230 GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
233 $(eval $(generic-package))