utils/gpsd: move package to 'Utilities'
[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_MD5SUM:=68691b5de4c94f82ec4062b042b5eb63
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 target="$(TARGET_CROSS:-=)"
106
107 define Build/InstallDev
108 $(INSTALL_DIR) $(1)/usr/include
109 $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/
110 $(INSTALL_DIR) $(1)/usr/lib
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/
112 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
113 $(CP) \
114 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \
115 $(1)/usr/lib/pkgconfig/
116 endef
117
118 define Package/gpsd/install
119 $(INSTALL_DIR) $(1)/etc/config
120 $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd
121 $(INSTALL_DIR) $(1)/etc/init.d
122 $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/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))