treewide: remove AUTORELEASE
[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.23.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
16 PKG_HASH:=ca2c466df783c57b8a07ad3f5c67943186d05befdc377de938ed111d1358a8c1
17
18 PKG_MAINTAINER:=Pushpal Sidhu <psidhu.devel@gmail.com>
19 PKG_LICENSE:=BSD-3-Clause
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:berlios:gps_daemon
22
23 PKG_BUILD_DEPENDS:=scons/host
24
25 include $(INCLUDE_DIR)/package.mk
26 include ../../devel/scons/scons.mk
27
28 define Package/gpsd/Default
29 DEPENDS+= +libusb-1.0
30 URL:=https://gpsd.gitlab.io/gpsd/
31 endef
32
33 define Package/gpsd/Default/description
34 gpsd is a userland daemon acting as a translator between GPS and AIS receivers
35 and their clients. gpsd listens on port 2947 for clients requesting
36 position/time/velocity information. The receivers are expected to generate
37 position information in a well-known format -- as NMEA-0183 sentences, SiRF
38 binary, Rockwell binary, Garmin binary format, or other vendor binary
39 protocols. gpsd takes this information from the GPS and translates it into
40 something uniform and easier to understand for clients.
41 endef
42
43 define Package/gpsd
44 $(call Package/gpsd/Default)
45 SECTION:=utils
46 CATEGORY:=Utilities
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:=utils
62 CATEGORY:=Utilities
63 DEPENDS+= +libncurses
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/gpsd-utils
74 $(call Package/gpsd/Default)
75 SECTION:=utils
76 CATEGORY:=Utilities
77 TITLE:=GPS daemon utils
78 endef
79
80 define Package/gpsd-utils/description
81 $(call Package/gpsd/Default/description)
82 This package contains utilities for interacting with GPS daemon.
83 endef
84
85 define Package/libgps
86 $(call Package/gpsd/Default)
87 SECTION:=libs
88 CATEGORY:=Libraries
89 TITLE:=C service library for communicating with the GPS daemon
90 ABI_VERSION:=29
91 endef
92
93 define Package/libgps/description
94 $(call Package/gpsd/Default/description)
95 This package contains the libgps library.
96 endef
97
98 SCONS_VARS += \
99 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) -L$(STAGING_DIR)/usr/lib" \
100 LINKFLAGS="$(TARGET_LDFLAGS)"
101
102 SCONS_OPTIONS += \
103 target_platform=linux \
104 dbus_export=no \
105 tsip=no \
106 fv18=no \
107 tripmate=no \
108 earthmate=no \
109 itrax=no \
110 navcom=no \
111 ubx=no \
112 evermore=no \
113 ntrip=no \
114 libgpsmm=no \
115 libQgpsmm=no \
116 bluez=no \
117 nostrip=yes \
118 python=no \
119 implicit_link=no \
120 chrpath=no \
121 manbuild=no \
122 sysroot="$(TOOLCHAIN_DIR)" \
123 target="$(TARGET_CROSS:-=)"
124
125 define Build/InstallDev
126 $(INSTALL_DIR) $(1)/usr/include
127 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
128 $(INSTALL_DIR) $(1)/usr/lib
129 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
130 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
131 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps.pc $(1)/usr/lib/pkgconfig
132 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libgps.pc
133 $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libgps.pc
134 endef
135
136 define Package/gpsd/install
137 $(INSTALL_DIR) $(1)/etc/config
138 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
139 $(INSTALL_DIR) $(1)/etc/init.d
140 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
141 $(INSTALL_DIR) $(1)/usr/sbin
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
143 endef
144
145 define Package/gpsd-clients/install
146 $(INSTALL_DIR) $(1)/usr/bin
147 $(INSTALL_BIN) \
148 $(PKG_INSTALL_DIR)/usr/bin/cgps \
149 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
150 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
151 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
152 $(1)/usr/bin/
153 endef
154
155 define Package/gpsd-utils/install
156 $(INSTALL_DIR) $(1)/usr/sbin
157 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsdctl $(1)/usr/sbin/
158 endef
159
160 define Package/libgps/install
161 $(INSTALL_DIR) $(1)/usr/lib
162 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.$(ABI_VERSION)* $(1)/usr/lib/
163 endef
164
165 $(eval $(call BuildPackage,gpsd))
166 $(eval $(call BuildPackage,gpsd-clients))
167 $(eval $(call BuildPackage,gpsd-utils))
168 $(eval $(call BuildPackage,libgps))