df67cf896f5cba656231f48e3af66fcfeb10f997
[feed/packages.git] / utils / gpsd / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gpsd
11 PKG_VERSION:=3.15
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download-mirror.savannah.gnu.org/releases/gpsd/
16 PKG_MD5SUM:=afd79b87337fadf38ee2a7c4314dac79
17
18 PKG_MAINTAINER:=Pushpal Sidhu <psidhu@gateworks.com>
19 PKG_LICENSE:=BSD-3-Clause
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_BUILD_DEPENDS:=libncurses libusb-1.0
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/scons.mk
26
27 define Package/gpsd/Default
28 DEPENDS:=+librt +libncurses
29 URL:=http://catb.org/gpsd/
30 endef
31
32 define Package/gpsd/Default/description
33 gpsd is a userland daemon acting as a translator between GPS and AIS receivers
34 and their clients. gpsd listens on port 2947 for clients requesting
35 position/time/velocity information. The receivers are expected to generate
36 position information in a well-known format -- as NMEA-0183 sentences, SiRF
37 binary, Rockwell binary, Garmin binary format, or other vendor binary
38 protocols. gpsd takes this information from the GPS and translates it into
39 something uniform and easier to understand for clients.
40 endef
41
42 define Package/gpsd
43 $(call Package/gpsd/Default)
44 SECTION:=net
45 CATEGORY:=Network
46 DEPENDS+= +libgps +libusb-1.0
47 TITLE:=An interface daemon for GPS receivers
48 endef
49
50 define Package/gpsd/conffiles
51 /etc/config/gpsd
52 endef
53
54 define Package/gpsd/description
55 $(call Package/gpsd/Default/description)
56 This package contains the GPS daemon.
57 endef
58
59 define Package/gpsd-clients
60 $(call Package/gpsd/Default)
61 SECTION:=net
62 CATEGORY:=Network
63 DEPENDS+= +libgps +libncurses +libusb-1.0
64 TITLE:=GPS tools and clients
65 endef
66
67 define Package/gpsd-clients/description
68 $(call Package/gpsd/Default/description)
69 This package contains auxiliary tools and example clients for monitoring and
70 testing the GPS daemon.
71 endef
72
73 define Package/libgps
74 $(call Package/gpsd/Default)
75 SECTION:=libs
76 CATEGORY:=Libraries
77 DEPENDS+= +libcap
78 TITLE:=C service library for communicating with the GPS daemon
79 endef
80
81 define Package/libgps/description
82 $(call Package/gpsd/Default/description)
83 This package contains the libgps library.
84 endef
85
86 SCONS_OPTIONS += \
87 dbus_export=no \
88 tsip=no \
89 fv18=no \
90 tripmate=no \
91 earthmate=no \
92 itrax=no \
93 navcom=no \
94 ubx=no \
95 evermore=no \
96 ntrip=no \
97 libgpsmm=no \
98 libQgpsmm=no \
99 bluez=no \
100 strip=no \
101 python=no \
102 implicit_link=no \
103 chrpath=no
104
105 define Build/InstallDev
106 $(INSTALL_DIR) $(1)/usr/include
107 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
108 $(INSTALL_DIR) $(1)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
110 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
111 $(CP) \
112 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
113 $(1)/usr/lib/pkgconfig/
114 endef
115
116 define Package/gpsd/install
117 $(INSTALL_DIR) $(1)/etc/config
118 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
119 $(INSTALL_DIR) $(1)/etc/init.d
120 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
121 $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
122 $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
123 $(INSTALL_DIR) $(1)/usr/sbin
124 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
125 endef
126
127 define Package/gpsd-clients/install
128 $(INSTALL_DIR) $(1)/usr/bin
129 $(INSTALL_BIN) \
130 $(PKG_INSTALL_DIR)/usr/bin/cgps \
131 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
132 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
133 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
134 $(1)/usr/bin/
135 endef
136
137 define Package/libgps/install
138 $(INSTALL_DIR) $(1)/usr/lib
139 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
140 endef
141
142 $(eval $(call BuildPackage,gpsd))
143 $(eval $(call BuildPackage,gpsd-clients))
144 $(eval $(call BuildPackage,libgps))