The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gpsd / gpsd.mk
1 ################################################################################
2 #
3 # gpsd
4 #
5 ################################################################################
6
7 GPSD_VERSION = 3.11
8 GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd
9 GPSD_LICENSE = BSD-3c
10 GPSD_LICENSE_FILES = COPYING
11 GPSD_INSTALL_STAGING = YES
12
13 GPSD_DEPENDENCIES = host-scons host-pkgconf
14
15 GPSD_LDFLAGS = $(TARGET_LDFLAGS)
16
17 GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS)
18
19 GPSD_SCONS_OPTS = \
20         arch=$(ARCH)\
21         prefix=/usr\
22         sysroot=$(STAGING_DIR)\
23         strip=no\
24         python=no
25
26 ifeq ($(BR2_PACKAGE_NCURSES),y)
27 GPSD_DEPENDENCIES += ncurses
28 else
29 GPSD_SCONS_OPTS += ncurses=no
30 endif
31
32 # Build libgpsmm if we've got C++
33 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
34 GPSD_LDFLAGS += -lstdc++
35 GPSD_SCONS_OPTS += libgpsmm=yes
36 else
37 GPSD_SCONS_OPTS += libgpsmm=no
38 endif
39
40 # Enable or disable Qt binding
41 ifeq ($(BR2_PACKAGE_QT_NETWORK),y)
42 GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)"
43 GPSD_DEPENDENCIES += qt
44 else
45 GPSD_SCONS_OPTS += qt=no
46 endif
47
48 # If libusb is available build it before so the package can use it
49 ifeq ($(BR2_PACKAGE_LIBUSB),y)
50 GPSD_DEPENDENCIES += libusb
51 else
52 GPSD_SCONS_OPTS += usb=no
53 endif
54
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
58 else
59 GPSD_SCONS_OPTS += bluez=no
60 endif
61
62 ifeq ($(BR2_PACKAGE_DBUS_GLIB),y)
63 GPSD_SCONS_OPTS += dbus_export=yes
64 GPSD_DEPENDENCIES += dbus-glib
65 endif
66
67 # Protocol support
68 ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y)
69 GPSD_SCONS_OPTS += ashtech=no
70 endif
71 ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y)
72 GPSD_SCONS_OPTS += aivdm=no
73 endif
74 ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y)
75 GPSD_SCONS_OPTS += earthmate=no
76 endif
77 ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y)
78 GPSD_SCONS_OPTS += evermore=no
79 endif
80 ifneq ($(BR2_PACKAGE_GPSD_FURY),y)
81 GPSD_SCONS_OPTS += fury=no
82 endif
83 ifneq ($(BR2_PACKAGE_GPSD_FV18),y)
84 GPSD_SCONS_OPTS += fv18=no
85 endif
86 ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y)
87 GPSD_SCONS_OPTS += garmin=no
88 endif
89 ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y)
90 GPSD_SCONS_OPTS += garmintxt=no
91 endif
92 ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y)
93 GPSD_SCONS_OPTS += geostar=no
94 endif
95 ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y)
96 GPSD_SCONS_OPTS += gpsclock=no
97 endif
98 ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y)
99 GPSD_SCONS_OPTS += itrax=no
100 endif
101 ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y)
102 GPSD_SCONS_OPTS += mtk3301=no
103 endif
104 ifneq ($(BR2_PACKAGE_GPSD_NMEA),y)
105 GPSD_SCONS_OPTS += nmea=no
106 endif
107 ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y)
108 GPSD_SCONS_OPTS += ntrip=no
109 endif
110 ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y)
111 GPSD_SCONS_OPTS += navcom=no
112 endif
113 ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y)
114 GPSD_SCONS_OPTS += nmea2000=no
115 endif
116 ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y)
117 GPSD_SCONS_OPTS += oceanserver=no
118 endif
119 ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y)
120 GPSD_SCONS_OPTS += oncore=no
121 endif
122 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y)
123 GPSD_SCONS_OPTS += rtcm104v2=no
124 endif
125 ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y)
126 GPSD_SCONS_OPTS += rtcm104v3=no
127 endif
128 ifneq ($(BR2_PACKAGE_GPSD_SIRF),y)
129 GPSD_SCONS_OPTS += sirf=no
130 endif
131 ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y)
132 GPSD_SCONS_OPTS += superstar2=no
133 endif
134 ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y)
135 GPSD_SCONS_OPTS += tsip=no
136 endif
137 ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y)
138 GPSD_SCONS_OPTS += tripmate=no
139 endif
140 ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y)
141 GPSD_SCONS_OPTS += tnt=no
142 endif
143 ifneq ($(BR2_PACKAGE_GPSD_UBX),y)
144 GPSD_SCONS_OPTS += ublox=no
145 endif
146
147 # Features
148 ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y)
149 GPSD_SCONS_OPTS += ntpshm=no
150 endif
151 ifneq ($(BR2_PACKAGE_GPSD_PPS),y)
152 GPSD_SCONS_OPTS += pps=no
153 endif
154 ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y)
155 GPSD_SCONS_OPTS += squelch=yes
156 endif
157 ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y)
158 GPSD_SCONS_OPTS += reconfigure=no
159 endif
160 ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y)
161 GPSD_SCONS_OPTS += controlsend=no
162 endif
163 ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y)
164 GPSD_SCONS_OPTS += oldstyle=no
165 endif
166 ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y)
167 GPSD_SCONS_OPTS += profiling=yes
168 endif
169 ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y)
170 GPSD_SCONS_OPTS += clientdebug=no
171 endif
172 ifeq ($(BR2_PACKAGE_GPSD_USER),y)
173 GPSD_SCONS_OPTS += gpsd_user=$(BR2_PACKAGE_GPSD_USER_VALUE)
174 endif
175 ifeq ($(BR2_PACKAGE_GPSD_GROUP),y)
176 GPSD_SCONS_OPTS += gpsd_group=$(BR2_PACKAGE_GPSD_GROUP_VALUE)
177 endif
178 ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED),y)
179 GPSD_SCONS_OPTS += fixed_port_speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE)
180 endif
181 ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT),y)
182 GPSD_SCONS_OPTS += limited_max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE)
183 endif
184 ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
185 GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
186 endif
187
188 GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)"
189
190 define GPSD_BUILD_CMDS
191         (cd $(@D); \
192                 $(GPSD_SCONS_ENV) \
193                 $(SCONS) \
194                 $(GPSD_SCONS_OPTS))
195 endef
196
197 define GPSD_INSTALL_TARGET_CMDS
198         (cd $(@D); \
199                 $(GPSD_SCONS_ENV) \
200                 DESTDIR=$(TARGET_DIR) \
201                 $(SCONS) \
202                 $(GPSD_SCONS_OPTS) \
203                 install)
204 endef
205
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
209 endef
210
211 define GPSD_INSTALL_STAGING_CMDS
212         (cd $(@D); \
213                 $(GPSD_SCONS_ENV) \
214                 DESTDIR=$(STAGING_DIR) \
215                 $(SCONS) \
216                 $(GPSD_SCONS_OPTS) \
217                 install)
218 endef
219
220 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
221 define GPSD_INSTALL_UDEV_RULES
222         (cd $(@D); \
223                 $(GPSD_SCONS_ENV) \
224                 DESTDIR=$(TARGET_DIR) \
225                 $(SCONS) \
226                 $(GPSD_SCONS_OPTS) \
227                 udev-install)
228 endef
229
230 GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES
231 endif
232
233 $(eval $(generic-package))