Merge pull request #2126 from lynxis/libmicrohttpd
[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:=2
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_VARS += \
87 LINKFLAGS="$(TARGET_LDFLAGS)"
88
89 SCONS_OPTIONS += \
90 dbus_export=no \
91 tsip=no \
92 fv18=no \
93 tripmate=no \
94 earthmate=no \
95 itrax=no \
96 navcom=no \
97 ubx=no \
98 evermore=no \
99 ntrip=no \
100 libgpsmm=no \
101 libQgpsmm=no \
102 bluez=no \
103 nostrip=yes \
104 python=no \
105 implicit_link=no \
106 chrpath=no
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)/etc/hotplug.d/usb
125 $(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
126 $(INSTALL_DIR) $(1)/usr/sbin
127 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
128 endef
129
130 define Package/gpsd-clients/install
131 $(INSTALL_DIR) $(1)/usr/bin
132 $(INSTALL_BIN) \
133 $(PKG_INSTALL_DIR)/usr/bin/cgps \
134 $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \
135 $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \
136 $(PKG_INSTALL_DIR)/usr/bin/lcdgps \
137 $(1)/usr/bin/
138 endef
139
140 define Package/libgps/install
141 $(INSTALL_DIR) $(1)/usr/lib
142 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
143 endef
144
145 $(eval $(call BuildPackage,gpsd))
146 $(eval $(call BuildPackage,gpsd-clients))
147 $(eval $(call BuildPackage,libgps))