2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
16 PKG_MD5SUM:=fc5b03aae38b9b5b6880b31924d0ace3
18 PKG_BUILD_DEPENDS:=libncurses libusb-1.0
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/scons.mk
23 define Package/gpsd/Default
25 URL:=http://catb.org/gpsd/
28 define Package/gpsd/Default/description
29 gpsd is a userland daemon acting as a translator between GPS and AIS receivers
30 and their clients. gpsd listens on port 2947 for clients requesting
31 position/time/velocity information. The receivers are expected to generate
32 position information in a well-known format -- as NMEA-0183 sentences, SiRF
33 binary, Rockwell binary, Garmin binary format, or other vendor binary
34 protocols. gpsd takes this information from the GPS and translates it into
35 something uniform and easier to understand for clients.
39 $(call Package/gpsd/Default)
42 DEPENDS+= +libgps +libgpsd
43 TITLE:=An interface daemon for GPS receivers
46 define Package/gpsd/conffiles
50 define Package/gpsd/description
51 $(call Package/gpsd/Default/description)
52 This package contains the GPS daemon.
55 define Package/gpsd-clients
56 $(call Package/gpsd/Default)
59 DEPENDS+= +libgps +libgpsd +libncurses
60 TITLE:=GPS tools and clients
63 define Package/gpsd-clients/description
64 $(call Package/gpsd/Default/description)
65 This package contains auxiliary tools and example clients for monitoring and
66 testing the GPS daemon.
70 $(call Package/gpsd/Default)
74 TITLE:=C service library for communicating with the GPS daemon
77 define Package/libgps/description
78 $(call Package/gpsd/Default/description)
79 This package contains the libgps library.
82 define Package/libgpsd
83 $(call Package/gpsd/Default)
86 DEPENDS+= +libcap +libusb-1.0
87 TITLE:=C service library for GPS applications
90 define Package/libgpsd/description
91 $(call Package/gpsd/Default/description)
92 This package contains the libgpsd library.
114 define Build/InstallDev
115 $(INSTALL_DIR) $(1)/usr/include
116 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
119 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
121 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
122 $(1)/usr/lib/pkgconfig/
125 define Package/gpsd/install
126 $(INSTALL_DIR) $(1)/etc/config
127 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
128 $(INSTALL_DIR) $(1)/etc/init.d
129 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
130 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
131 $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
132 $(INSTALL_DIR) $(1)/usr/sbin
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
136 define Package/gpsd-clients/install
137 $(INSTALL_DIR) $(1)/usr/bin
139 $(PKG_INSTALL_DIR)/usr/bin/cgps \
140 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
141 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
142 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
146 define Package/libgps/install
147 $(INSTALL_DIR) $(1)/usr/lib
148 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
151 define Package/libgpsd/install
152 $(INSTALL_DIR) $(1)/usr/lib
153 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpsd.so.* $(1)/usr/lib/
156 $(eval $(call BuildPackage,gpsd))
157 $(eval $(call BuildPackage,gpsd-clients))
158 $(eval $(call BuildPackage,libgps))
159 $(eval $(call BuildPackage,libgpsd))