admin/netdata: Update to 1.9.0
[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.16
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
16 PKG_HASH:=03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029
17
18 PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.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+= +libusb-1.0
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:=utils
45 CATEGORY:=Utilities
46 TITLE:=An interface daemon for GPS receivers
47 endef
48
49 define Package/gpsd/conffiles
50 /etc/config/gpsd
51 endef
52
53 define Package/gpsd/description
54 $(call Package/gpsd/Default/description)
55 This package contains the GPS daemon.
56 endef
57
58 define Package/gpsd-clients
59 $(call Package/gpsd/Default)
60 SECTION:=utils
61 CATEGORY:=Utilities
62 DEPENDS+= +libncurses
63 TITLE:=GPS tools and clients
64 endef
65
66 define Package/gpsd-clients/description
67 $(call Package/gpsd/Default/description)
68 This package contains auxiliary tools and example clients for monitoring and
69 testing the GPS daemon.
70 endef
71
72 define Package/libgps
73 $(call Package/gpsd/Default)
74 SECTION:=libs
75 CATEGORY:=Libraries
76 TITLE:=C service library for communicating with the GPS daemon
77 endef
78
79 define Package/libgps/description
80 $(call Package/gpsd/Default/description)
81 This package contains the libgps library.
82 endef
83
84 SCONS_VARS += \
85 LINKFLAGS="$(TARGET_LDFLAGS)"
86
87 SCONS_OPTIONS += \
88 dbus_export=no \
89 tsip=no \
90 fv18=no \
91 tripmate=no \
92 earthmate=no \
93 itrax=no \
94 navcom=no \
95 ubx=no \
96 evermore=no \
97 ntrip=no \
98 libgpsmm=no \
99 libQgpsmm=no \
100 bluez=no \
101 nostrip=yes \
102 python=no \
103 implicit_link=no \
104 chrpath=no \
105 manbuild=no \
106 target="$(TARGET_CROSS:-=)"
107
108 define Build/InstallDev
109 $(INSTALL_DIR) $(1)/usr/include
110 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
111 $(INSTALL_DIR) $(1)/usr/lib
112 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
113 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
114 $(CP) \
115 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
116 $(1)/usr/lib/pkgconfig/
117 endef
118
119 define Package/gpsd/install
120 $(INSTALL_DIR) $(1)/etc/config
121 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
124 $(INSTALL_DIR) $(1)/usr/sbin
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
126 endef
127
128 define Package/gpsd-clients/install
129 $(INSTALL_DIR) $(1)/usr/bin
130 $(INSTALL_BIN) \
131 $(PKG_INSTALL_DIR)/usr/bin/cgps \
132 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
133 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
134 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
135 $(1)/usr/bin/
136 endef
137
138 define Package/libgps/install
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
141 endef
142
143 $(eval $(call BuildPackage,gpsd))
144 $(eval $(call BuildPackage,gpsd-clients))
145 $(eval $(call BuildPackage,libgps))